diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-04-24 14:54:16 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-04-24 14:54:16 +0300 |
commit | b98d2e9958d4c01ecf93c0abe44c51029033b3c1 (patch) | |
tree | 9f8035877fcce6277915ecd415b78b06d012dff2 /spec/features | |
parent | 5939b18365c73401d5aeea25a83b935c6163bbf2 (diff) | |
download | gitlab-ci-b98d2e9958d4c01ecf93c0abe44c51029033b3c1.tar.gz |
Tabs Pending and Running on admin builds page
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/builds_spec.rb | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/spec/features/admin/builds_spec.rb b/spec/features/admin/builds_spec.rb index a082b81..e62e836 100644 --- a/spec/features/admin/builds_spec.rb +++ b/spec/features/admin/builds_spec.rb @@ -19,4 +19,53 @@ describe "Admin Builds" do it { page.should have_content "All builds" } it { page.should have_content build.short_sha } end + + describe "Tabs" do + it "shows all builds" do + build = FactoryGirl.create :build, commit: commit, status: "pending" + build1 = FactoryGirl.create :build, commit: commit, status: "running" + build2 = FactoryGirl.create :build, commit: commit, status: "success" + build3 = FactoryGirl.create :build, commit: commit, status: "failed" + + visit admin_builds_path + + page.all(".build-link").size.should == 4 + end + + it "shows pending builds" do + build = FactoryGirl.create :build, commit: commit, status: "pending" + build1 = FactoryGirl.create :build, commit: commit, status: "running" + build2 = FactoryGirl.create :build, commit: commit, status: "success" + build3 = FactoryGirl.create :build, commit: commit, status: "failed" + + visit admin_builds_path + + within ".nav.nav-tabs" do + click_on "Pending" + end + + page.find(".build-link").should have_content(build.id) + page.find(".build-link").should_not have_content(build1.id) + page.find(".build-link").should_not have_content(build2.id) + page.find(".build-link").should_not have_content(build3.id) + end + + it "shows running builds" do + build = FactoryGirl.create :build, commit: commit, status: "pending" + build1 = FactoryGirl.create :build, commit: commit, status: "running" + build2 = FactoryGirl.create :build, commit: commit, status: "success" + build3 = FactoryGirl.create :build, commit: commit, status: "failed" + + visit admin_builds_path + + within ".nav.nav-tabs" do + click_on "Running" + end + + page.find(".build-link").should have_content(build1.id) + page.find(".build-link").should_not have_content(build.id) + page.find(".build-link").should_not have_content(build2.id) + page.find(".build-link").should_not have_content(build3.id) + end + end end |