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

Fix some flaky e2e tests #8688

Merged
merged 25 commits into from
May 17, 2024
Merged

Fix some flaky e2e tests #8688

merged 25 commits into from
May 17, 2024

Conversation

raethlein
Copy link
Collaborator

@raethlein raethlein commented May 16, 2024

Describe your changes

For some tests its difficult to reproduce them, so this is a best-effort change based on patterns we have seen in the past.

st_dialog_test.py:

  • the sidebar snapshot test used the wrong dialog
  • the dialog snapshot test was flaky due to different element focuses sometimes. Now, we enforce one specific focus
  • the reopen-after-dismiss test was flaky -> increased the time between interactions

st_altair_chart_basic_select_test:

  • fix regex escaping for test_point_bar_chart_displays_selection_text

st_date_input_test:

  • wait after date is picked and checking the markdown (failed here)

custom_components/popular_components:

  • fixed iframe locator that triggered error sometimes for some components that cause multiple iframes to render
  • remove lottie as it hang indefinitely on my machine

GitHub Issue Link (if applicable)

Testing Plan

  • E2E Tests: updated

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@raethlein raethlein added type:enhancement Requests for feature enhancements or new features security-assessment-completed impact:internal labels May 16, 2024
@raethlein raethlein changed the title Fix dialog e2e tests Fix some flaky e2e tests May 16, 2024
@raethlein raethlein marked this pull request as ready for review May 16, 2024 10:24
@raethlein raethlein requested a review from kajarenc May 16, 2024 10:53
dialog.locator("div", has_text="Large-width Dialog").click()
submit_button = dialog.get_by_test_id("stButton")
expect(submit_button).to_be_visible()
submit_button.get_by_test_id("baseButton-secondary").hover()
Copy link
Collaborator

Choose a reason for hiding this comment

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

submit_button.hover() doesn't work, and we need a more narrow locator here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, I tried the other one first but apparently the effect happens on the button element itself!

@raethlein raethlein force-pushed the tests/fix-flaky-dialog-tests branch from 462b088 to 1318724 Compare May 16, 2024 13:44
## Describe your changes

Similar to the dataframe selection
tests, we want to test chart selections with callbacks and inside forms or
fragments explicitly.

Also fix two issues with the dataframe selection e2e tests.
@raethlein raethlein merged commit a3206e7 into develop May 17, 2024
35 checks passed
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.

None yet

2 participants