From 86e09b82abbc38b9a7fa0be15a7a995107d153cc Mon Sep 17 00:00:00 2001 From: tzhangchi Date: Fri, 23 Dec 2022 18:20:21 +0800 Subject: [PATCH] test: make the test of contact us more stable --- tests/contact-us.spec.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/contact-us.spec.ts b/tests/contact-us.spec.ts index 7c095a6056..bda0d52c30 100644 --- a/tests/contact-us.spec.ts +++ b/tests/contact-us.spec.ts @@ -5,18 +5,10 @@ loadPage(); test.describe('Open contact us', () => { test('Click about us', async ({ page }) => { - // page.waitForTimeout(1000); const currentWorkspace = page.getByTestId('current-workspace'); await currentWorkspace.click(); page.waitForTimeout(1000); - await page - .getByRole('tooltip', { - name: 'A AFFiNE Log in to sync with affine About AFFiNE', - }) - .locator('div') - .filter({ hasText: 'About AFFiNE' }) - .nth(2) - .click(); + await page.getByText('About AFFiNE').click(); const contactUsModal = page.locator( '[data-testid=contact-us-modal-content]' @@ -24,7 +16,6 @@ test.describe('Open contact us', () => { await expect(contactUsModal).toContainText('AFFiNE Community'); }); test('Click right-bottom corner contact icon', async ({ page }) => { - page.waitForTimeout(1000); const faqIcon = page.locator('[data-testid=faq-icon]'); const box = await faqIcon.boundingBox(); await expect(box?.x).not.toBeUndefined();