summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-22 11:42:29 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-22 11:42:29 +0100
commitb75f6c68e591b1a6a279c454b7c5d1f6f8ecbbf8 (patch)
treed368e02b5425eed7d03f4b89ac7eceb0bda673d5
parent8be4e545635f0f01993290b4577dbe38e74c6bbf (diff)
downloadgitlab-ce-ci/test-build-artifacts-scripts.tar.gz
Add tests for clicking a row in build artifacts browserci/test-build-artifacts-scripts
-rw-r--r--features/project/builds/artifacts.feature9
-rw-r--r--features/steps/project/builds/artifacts.rb10
2 files changed, 19 insertions, 0 deletions
diff --git a/features/project/builds/artifacts.feature b/features/project/builds/artifacts.feature
index 1185854453a..52dc15f2eb6 100644
--- a/features/project/builds/artifacts.feature
+++ b/features/project/builds/artifacts.feature
@@ -51,3 +51,12 @@ Feature: Project Builds Artifacts
And I click artifacts browse button
And I click a link to file within build artifacts
Then download of a file extracted from build artifacts should start
+
+ @javascript
+ Scenario: I click on a row in an artifacts table
+ Given recent build has artifacts available
+ And recent build has artifacts metadata available
+ When I visit recent build details page
+ And I click artifacts browse button
+ And I click a first row within build artifacts table
+ Then page with a coresponding path is loading
diff --git a/features/steps/project/builds/artifacts.rb b/features/steps/project/builds/artifacts.rb
index 25f2f4e837c..1bdb57af9d1 100644
--- a/features/steps/project/builds/artifacts.rb
+++ b/features/steps/project/builds/artifacts.rb
@@ -73,4 +73,14 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps
expect(response_json[:archive]).to end_with('build_artifacts.zip')
expect(response_json[:entry]).to eq Base64.encode64('ci_artifacts.txt')
end
+
+ step 'I click a first row within build artifacts table' do
+ row = first('tr[data-link]')
+ @row_path = row['data-link']
+ row.click
+ end
+
+ step 'page with a coresponding path is loading' do
+ expect(current_path).to eq @row_path
+ end
end