Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(core): update outline viewer test in shared page #8445

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/affine-cloud/e2e/share-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@
const viewer = page2.locator('affine-outline-viewer');
await tocIndicators.first().hover({ force: true });
await expect(viewer).toBeVisible();

const toggleButton = viewer.locator(
'[data-testid="toggle-outline-panel-button"]'
);
await expect(toggleButton).toHaveCount(0);
}
});

Expand Down Expand Up @@ -193,7 +198,7 @@
// enable share page and copy page link
await enableShare(page);
await page.getByTestId('share-menu-copy-link-button').click();
await page.getByTestId('share-link-menu-copy-edgeless').click();

Check failure on line 201 in tests/affine-cloud/e2e/share-page.spec.ts

View workflow job for this annotation

GitHub Actions / Server E2E Test 2/3

share-page.spec.ts:177:5 › share page with default edgeless

1) share-page.spec.ts:177:5 › share page with default edgeless ─────────────────────────────────── TimeoutError: locator.click: Timeout 10000ms exceeded. Call log: - waiting for getByTestId('share-link-menu-copy-edgeless') - locator resolved to <div tabindex="-1" role="menuitem" data-orientation="vertical" data-radix-collection-item="" class="styles_menuItem__t7bq4f4" data-testid="share-link-menu-copy-edgeless">…</div> - attempting click action - waiting for element to be visible, enabled and stable - element is not stable - retrying click action, attempt #1 - waiting for element to be visible, enabled and stable - element is not stable - retrying click action, attempt #2 - waiting 20ms - waiting for element to be visible, enabled and stable - element is not stable - retrying click action, attempt #3 - waiting 100ms - waiting for element to be visible, enabled and stable - element was detached from the DOM, retrying 199 | await enableShare(page); 200 | await page.getByTestId('share-menu-copy-link-button').click(); > 201 | await page.getByTestId('share-link-menu-copy-edgeless').click(); | ^ 202 | 203 | // check share page is accessible 204 | { at /home/runner/work/AFFiNE/AFFiNE/tests/affine-cloud/e2e/share-page.spec.ts:201:59

// check share page is accessible
{
Expand Down
Loading