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 flaky test #2006

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Fixes flaky test #2006

merged 1 commit into from
Jan 8, 2025

Conversation

hectorcorrea
Copy link
Member

@hectorcorrea hectorcorrea commented Jan 7, 2025

Fixes the flaky test for the Work Wizard.

I am not entirely sure how come this test passed sometimes but not others. If I am reading the spec correctly it should had always failed since (1) it does not add a data file to the work (it only adds the readme) and (2) the very last check for the "title" should always fail given that we don't display the file on the last step. ¯_(ツ)_/¯

Closes #2002

@@ -96,7 +98,6 @@
click_on "Grant License and Complete"
page.driver.browser.switch_to.alert.accept
expect(page).to have_content("5-10 business days")
expect(page).to have_content(work.title)
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -83,6 +83,8 @@

click_on "Next"
expect(page).to have_css(validate_form_css)
# Force the work to have two files (readme + another file)
stub_s3 data: [FactoryBot.build(:s3_readme, work:), FactoryBot.build(:s3_file, work:)]
Copy link
Member Author

Choose a reason for hiding this comment

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

This seems to be the culprit. We are not adding a data file (other than the readme) and the code expects one. That's why the validation error in CI is actually indicating.

What I still don't understand is how come this passed sometimes but not others?

@bess bess merged commit 033e979 into main Jan 8, 2025
5 checks passed
@bess bess deleted the 2002-flaky-test branch January 8, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky test in CI
2 participants