summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-04-25 22:44:28 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-04-25 22:58:02 +0800
commit43f44d88dd2decb8b066e0301dd6741a6de0036d (patch)
tree6f44e1745bba4a2f4f0c0e8e7743748171182049 /qa/qa/specs/features
parent9cc2123e47661db37fbaff96f99999697aa60432 (diff)
downloadgitlab-ce-43f44d88dd2decb8b066e0301dd6741a6de0036d.tar.gz
Clear local storage after test so it's not interfering
Diffstat (limited to 'qa/qa/specs/features')
-rw-r--r--qa/qa/specs/features/repository/protected_branches_spec.rb7
1 files changed, 7 insertions, 0 deletions
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