summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2017-05-05 16:59:31 +0300
committerValery Sizov <valery@gitlab.com>2017-05-05 16:59:31 +0300
commit5004579b15b0585c0a26231d7422fb1d8086bd66 (patch)
treeb9d0096b88813af0d2cb38c173485f56aa62ebc7 /features
parent79b8323d11cc06911b996f327c6e06fd29cafea4 (diff)
parent10c1bf2d77fd0ab21309d0b136cbc0ac11f56c77 (diff)
downloadgitlab-ce-5004579b15b0585c0a26231d7422fb1d8086bd66.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into mia_backort[ci skip]
Diffstat (limited to 'features')
-rw-r--r--features/project/active_tab.feature7
-rw-r--r--features/project/builds/artifacts.feature3
-rw-r--r--features/project/deploy_keys.feature6
-rw-r--r--features/project/pages.feature11
-rw-r--r--features/steps/project/active_tab.rb6
-rw-r--r--features/steps/project/builds/artifacts.rb15
-rw-r--r--features/steps/project/deploy_keys.rb16
-rw-r--r--features/steps/project/merge_requests.rb7
-rw-r--r--features/steps/project/pages.rb16
-rw-r--r--features/steps/shared/note.rb4
10 files changed, 52 insertions, 39 deletions
diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature
index 0d6f7350181..34201cd8486 100644
--- a/features/project/active_tab.feature
+++ b/features/project/active_tab.feature
@@ -63,13 +63,6 @@ Feature: Project Active Tab
And no other sub tabs should be active
And the active main tab should be Settings
- Scenario: On Project Settings/Pages
- Given I visit my project's settings page
- And I click the "Pages" tab
- Then the active sub tab should be Pages
- And no other sub tabs should be active
- And the active main tab should be Settings
-
Scenario: On Project Members
Given I visit my project's members page
Then the active sub tab should be Members
diff --git a/features/project/builds/artifacts.feature b/features/project/builds/artifacts.feature
index 09094d638c9..5abc24949cf 100644
--- a/features/project/builds/artifacts.feature
+++ b/features/project/builds/artifacts.feature
@@ -46,13 +46,14 @@ Feature: Project Builds Artifacts
And I navigate to parent directory of directory with invalid name
Then I should not see directory with invalid name on the list
+ @javascript
Scenario: I download a single file from build artifacts
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 link to file within build artifacts
- Then download of a file extracted from build artifacts should start
+ Then I see a download link
@javascript
Scenario: I click on a row in an artifacts table
diff --git a/features/project/deploy_keys.feature b/features/project/deploy_keys.feature
index 960b4100ee5..6f1ed9ff5b6 100644
--- a/features/project/deploy_keys.feature
+++ b/features/project/deploy_keys.feature
@@ -3,28 +3,33 @@ Feature: Project Deploy Keys
Given I sign in as a user
And I own project "Shop"
+ @javascript
Scenario: I should see deploy keys list
Given project has deploy key
When I visit project deploy keys page
Then I should see project deploy key
+ @javascript
Scenario: I should see project deploy keys
Given other projects have deploy keys
When I visit project deploy keys page
Then I should see other project deploy key
And I should only see the same deploy key once
+ @javascript
Scenario: I should see public deploy keys
Given public deploy key exists
When I visit project deploy keys page
Then I should see public deploy key
+ @javascript
Scenario: I add new deploy key
Given I visit project deploy keys page
And I submit new deploy key
Then I should be on deploy keys page
And I should see newly created deploy key
+ @javascript
Scenario: I attach other project deploy key to project
Given other projects have deploy keys
And I visit project deploy keys page
@@ -32,6 +37,7 @@ Feature: Project Deploy Keys
Then I should be on deploy keys page
And I should see newly created deploy key
+ @javascript
Scenario: I attach public deploy key to project
Given public deploy key exists
And I visit project deploy keys page
diff --git a/features/project/pages.feature b/features/project/pages.feature
index 87d88348d09..56e47287b5c 100644
--- a/features/project/pages.feature
+++ b/features/project/pages.feature
@@ -3,10 +3,15 @@ Feature: Project Pages
Given I sign in as a user
And I own a project
- Scenario: Pages are disabled
+ Scenario: I cannot navigate to Pages settings if pages enabled
Given pages are disabled
- When I visit the Project Pages
- Then I should see that GitLab Pages are disabled
+ And I visit my project's settings page
+ Then I should not see the "Pages" tab
+
+ Scenario: I can navigate to Pages settings if pages enabled
+ Given pages are enabled
+ And I visit my project's settings page
+ Then I should see the "Pages" tab
Scenario: I can see the pages usage if not deployed
Given pages are enabled
diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb
index 4befd49ac81..5cd9bd38c9d 100644
--- a/features/steps/project/active_tab.rb
+++ b/features/steps/project/active_tab.rb
@@ -39,12 +39,6 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
end
end
- step 'I click the "Pages" tab' do
- page.within '.sub-nav' do
- click_link('Pages')
- end
- end
-
step 'I click the "Activity" tab' do
page.within '.sub-nav' do
click_link('Activity')
diff --git a/features/steps/project/builds/artifacts.rb b/features/steps/project/builds/artifacts.rb
index 3ec5c8e2f4f..eec375b0532 100644
--- a/features/steps/project/builds/artifacts.rb
+++ b/features/steps/project/builds/artifacts.rb
@@ -3,6 +3,7 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps
include SharedProject
include SharedBuilds
include RepoHelpers
+ include WaitForAjax
step 'I click artifacts download button' do
click_link 'Download'
@@ -78,19 +79,11 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps
step 'I click a link to file within build artifacts' do
page.within('.tree-table') { find_link('ci_artifacts.txt').click }
+ wait_for_ajax
end
- step 'download of a file extracted from build artifacts should start' do
- send_data = response_headers[Gitlab::Workhorse::SEND_DATA_HEADER]
-
- expect(send_data).to start_with('artifacts-entry:')
-
- base64_params = send_data.sub(/\Aartifacts\-entry:/, '')
- params = JSON.parse(Base64.urlsafe_decode64(base64_params))
-
- expect(params.keys).to eq(%w(Archive Entry))
- expect(params['Archive']).to end_with('build_artifacts.zip')
- expect(params['Entry']).to eq(Base64.encode64('ci_artifacts.txt'))
+ step 'I see a download link' do
+ expect(page).to have_link 'download it'
end
step 'I click a first row within build artifacts table' do
diff --git a/features/steps/project/deploy_keys.rb b/features/steps/project/deploy_keys.rb
index ec59a2c094e..8ad9d4a4741 100644
--- a/features/steps/project/deploy_keys.rb
+++ b/features/steps/project/deploy_keys.rb
@@ -8,19 +8,19 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step 'I should see project deploy key' do
- page.within '.deploy-keys' do
+ page.within(find('.deploy-keys')) do
expect(page).to have_content deploy_key.title
end
end
step 'I should see other project deploy key' do
- page.within '.deploy-keys' do
+ page.within(find('.deploy-keys')) do
expect(page).to have_content other_deploy_key.title
end
end
step 'I should see public deploy key' do
- page.within '.deploy-keys' do
+ page.within(find('.deploy-keys')) do
expect(page).to have_content public_deploy_key.title
end
end
@@ -40,7 +40,8 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step 'I should see newly created deploy key' do
- page.within '.deploy-keys' do
+ @project.reload
+ page.within(find('.deploy-keys')) do
expect(page).to have_content(deploy_key.title)
end
end
@@ -56,7 +57,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step 'I should only see the same deploy key once' do
- page.within '.deploy-keys' do
+ page.within(find('.deploy-keys')) do
expect(page).to have_selector('ul li', count: 1)
end
end
@@ -66,8 +67,9 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step 'I click attach deploy key' do
- page.within '.deploy-keys' do
- click_link 'Enable'
+ page.within(find('.deploy-keys')) do
+ click_button 'Enable'
+ expect(page).not_to have_selector('.fa-spinner')
end
end
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index a06b2f2911f..4b7d6cd840b 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -458,6 +458,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_button "Comment"
end
+ wait_for_ajax
+
page.within ".files>div:nth-child(2) .note-body > .note-text" do
expect(page).to have_content "Line is correct"
end
@@ -470,6 +472,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
fill_in "note_note", with: "Line is wrong on here"
click_button "Comment"
end
+
+ wait_for_ajax
end
step 'I should still see a comment like "Line is correct" in the second file' do
@@ -574,6 +578,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
fill_in "note_note", with: message
click_button "Comment"
end
+
+ wait_for_ajax
+
page.within(".notes_holder", visible: true) do
expect(page).to have_content message
end
diff --git a/features/steps/project/pages.rb b/features/steps/project/pages.rb
index 4045955a8b9..fea82d9fb57 100644
--- a/features/steps/project/pages.rb
+++ b/features/steps/project/pages.rb
@@ -18,14 +18,22 @@ class Spinach::Features::ProjectPages < Spinach::FeatureSteps
visit namespace_project_pages_path(@project.namespace, @project)
end
- step 'I should see that GitLab Pages are disabled' do
- expect(page).to have_content('GitLab Pages are disabled')
- end
-
step 'I should see the usage of GitLab Pages' do
expect(page).to have_content('Configure pages')
end
+ step 'I should see the "Pages" tab' do
+ page.within '.sub-nav' do
+ expect(page).to have_link('Pages')
+ end
+ end
+
+ step 'I should not see the "Pages" tab' do
+ page.within '.sub-nav' do
+ expect(page).not_to have_link('Pages')
+ end
+ end
+
step 'pages are deployed' do
pipeline = @project.ensure_pipeline('HEAD', @project.commit('HEAD').sha)
build = build(:ci_build,
diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb
index 7885cc7ab77..7d260025052 100644
--- a/features/steps/shared/note.rb
+++ b/features/steps/shared/note.rb
@@ -24,6 +24,8 @@ module SharedNote
fill_in "note[note]", with: "XML attached"
click_button "Comment"
end
+
+ wait_for_ajax
end
step 'I preview a comment text like "Bug fixed :smile:"' do
@@ -37,6 +39,8 @@ module SharedNote
page.within(".js-main-target-form") do
click_button "Comment"
end
+
+ wait_for_ajax
end
step 'I write a comment like ":+1: Nice"' do