Commit 43f44d88 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Clear local storage after test so it's not interfering

parent 9cc2123e
...@@ -73,7 +73,6 @@ module QA ...@@ -73,7 +73,6 @@ module QA
def click_allow(action, text) def click_allow(action, text)
click_element :"allowed_to_#{action}_select" click_element :"allowed_to_#{action}_select"
within_element(:"allowed_to_#{action}_dropdown") do within_element(:"allowed_to_#{action}_dropdown") do
click_on text click_on text
......
...@@ -19,6 +19,13 @@ module QA ...@@ -19,6 +19,13 @@ module QA
Page::Main::Login.act { sign_in_using_credentials } Page::Main::Login.act { sign_in_using_credentials }
end 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 scenario 'user is able to protect a branch' do
protected_branch = Factory::Resource::Branch.fabricate! do |resource| protected_branch = Factory::Resource::Branch.fabricate! do |resource|
resource.branch_name = branch_name resource.branch_name = branch_name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment