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

Fixes flake in credentials and some job e2e tests #2529

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

AlexSCorey
Copy link
Member

One goal for this pr, within the jobs tests, is to rely less on the api to finish a job before we can act on it...delete it. To do this I moved some tests out of the e2e test file and into a component test file and to focus less on what the api returns to us, and more on what the user can do. In those tests we assert that a user can delete a job. This is an improvement IMO because we no longer have to wait for the job to finish. We can use stubbed data to load the table with completed jobs, and we can assert that the user can go through the steps necessary to delete a job.

@github-actions github-actions bot added AWX Label to indicate changes relevant to AWX E2E End-to-end testing CCT Component tests labels Jun 14, 2024
cypress/e2e/awx/resources/credentials.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/awx/resources/credentials.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/awx/resources/credentials.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/awx/resources/credentials.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/awx/views/jobs.cy.ts Show resolved Hide resolved
@AlexSCorey AlexSCorey force-pushed the flakyTestFix branch 2 times, most recently from c22f5b3 to f6dfcc1 Compare June 17, 2024 20:48
@AlexSCorey AlexSCorey requested a review from acruzgon June 17, 2024 20:48
@AlexSCorey AlexSCorey force-pushed the flakyTestFix branch 2 times, most recently from 46e752d to 8b22269 Compare June 20, 2024 15:09
Copy link
Contributor

@acruzgon acruzgon left a comment

Choose a reason for hiding this comment

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

following the best practice to avoid creating unused resources, the next two tests are not using the credential created in that describe block:

  • can display error toast message when running a test from the create credential form
  • can display success toast message when running a test from the create credential form

i'll leave it up to you. other than that it looks good!

@AlexSCorey AlexSCorey force-pushed the flakyTestFix branch 2 times, most recently from 79c6f75 to c7f4238 Compare June 20, 2024 19:27
…jobs delete test to rely on the api a bit less.
@AlexSCorey AlexSCorey merged commit 4948e52 into main Jun 21, 2024
23 checks passed
@AlexSCorey AlexSCorey deleted the flakyTestFix branch June 21, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AWX Label to indicate changes relevant to AWX CCT Component tests E2E End-to-end testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants