diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-01-05 12:46:42 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-01-14 12:48:15 +0100 |
commit | e5d2a81b86d59c50ff5c488da017a9b56d0442f0 (patch) | |
tree | f62d89bed62a2768fa1d5d99040296af9081b2a8 /features | |
parent | 1b1793c2530d7003d8baa5aa1912a4ab258d4a1c (diff) | |
download | gitlab-ce-e5d2a81b86d59c50ff5c488da017a9b56d0442f0.tar.gz |
Add basic spinach tests for project builds
Diffstat (limited to 'features')
-rw-r--r-- | features/project/builds.feature | 11 | ||||
-rw-r--r-- | features/steps/project/builds.rb | 14 | ||||
-rw-r--r-- | features/steps/shared/builds.rb | 16 |
3 files changed, 41 insertions, 0 deletions
diff --git a/features/project/builds.feature b/features/project/builds.feature new file mode 100644 index 00000000000..3f005b5133c --- /dev/null +++ b/features/project/builds.feature @@ -0,0 +1,11 @@ +Feature: Project Builds + Background: + Given I sign in as a user + And I own a project + And CI is enabled + And I have recent build for my project + + Scenario: I browse build summary page + When I visit recent build summary page + Then I see summary for build + And I see build trace diff --git a/features/steps/project/builds.rb b/features/steps/project/builds.rb new file mode 100644 index 00000000000..769690dd79d --- /dev/null +++ b/features/steps/project/builds.rb @@ -0,0 +1,14 @@ +class Spinach::Features::ProjectBuilds < Spinach::FeatureSteps + include SharedAuthentication + include SharedProject + include SharedBuilds + include RepoHelpers + + step 'I see summary for build' do + expect(page).to have_content "Build ##{@build.id}" + end + + step 'I see build trace' do + expect(page).to have_css '#build-trace' + end +end diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb new file mode 100644 index 00000000000..6f9cd174729 --- /dev/null +++ b/features/steps/shared/builds.rb @@ -0,0 +1,16 @@ +module SharedBuilds + include Spinach::DSL + + step 'CI is enabled' do + @project.enable_ci + end + + step 'I have recent build for my project' do + ci_commit = create :ci_commit, project: @project, sha: sample_commit.id + @build = create :ci_build, commit: ci_commit + end + + step 'I visit recent build summary page' do + visit namespace_project_build_path(@project.namespace, @project, @build) + end +end |