summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-17 13:05:17 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-17 13:05:17 +0100
commit73a5f331b2e7b2e224147e69c857c6306318399e (patch)
treef91c2533dbc37bbf2637ce11b46e7f1ffbfc4d8a
parent536210603f2f6c8d4a27b802d69dcdf25dfd5456 (diff)
downloadgitlab-ce-73a5f331b2e7b2e224147e69c857c6306318399e.tar.gz
Unfold dropdown in tests for environments index
-rw-r--r--spec/features/environments_spec.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb
index eca67de7bcb..aef38f9f407 100644
--- a/spec/features/environments_spec.rb
+++ b/spec/features/environments_spec.rb
@@ -78,15 +78,20 @@ feature 'Environments', feature: true, js: true do
given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') }
scenario 'does show a play button' do
- # TODO: Fix me!
+ find('.dropdown-play-icon-container').click
expect(page).to have_content(manual.name.humanize)
end
scenario 'does allow to play manual action' do
expect(manual).to be_skipped
- # TODO: Fix me!
- expect{ click_link(manual.name.humanize) }.not_to change { Ci::Pipeline.count }
- expect(page).to have_content(manual.name)
+
+ find('.dropdown-play-icon-container').click
+ play_action = find('span', text: manual.name.humanize)
+
+ expect(page).to have_content(manual.name.humanize)
+ expect { play_action.click }.not_to change { Ci::Pipeline.count }
+
+ # TODO, fix me!
expect(manual.reload).to be_pending
end