-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add explicit waits for draft order shipping carrier button interaction #5324
Conversation
🦋 Changeset detectedLatest commit: 3899cf2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
playwright/pages/draftOrdersPage.ts
Outdated
@@ -60,6 +60,14 @@ export class DraftOrdersPage extends BasePage { | |||
} | |||
|
|||
async clickAddShippingCarrierButton() { | |||
await this.page.waitForLoadState("networkidle"); |
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.
https://playwright.dev/docs/api/class-page#page-wait-for-load-state
Especially:
Most of the time, this method is not needed because Playwright auto-waits before every action.
and:
'networkidle' - DISCOURAGED wait until there are no network connections for at least 500 ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
playwright/pages/draftOrdersPage.ts
Outdated
|
||
await this.addShippingCarrierLink.waitFor({ | ||
state: "visible", | ||
timeout: 10000, |
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.
Do not add hardcoded timeout, rather we should rethink the test if it stucks somwhere.
#5324) * Add explicit waits for draft order shipping carrier button interaction * Add fixes from review
What type of PR is this?
Related Issues or Documents
Usage Instructions, Screenshots, Recordings
Have you written tests?
[Optional] Description