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

Update sort tests to reduce the number of API calls and data dependence #4210

Closed
jpaten opened this issue Oct 25, 2024 · 1 comment · Fixed by #4234
Closed

Update sort tests to reduce the number of API calls and data dependence #4210

jpaten opened this issue Oct 25, 2024 · 1 comment · Fixed by #4234
Assignees
Labels
canary Done by the Clever Canary team

Comments

@jpaten
Copy link
Contributor

jpaten commented Oct 25, 2024

Need

Currently the testSortAzul function in testFunctions.ts, which runs the table sort tests, leads to a large number of backend calls and has the potential of failing if the table contains any blank cells. The current test is as follows:

  • Load the specified tab
  • For each default/pre-enabled column that is marked as the test configuration as "sortable":
    • Check that the first cell in the column is not blank and is visible
    • Click the column header to sort it
    • Check that the first cell in the column is not blank and is visible
    • Click the column header to sort it in the inverse direction
    • Check that the first cell in the column is not blank and is visible
  • Pass the test if this succeeds for each default column

Approach

  • Sort every sortable default column on each tab once, to reduce the number of API calls made
  • Remove the check that the first cell in the sorted column is not blank to reduce data dependence
  • Add a check that the "sorted" icon (with test id SouthRoundedIcon) is only visible on the sorted column
@github-actions github-actions bot added the canary Done by the Clever Canary team label Oct 25, 2024
@jpaten jpaten changed the title Update sort tests to reduce the number of API calls and potential flakiness Update sort tests to reduce the number of API calls and data dependence Oct 25, 2024
@jpaten jpaten self-assigned this Oct 30, 2024
@MillenniumFalconMechanic
Copy link
Contributor

Approach LGTM, thanks Jonah!

@jpaten jpaten linked a pull request Nov 6, 2024 that will close this issue
jpaten added a commit that referenced this issue Nov 8, 2024
test: removed assertion that cells would have text from testsortAzul (#4210)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
canary Done by the Clever Canary team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants