Add basic spinach tests for project builds
This commit is contained in:
parent
1b1793c253
commit
e5d2a81b86
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue