diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-07-18 10:57:22 +0200 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-07-18 10:57:22 +0200 |
commit | c958305409dbec64852a88fb91ecd55da7bd79d3 (patch) | |
tree | ce81ef5e7de10b42f2f6fed61991b78a724ea9b6 /spec/features/builds_spec.rb | |
parent | c220f9a03717ea2274a61f3365d37b5bac5c24e7 (diff) | |
download | gitlab-ce-c958305409dbec64852a88fb91ecd55da7bd79d3.tar.gz |
Modify test for Build tabs
Diffstat (limited to 'spec/features/builds_spec.rb')
-rw-r--r-- | spec/features/builds_spec.rb | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index 38c11ca9c4c..cab3dc1d167 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -18,11 +18,13 @@ describe "Builds" do visit namespace_project_builds_path(@project.namespace, @project, scope: :pending) end - it { expect(page).to have_link 'Cancel running' } - it { expect(page).to have_selector('.nav-links li.active', text: 'Pending') } - it { expect(page).to have_content @build.short_sha } - it { expect(page).to have_content @build.ref } - it { expect(page).to have_content @build.name } + it "shows Pending tab builds" do + expect(page).to have_link 'Cancel running' + expect(page).to have_selector('.nav-links li.active', text: 'Pending') + expect(page).to have_content @build.short_sha + expect(page).to have_content @build.ref + expect(page).to have_content @build.name + end end context "Running scope" do @@ -31,11 +33,13 @@ describe "Builds" do visit namespace_project_builds_path(@project.namespace, @project, scope: :running) end - it { expect(page).to have_selector('.nav-links li.active', text: 'Running') } - it { expect(page).to have_link 'Cancel running' } - it { expect(page).to have_content @build.short_sha } - it { expect(page).to have_content @build.ref } - it { expect(page).to have_content @build.name } + it "shows Running tab builds" do + expect(page).to have_selector('.nav-links li.active', text: 'Running') + expect(page).to have_link 'Cancel running' + expect(page).to have_content @build.short_sha + expect(page).to have_content @build.ref + expect(page).to have_content @build.name + end end context "Finished scope" do @@ -44,9 +48,11 @@ describe "Builds" do visit namespace_project_builds_path(@project.namespace, @project, scope: :finished) end - it { expect(page).to have_selector('.nav-links li.active', text: 'Finished') } - it { expect(page).to have_content 'No builds to show' } - it { expect(page).to have_link 'Cancel running' } + it "shows Finished tab builds" do + expect(page).to have_selector('.nav-links li.active', text: 'Finished') + expect(page).to have_content 'No builds to show' + expect(page).to have_link 'Cancel running' + end end context "All builds" do @@ -55,11 +61,13 @@ describe "Builds" do visit namespace_project_builds_path(@project.namespace, @project) end - it { expect(page).to have_selector('.nav-links li.active', text: 'All') } - it { expect(page).to have_content @build.short_sha } - it { expect(page).to have_content @build.ref } - it { expect(page).to have_content @build.name } - it { expect(page).not_to have_link 'Cancel running' } + it "shows All tab builds" do + expect(page).to have_selector('.nav-links li.active', text: 'All') + expect(page).to have_content @build.short_sha + expect(page).to have_content @build.ref + expect(page).to have_content @build.name + expect(page).not_to have_link 'Cancel running' + end end end |