From af1aa46b5b3955080417d6aa85ae91fab84473a5 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 17 Dec 2024 09:53:53 +0100 Subject: [PATCH] fix: update tests (#559) * fix: update tests * test: update how inline errors are queried --- test-e2e/basic.test.ts | 2 +- test-e2e/tester.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test-e2e/basic.test.ts b/test-e2e/basic.test.ts index cbee528..a3d84d9 100644 --- a/test-e2e/basic.test.ts +++ b/test-e2e/basic.test.ts @@ -152,7 +152,7 @@ describe('continuous testing', () => { const errors = await tester.errors.getInlineErrors() expect(errors).toEqual([ - 'expected 1000 to be 2 // Object.is equality', + '1000 != 2', ]) }) }) diff --git a/test-e2e/tester.ts b/test-e2e/tester.ts index 5be5795..60f8f35 100644 --- a/test-e2e/tester.ts +++ b/test-e2e/tester.ts @@ -67,7 +67,7 @@ class TesterErrorOutput { ) {} async getInlineErrors() { - const locator = this.page.locator('.test-message-inline-content') + const locator = this.page.locator('.test-error-content-widget') const text = await locator.allInnerTexts() return text.map(t => t.trim().replace(/\s/g, ' ')) } @@ -113,8 +113,9 @@ export class TesterTestItem { } async navigate() { - await this.locator.hover() - await this.locator.getByLabel(/Go to Test/).click() + await this.locator.click() + await this.locator.press('Alt+Enter') + // await this.locator.getByLabel(/Go to Test/).click() // wait until the page is navigated await this.page.getByRole('tab', { name: new RegExp(this.name) }).waitFor() } -- 2.51.2