summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-11 10:27:53 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-11 10:29:15 +0100
commit9e6190485b2213c9dfdd3d5b22853fc6e2263c2a (patch)
treeac04168b9983fec0af96696dbab4dd23b2bd50e9 /features
parentdebaa813294f81d127e92bc75a3ae0751af7a316 (diff)
downloadgitlab-ce-9e6190485b2213c9dfdd3d5b22853fc6e2263c2a.tar.gz
Parse XML instead of HTML in tests for a SVG build badgefix/ci-build-status-badge
Diffstat (limited to 'features')
-rw-r--r--features/project/badges/build.feature8
-rw-r--r--features/steps/project/badges/build.rb2
-rw-r--r--features/steps/shared/builds.rb4
3 files changed, 7 insertions, 7 deletions
diff --git a/features/project/badges/build.feature b/features/project/badges/build.feature
index bdd934651e6..9417f62d680 100644
--- a/features/project/badges/build.feature
+++ b/features/project/badges/build.feature
@@ -6,17 +6,17 @@ Feature: Project Badges Build
And project has a recent build
Scenario: I want to see a badge for successfully built project
- Given recent build is successfull
+ Given recent build is successful
When I display builds badge for a master branch
Then I should see a build success badge
- Scenario: I want to see a badge for project with filed builds
+ Scenario: I want to see a badge for project with failed builds
Given recent build failed
When I display builds badge for a master branch
Then I should see a build failed badge
Scenario: I want to see a badge for project with running builds
- Given recent build is successfull
- And project has an another build that is running
+ Given recent build is successful
+ And project has another build that is running
When I display builds badge for a master branch
Then I should see a build running badge
diff --git a/features/steps/project/badges/build.rb b/features/steps/project/badges/build.rb
index 10b27d61fdd..cbfc35bed65 100644
--- a/features/steps/project/badges/build.rb
+++ b/features/steps/project/badges/build.rb
@@ -21,7 +21,7 @@ class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps
end
def expect_badge(status)
- svg = Nokogiri::HTML.parse(page.body)
+ svg = Nokogiri::XML.parse(page.body)
expect(page.response_headers).to include('Content-Type' => 'image/svg+xml')
expect(svg.at(%Q{text:contains("#{status}")})).to be_truthy
end
diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb
index 7e1d9bb4056..fa54c93df0f 100644
--- a/features/steps/shared/builds.rb
+++ b/features/steps/shared/builds.rb
@@ -10,7 +10,7 @@ module SharedBuilds
@build = create(:ci_build, commit: @ci_commit)
end
- step 'recent build is successfull' do
+ step 'recent build is successful' do
@build.update_column(:status, 'success')
end
@@ -18,7 +18,7 @@ module SharedBuilds
@build.update_column(:status, 'failed')
end
- step 'project has an another build that is running' do
+ step 'project has another build that is running' do
create(:ci_build, commit: @ci_commit, name: 'second build', status: 'running')
end