-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugthe issue is regarding one of our programs which faces problems when a certain task is executedthe issue is regarding one of our programs which faces problems when a certain task is executed
Description
We've had intermittent system test errors before, and it sometimes boils down to timing errors or order of execution errors. See #9662 #9247
We're now seeing this one:
ERROR PostTest#test_awarding_barnstar_functions_correctly (196.06s)
Minitest::UnexpectedError: Capybara::ExpectationNotMet: expected to find css "div.alert-success" but there were no matches
test/system/post_test.rb:253:in `block in <class:PostTest>'
It's on line 253 of post_test.rb:
plots2/test/system/post_test.rb
Lines 243 to 256 in d35d935
| test "awarding barnstar functions correctly" do | |
| note = nodes(:one) | |
| visit note.path | |
| find("span[data-original-title='Tools']").click() | |
| find("input[value='Give']").click() | |
| # Wait for the alert to be shown | |
| wait_for_ajax | |
| page.assert_selector("div.alert-success", text: "You awarded the basic barnstar to #{note.author.name}") | |
| page.assert_selector("p", text: "#{note.author.name} was awarded the Basic Barnstar by palpatine for their work in this research note.") | |
| page.assert_selector(".comment-body p", text: "@palpatine awards a barnstar to #{note.author.name} for their awesome contribution!") | |
| end |
Is this a standard way to wait? Why are we using page.assert_selector instead of just assert_selector?
Also, i think possibly this alert disappears after a few seconds. Could it be disappearing before we check for it?
Metadata
Metadata
Assignees
Labels
bugthe issue is regarding one of our programs which faces problems when a certain task is executedthe issue is regarding one of our programs which faces problems when a certain task is executed