diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2016-10-10 21:44:29 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2016-10-10 21:44:29 +0100 |
commit | 594c320851afbf4c8dd1c78600a0195f12d6ce41 (patch) | |
tree | f4f29548a64f2f74dd02f8f7a9eb31b5e1c601d5 | |
parent | 0e1f39d8cee3a6d23fccb195f8257178df840805 (diff) | |
download | gitlab-ce-594c320851afbf4c8dd1c78600a0195f12d6ce41.tar.gz |
Adds tests to verify if tabs are rendered
-rw-r--r-- | spec/features/environments_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb index 3b38a7f5007..99246589eae 100644 --- a/spec/features/environments_spec.rb +++ b/spec/features/environments_spec.rb @@ -18,11 +18,26 @@ feature 'Environments', feature: true do before do visit namespace_project_environments_path(project.namespace, project) end + + context 'shows two tabs' do + scenario 'does show Available tab with link' do + expect(page).to have_link('Available') + end + + scenario 'does show Stopped tab with link' do + expect(page).to have_link('Stopped') + end + end context 'without environments' do scenario 'does show no environments' do expect(page).to have_content('You don\'t have any environments right now.') end + + scenario 'does show 0 as counter for environments in both tabs' do + expect(page.find('.js-avaibale-environments-count').text).to eq('0') + expect(page.find('.js-stopped-environments-count').text).to eq('0') + end end context 'with environments' do |