Skip to content
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

Merged
merged 4 commits into from
Dec 27, 2024

Conversation

michalina-graczyk
Copy link
Member

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

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 review from a team as code owners December 18, 2024 07:55
@github-actions github-actions bot temporarily deployed to pr-5324 December 18, 2024 08:01 Destroyed
@@ -60,6 +60,14 @@ export class DraftOrdersPage extends BasePage {
}

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

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
Member

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
15 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants