Skip to content

Commit

Permalink
Merge pull request #16080 from opf/fix/fix-flaky-timeline-feature-spec
Browse files Browse the repository at this point in the history
Fix flaky feature tests involving timeline
  • Loading branch information
cbliard authored Jul 9, 2024
2 parents 44e5c39 + 7254a49 commit 8e7219f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/support/pages/work_packages/work_packages_timeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def expect_timeline!(open: true)
else
expect(page).to have_no_css(".wp-table-timeline--container .wp-timeline-cell", visible: true)
end
wait_for_network_idle
end

def timeline_row(wp_id)
Expand Down
3 changes: 3 additions & 0 deletions spec/support/shared/cuprite_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
# being present or gone. Instead the execution is halted until
# requested data is done being fetched.
def wait_for_network_idle(...)
# `wait_for_network_idle` is available only when driver is Cuprite.
return unless page.driver.respond_to?(:wait_for_network_idle)

page.driver.wait_for_network_idle(...)
end

Expand Down

0 comments on commit 8e7219f

Please sign in to comment.