diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-03-26 20:46:49 +0200 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-03-27 09:54:12 +0200 |
commit | 51950c13d8fb51c6bfa2b2c02a7a32b8a27e63b9 (patch) | |
tree | 0e28bee15e4e664b6cdc1d1837b8432467d65d2d | |
parent | 7183c8c1c0bdf83568c4084fe10f1d541ebc89dc (diff) | |
download | gitlab-ce-jprovazn-comment-thread.tar.gz |
Wait for finishing any requestsjprovazn-comment-thread
When running a test which adds a new comment, we should wait
until the comment is added, otherwise page content may be changed
and referenced HTML element may be removed meantime. The test then
fails with:
Selenium::WebDriver::Error::StaleElementReferenceError:
stale element reference: element is not attached to the page document
Closes gitlab-ce#42148
-rw-r--r-- | spec/support/features/discussion_comments_shared_example.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/support/features/discussion_comments_shared_example.rb b/spec/support/features/discussion_comments_shared_example.rb index 0992b329477..80604395adf 100644 --- a/spec/support/features/discussion_comments_shared_example.rb +++ b/spec/support/features/discussion_comments_shared_example.rb @@ -137,6 +137,8 @@ shared_examples 'discussion comments' do |resource_name| describe 'creating a discussion' do before do find(submit_selector).click + wait_for_requests + find(comments_selector, match: :first) end |