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

tests: cy howto read flaky #3861

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tuliobluz
Copy link
Contributor

@tuliobluz tuliobluz commented Sep 24, 2024

PR Checklist

PR Type

What kind of change does this PR introduce?

  • Bugfix (fixes an issue)
  • Feature (adds functionality)
  • Code style update
  • Refactoring (no functional changes)
  • Build related changes
  • CI related changes
  • Documentation changes
  • Other... Please describe:

What is the current behavior?

Currently, the scenario [Read a How-to][By Everyone][See all info] has flaky steps when trying to assert the data on the how-to. The cause is a rerender from a cypress that loses track.

Example:

assert expected <div.howto-description-container.css-703r4> to contain product

cypress cloud with the issue

What is the new behavior?

To avoid the page being rerendered I used the aliases

Does this PR introduce a breaking change?

  • Yes
  • No

@tuliobluz tuliobluz requested a review from a team as a code owner September 24, 2024 14:46
@tuliobluz tuliobluz changed the title 3475 cy howto read flaky tests: cy howto read flaky Sep 24, 2024
Copy link

cypress bot commented Sep 24, 2024

onearmy-community-platform    Run #6263

Run Properties:  status check failed Failed #6263  •  git commit 7f5c946b5a: Merge branch 'master' into 3475-cy-howto-read-flaky
Project onearmy-community-platform
Branch Review pull/3861
Run status status check failed Failed #6263
Run duration 04m 26s
Commit git commit 7f5c946b5a: Merge branch 'master' into 3475-cy-howto-read-flaky
Committer benfurber
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 59
View all changes introduced in this branch ↗︎

Tests for review

Failed  src/integration/questions/discussions.spec.ts • 1 failed test • ci-chrome

View Output Video

Test Artifacts
[Questions.Discussions] > allows authenticated users to contribute to discussions Test Replay Screenshots Video
Flakiness  map.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[Map] > [Shows expected pins] Test Replay Screenshots Video
Flakiness  howto/read.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
... > [See all info] Test Replay Screenshots Video

@tuliobluz
Copy link
Contributor Author

Before merging this PR, can you retry the e2e jobs to see if the flaky is still happening?

@mariojsnunes
Copy link
Collaborator

we haven't had flaky tests for a while

@tuliobluz
Copy link
Contributor Author

For the previous runs 9/15 happened this flaky as you can see here.

@mariojsnunes
Copy link
Collaborator

Ah you are right, I was thinking about failed runs

@tuliobluz tuliobluz marked this pull request as draft September 25, 2024 12:18
@tuliobluz
Copy link
Contributor Author

The test is still flaky, I will continue to investigate it.

Comment on lines -53 to -54
// Hack to get the tags store to finish populating before the expectations
cy.wait(1000)
Copy link
Member

Choose a reason for hiding this comment

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

I'd be very suprised if removing this helps. If anything it probably needs time added to it.

@benfurber
Copy link
Member

benfurber commented Sep 25, 2024

Also looks like the question discussion spec is more of a pain atm. I wonder if it's because of changes I made to the discussion data mocks recently.

@tuliobluz
Copy link
Contributor Author

If I remember correctly, this issue has been happening for several months. I tried to investigate before. I attempted different approaches with Cypress but had no success. It might be related to how howto populate the tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: 💬 Changes Requested/with author
Development

Successfully merging this pull request may close these issues.

3 participants