diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-04-25 22:44:28 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-04-25 22:58:02 +0800 |
commit | 43f44d88dd2decb8b066e0301dd6741a6de0036d (patch) | |
tree | 6f44e1745bba4a2f4f0c0e8e7743748171182049 /qa | |
parent | 9cc2123e47661db37fbaff96f99999697aa60432 (diff) | |
download | gitlab-ce-43f44d88dd2decb8b066e0301dd6741a6de0036d.tar.gz |
Clear local storage after test so it's not interfering
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/project/settings/protected_branches.rb | 1 | ||||
-rw-r--r-- | qa/qa/specs/features/repository/protected_branches_spec.rb | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/qa/qa/page/project/settings/protected_branches.rb b/qa/qa/page/project/settings/protected_branches.rb index 23c3217d3f7..63bc3aaa2bc 100644 --- a/qa/qa/page/project/settings/protected_branches.rb +++ b/qa/qa/page/project/settings/protected_branches.rb @@ -73,7 +73,6 @@ module QA def click_allow(action, text) click_element :"allowed_to_#{action}_select" - within_element(:"allowed_to_#{action}_dropdown") do click_on text diff --git a/qa/qa/specs/features/repository/protected_branches_spec.rb b/qa/qa/specs/features/repository/protected_branches_spec.rb index 88fa4994e32..bf863d446a2 100644 --- a/qa/qa/specs/features/repository/protected_branches_spec.rb +++ b/qa/qa/specs/features/repository/protected_branches_spec.rb @@ -19,6 +19,13 @@ module QA Page::Main::Login.act { sign_in_using_credentials } end + after do + # We need to clear localStorage because we're using it for the dropdown, + # and capybara doesn't do this for us. + # https://github.com/teamcapybara/capybara/issues/1702 + Capybara.execute_script 'localStorage.clear()' + end + scenario 'user is able to protect a branch' do protected_branch = Factory::Resource::Branch.fabricate! do |resource| resource.branch_name = branch_name |