Skip to content

Commit d72df61

Browse files
committed
Fix ObsoleteNode flakiness in multi-substring search feature spec
Wrap each search+assertion group in retry_block to handle Angular DOM re-renders that cause stale node references in Capybara/Cuprite. https://claude.ai/code/session_01WBou6gxZVaywfpnNexokp7
1 parent ede0871 commit d72df61

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

spec/features/projects/project_autocomplete_spec.rb

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -196,21 +196,29 @@
196196
end
197197

198198
# Both terms present anywhere in the name
199-
top_menu.search "big fish"
200-
top_menu.expect_result "The big beautiful fish"
201-
top_menu.expect_no_result "Plain project"
199+
retry_block do
200+
top_menu.search "big fish"
201+
top_menu.expect_result "The big beautiful fish"
202+
top_menu.expect_no_result "Plain project"
203+
end
202204

203205
# Partial word as the second term
204-
top_menu.search "big fi"
205-
top_menu.expect_result "The big beautiful fish"
206+
retry_block do
207+
top_menu.search "big fi"
208+
top_menu.expect_result "The big beautiful fish"
209+
end
206210

207211
# Terms in reverse order still match
208-
top_menu.search "fish big"
209-
top_menu.expect_result "The big beautiful fish"
212+
retry_block do
213+
top_menu.search "fish big"
214+
top_menu.expect_result "The big beautiful fish"
215+
end
210216

211217
# One term that does not appear → no match
212-
top_menu.search "big xyz"
213-
top_menu.expect_no_result "The big beautiful fish"
218+
retry_block do
219+
top_menu.search "big xyz"
220+
top_menu.expect_no_result "The big beautiful fish"
221+
end
214222
end
215223

216224
it "displays workspace type badges for portfolios and programs",

0 commit comments

Comments
 (0)