Add explicit waits for draft order shipping carrier button interaction#5324
Add explicit waits for draft order shipping carrier button interaction#5324michalina-graczyk merged 4 commits intomainfrom
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
| } | ||
|
|
||
| async clickAddShippingCarrierButton() { | ||
| await this.page.waitForLoadState("networkidle"); |
There was a problem hiding this comment.
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.
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