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

test: Fix flaky HybridInventory.cy.js test #2243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gkarat
Copy link
Contributor

@gkarat gkarat commented Aug 16, 2024

We don't pass data-ouia-safe to InventoryTable and it's set to true by default. Though, in the flaky test, for some reason, data-ouia-safe was missing completely, which makes this attribute somewhat unreliable to use: https://app.travis-ci.com/github/RedHatInsights/insights-inventory-frontend/jobs/625131895#L6568. HybridInventory.cy.test should use other way to indicate the table readiness.

@gkarat gkarat added the tests label Aug 16, 2024
@gkarat gkarat self-assigned this Aug 16, 2024
@gkarat gkarat requested a review from a team as a code owner August 16, 2024 12:54
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.69%. Comparing base (30a8d9c) to head (96d26c5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2243   +/-   ##
=======================================
  Coverage   58.69%   58.69%           
=======================================
  Files         198      198           
  Lines        5239     5239           
  Branches     1912     1912           
=======================================
  Hits         3075     3075           
  Misses       2164     2164           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mkholjuraev mkholjuraev left a comment

Choose a reason for hiding this comment

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

Should not we fix passing data-ouia-safe to InventoryTable or give it a default value instead?

@gkarat
Copy link
Contributor Author

gkarat commented Aug 22, 2024

@mkholjuraev, it's not an easy task to program data-ouia-safe properly: you should account for all data to be finished fetching, consider if all the animations are complete, etc. When, in the context of the tests, we have another indicator of table loading complete like a first row (or any other from the fixtures data) to be rendered. I think it's an easier solution and not requiring additional work in the source code (not the intention of this PR).

@gkarat gkarat force-pushed the fix-flaky-test-2 branch 2 times, most recently from 12b8304 to f10aafa Compare August 22, 2024 10:35
@gkarat gkarat requested review from a team and mkholjuraev August 22, 2024 10:36
Copy link
Contributor

@mkholjuraev mkholjuraev left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants