-
Notifications
You must be signed in to change notification settings - Fork 83
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(playwright): more flaky tests #6372
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c090f2d:
|
@@ -39,43 +40,38 @@ test.describe("check BatchSelection component properties", () => { | |||
test("should check hidden BatchSelection", async ({ mount, page }) => { | |||
await mount(<BatchSelectionComponent hidden />); | |||
const batchSelection = batchSelectionComponent(page); | |||
await expect(batchSelection.getAttribute("hidden")).not.toBeNull(); | |||
|
|||
// await expect(batchSelection.getAttribute("hidden")).not.toBeNull(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this commented code.
src/components/dialog/dialog.pw.tsx
Outdated
@@ -270,6 +270,7 @@ test.describe("Testing Dialog component properties", () => { | |||
const firstTextbox = page.getByLabel("Textbox1"); | |||
const closeButton = page.getByLabel("Close"); | |||
|
|||
await page.waitForTimeout(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these timeouts needed? 1 second seems like a long time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each of the dialog tests that either tabs or shift+tabs through the elements regularly fails without some kind of wait before the first tab, especially when running through the UI. I'm not a fan of putting in arbitrary wait times, but this at least makes the test do what it's supposed to. I've reduced each wait time to a quarter of a second.
ca80a50
to
c090f2d
Compare
🎉 This PR is included in version 123.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Proposed behaviour
Fix flaky Batch-Selection, Button & Dialog Playwright tests
Current behaviour
Tests regularly fail during CI checks
Checklist
d.ts
file added or updated if requiredQA
Additional context
N/A
Testing instructions
Testing instructions
button.pw.tsx
file passedbatch-selection.pw.tsx
file passeddialog.pw.tsx
file passed*.pw.tsx
files have regressed