diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-04-26 18:36:45 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-04-27 17:09:23 +0800 |
commit | 01ed8a8ac0ba51dbb48a5dd2696bf4acbe186733 (patch) | |
tree | c87c40d39985b8160fa6f741fed88b7b5652e24a | |
parent | 43f44d88dd2decb8b066e0301dd6741a6de0036d (diff) | |
download | gitlab-ce-01ed8a8ac0ba51dbb48a5dd2696bf4acbe186733.tar.gz |
Wait for page load so we're not getting stale elements
while producing products. Basically an attempt to fix:
https://gitlab.com/gitlab-org/gitlab-qa/-/jobs/65016456
Selenium::WebDriver::Error::StaleElementReferenceError:
stale element reference: element is not attached to the page document
in:
``` ruby
product :name do
Page::Project::Settings::Repository.act do
expand_protected_branches(&:last_branch_name)
end
end
```
-rw-r--r-- | qa/qa/factory/resource/branch.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qa/qa/factory/resource/branch.rb b/qa/qa/factory/resource/branch.rb index 85ea847b785..4110cb510aa 100644 --- a/qa/qa/factory/resource/branch.rb +++ b/qa/qa/factory/resource/branch.rb @@ -76,6 +76,11 @@ module QA end page.protect_branch + + # Wait for page load, which resets the expanded sections + page.wait(reload: false) do + !page.has_content?('Collapse') + end end end end |