Skip to content

Commit

Permalink
fix: update tests (#559)
Browse files Browse the repository at this point in the history
* fix: update tests

* test: update how inline errors are queried
  • Loading branch information
sheremet-va authored Dec 17, 2024
1 parent 3fe7ca2 commit af1aa46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test-e2e/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
])
})
})
7 changes: 4 additions & 3 deletions test-e2e/tester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, ' '))
}
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit af1aa46

Please sign in to comment.