Skip to content

DEV: Resolve excerpt issue in specs #206

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

Merged
merged 1 commit into from
Apr 2, 2025
Merged

DEV: Resolve excerpt issue in specs #206

merged 1 commit into from
Apr 2, 2025

Conversation

davidtaylorhq
Copy link
Member

No description provided.

@@ -29,6 +34,7 @@

it "does not show the topic excerpts by default" do
visit("/docs")
expect(page).to have_css(".topic-list-item", count: 2)
expect(page).to have_no_css(".topic-excerpt")
Copy link
Member Author

@davidtaylorhq davidtaylorhq Apr 2, 2025

Choose a reason for hiding this comment

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

This was passing previously because the assertion would run before the page is actually loaded.

If the page loaded very quickly for some reason, then the assertion would fail correctly because of the interaction with the tooltips plugin.

Adding a have_css assertion beforehand ensures that rendering has completed before running the have_no_css check

@davidtaylorhq
Copy link
Member Author

cc @tgxworld @pmusaraj since I see you have both been fighting this flaky recently

Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

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

Cool!

@davidtaylorhq davidtaylorhq merged commit cd7c990 into main Apr 2, 2025
5 checks passed
@davidtaylorhq davidtaylorhq deleted the flaky-spec branch April 2, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants