Skip to content

Add explicit waits for draft order shipping carrier button interaction#5324

Merged
michalina-graczyk merged 4 commits intomainfrom
MERX-1370-saleor_84-improvment
Dec 27, 2024
Merged

Add explicit waits for draft order shipping carrier button interaction#5324
michalina-graczyk merged 4 commits intomainfrom
MERX-1370-saleor_84-improvment

Conversation

@michalina-graczyk
Copy link

What type of PR is this?

  • 💅 Refactor
  • 🌟 Feature
  • 🔥 Bug Fix
  • 🔩 Maintenance
  • 🛠 Workflow CI/CD changes

Related Issues or Documents

  • closes #

Usage Instructions, Screenshots, Recordings

Have you written tests?

  • Yes!
  • No... here is why: Writing tests are mandatory, please replace this text with why test are not included in this PR

[Optional] Description

@michalina-graczyk michalina-graczyk added the run pw-e2e Run e2e (basic suite from PR automation) label Dec 17, 2024
@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2024

🦋 Changeset detected

Latest commit: 3899cf2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Patch

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

@github-actions github-actions bot temporarily deployed to pr-5324 December 17, 2024 14:07 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5324 December 17, 2024 16:47 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5324 December 17, 2024 17:09 Destroyed
@michalina-graczyk michalina-graczyk marked this pull request as ready for review December 18, 2024 07:55
@michalina-graczyk michalina-graczyk requested a review from a team December 18, 2024 07:55
@michalina-graczyk michalina-graczyk requested a review from a team as a code owner December 18, 2024 07:55
@github-actions github-actions bot temporarily deployed to pr-5324 December 18, 2024 08:01 Destroyed
}

async clickAddShippingCarrierButton() {
await this.page.waitForLoadState("networkidle");
Copy link
Contributor

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.


await this.addShippingCarrierLink.waitFor({
state: "visible",
timeout: 10000,
Copy link
Contributor

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.

@github-actions github-actions bot temporarily deployed to pr-5324 December 18, 2024 12:00 Destroyed
@michalina-graczyk michalina-graczyk merged commit ab543c5 into main Dec 27, 2024
14 checks passed
@michalina-graczyk michalina-graczyk deleted the MERX-1370-saleor_84-improvment branch December 27, 2024 12:32
poulch pushed a commit that referenced this pull request Jan 8, 2025
#5324)

* Add explicit waits for draft order shipping carrier button interaction

* Add fixes from review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run pw-e2e Run e2e (basic suite from PR automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants