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

[37, 119, 191, 207, 105] Fix flaky test and remove retries #5142

Merged
merged 20 commits into from
Sep 23, 2024

Conversation

Cloud11PL
Copy link
Member

@Cloud11PL Cloud11PL commented Sep 3, 2024

  • Adds timeout to 119
  • Marks 191 as a slow test
  • Fixes 37
  • Waits for currency dropdown in 207, 105
  • Removes retries
  • Retains traces on fail

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 Sep 3, 2024

🦋 Changeset detected

Latest commit: a2b2ab4

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-5142 September 3, 2024 13:28 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 3, 2024 13:39 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 3, 2024 14:03 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 3, 2024 15:07 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 4, 2024 10:10 Destroyed
@Cloud11PL Cloud11PL changed the title cleanup after SALEOR_37 [SALEOR_37] Fix flaky test and cleanup shipping method on retry Sep 4, 2024
@Cloud11PL Cloud11PL marked this pull request as ready for review September 4, 2024 10:14
@Cloud11PL Cloud11PL requested review from a team as code owners September 4, 2024 10:14
@github-actions github-actions bot temporarily deployed to pr-5142 September 4, 2024 10:30 Destroyed
@Cloud11PL Cloud11PL marked this pull request as draft September 4, 2024 12:02
@Cloud11PL Cloud11PL changed the title [SALEOR_37] Fix flaky test and cleanup shipping method on retry [SALEOR_37] Fix flaky test and remove retries Sep 4, 2024
@github-actions github-actions bot temporarily deployed to pr-5142 September 4, 2024 14:35 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 5, 2024 07:23 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 5, 2024 07:34 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 5, 2024 07:48 Destroyed
@Cloud11PL Cloud11PL marked this pull request as ready for review September 5, 2024 08:14
@github-actions github-actions bot temporarily deployed to pr-5142 September 5, 2024 08:18 Destroyed
karola312
karola312 previously approved these changes Sep 5, 2024
@github-actions github-actions bot temporarily deployed to pr-5142 September 5, 2024 13:35 Destroyed
andrzejewsky
andrzejewsky previously approved these changes Sep 9, 2024
@github-actions github-actions bot temporarily deployed to pr-5142 September 13, 2024 11:47 Destroyed
@@ -18,45 +18,39 @@ test.beforeEach(({ page }) => {

const PRE_INSTALLATION_TIMEOUT = 20 * 1000;
const INSTALLATION_PENDING_TIMEOUT = 50 * 1000;
const APP_LISTED_TIMEOUT = 15 * 1000;
const APP_INSTALLED_TIMEOUT = 50 * 1000;
const APP_EXPECT_UI_TIMEOUT = 15 * 1000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need such long timeouts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.changeset/quiet-camels-raise.md Outdated Show resolved Hide resolved
playwright.config.ts Show resolved Hide resolved
const DEFAULT_WORKERS = "2";
// const DEFAULT_RETRIES = "1";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need that comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to see how disabling retries behaves and if needed revert this change.

@@ -257,6 +257,10 @@ test("TC: SALEOR_84 Create draft order @e2e @draft", async () => {
});

test("TC: SALEOR_191 Refund products from the fully paid order @e2e @refunds", async () => {
// All steps of this test pass (including after hooks), but Playwright
// marks it as failed because of exceeding 30s timeout
test.slow();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this marks test as slow, and triples the timeout, meaning something similar as if you were added 3x base timeout here. I does not look like fix for the flaky test.

Since you are fixing couple of test in single PR, please mark this as TODO, and leave ticket number for further fixing.

Copy link
Member Author

@Cloud11PL Cloud11PL Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last time it failed the test threw the following error:

Test finished within timeout of 30000ms, but tearing down "context" ran out of time.
Please allow more time for the test, since teardown is attributed towards the test timeout budget.

here's the recording:
32_timeout_PW.webm - every step passed

@github-actions github-actions bot temporarily deployed to pr-5142 September 16, 2024 19:50 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 17, 2024 11:16 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 20, 2024 07:23 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 20, 2024 08:50 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 20, 2024 09:28 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5142 September 20, 2024 12:29 Destroyed
@Cloud11PL Cloud11PL merged commit a9c9600 into main Sep 23, 2024
15 checks passed
@Cloud11PL Cloud11PL deleted the MERX-884-SALEOR_37-flaky-fix branch September 23, 2024 11:24
poulch pushed a commit that referenced this pull request Sep 23, 2024
* SALEOR_37 fix

* add remove retires comment

* cleanup

* expect items instead of waiting for DOM

* retain traces on first failure

* 119 and 191

* changeset

* change global timeouts

* improve 119

* remove action timeout

* 105 fix

* SALEOR_207 wait for currency dropdown to load

* wait for currency to be visible

* keep one number convention

* change changeset
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.

5 participants