summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/groups.feature4
-rw-r--r--features/profile/notifications.feature6
-rw-r--r--features/project/forked_merge_requests.feature1
-rw-r--r--features/project/merge_requests.feature1
-rw-r--r--features/project/project.feature9
-rw-r--r--features/steps/dashboard/todos.rb2
-rw-r--r--features/steps/group/milestones.rb4
-rw-r--r--features/steps/groups.rb4
-rw-r--r--features/steps/profile/notifications.rb10
-rw-r--r--features/steps/project/active_tab.rb4
-rw-r--r--features/steps/project/fork.rb2
-rw-r--r--features/steps/project/forked_merge_requests.rb22
-rw-r--r--features/steps/project/issues/labels.rb2
-rw-r--r--features/steps/project/merge_requests.rb8
-rw-r--r--features/steps/project/project.rb12
-rw-r--r--features/steps/project/source/browse_files.rb7
-rw-r--r--features/steps/shared/diff_note.rb2
-rw-r--r--features/steps/shared/issuable.rb7
-rw-r--r--features/steps/shared/project_tab.rb2
19 files changed, 79 insertions, 30 deletions
diff --git a/features/groups.feature b/features/groups.feature
index 49e939807b5..419a5d3963d 100644
--- a/features/groups.feature
+++ b/features/groups.feature
@@ -7,6 +7,10 @@ Feature: Groups
When I visit group "NonExistentGroup" page
Then page status code should be 404
+ Scenario: I should have back to group button
+ When I visit group "Owned" page
+ Then I should see back to dashboard button
+
@javascript
Scenario: I should see group "Owned" dashboard list
When I visit group "Owned" page
diff --git a/features/profile/notifications.feature b/features/profile/notifications.feature
index 55997d44dec..ef8743932f5 100644
--- a/features/profile/notifications.feature
+++ b/features/profile/notifications.feature
@@ -7,3 +7,9 @@ Feature: Profile Notifications
Scenario: I visit notifications tab
When I visit profile notifications page
Then I should see global notifications settings
+
+ @javascript
+ Scenario: I edit Project Notifications
+ Given I visit profile notifications page
+ When I select Mention setting from dropdown
+ Then I should see Notification saved message
diff --git a/features/project/forked_merge_requests.feature b/features/project/forked_merge_requests.feature
index 10bd6fec803..67f1e117f7f 100644
--- a/features/project/forked_merge_requests.feature
+++ b/features/project/forked_merge_requests.feature
@@ -4,6 +4,7 @@ Feature: Project Forked Merge Requests
And I am a member of project "Shop"
And I have a project forked off of "Shop" called "Forked Shop"
+ @javascript
Scenario: I submit new unassigned merge request to a forked project
Given I visit project "Forked Shop" merge requests page
And I click link "New Merge Request"
diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature
index 823658b4f24..ecda4ea8240 100644
--- a/features/project/merge_requests.feature
+++ b/features/project/merge_requests.feature
@@ -70,6 +70,7 @@ Feature: Project Merge Requests
When I click link "Reopen"
Then I should see reopened merge request "Bug NS-04"
+ @javascript
Scenario: I submit new unassigned merge request
Given I click link "New Merge Request"
And I submit new merge request "Wiki Feature"
diff --git a/features/project/project.feature b/features/project/project.feature
index aa22401c88e..f1f3ed26065 100644
--- a/features/project/project.feature
+++ b/features/project/project.feature
@@ -18,6 +18,15 @@ Feature: Project
Then I should see the default project avatar
And I should not see the "Remove avatar" button
+ Scenario: I should have back to group button
+ And project "Shop" belongs to group
+ And I visit project "Shop" page
+ Then I should see back to group button
+
+ Scenario: I should have back to group button
+ And I visit project "Shop" page
+ Then I should see back to dashboard button
+
Scenario: I should have readme on page
And I visit project "Shop" page
Then I should see project "Shop" README
diff --git a/features/steps/dashboard/todos.rb b/features/steps/dashboard/todos.rb
index 30b21b93ac7..a6e574f12a9 100644
--- a/features/steps/dashboard/todos.rb
+++ b/features/steps/dashboard/todos.rb
@@ -26,6 +26,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
end
step 'I should see todos assigned to me' do
+ page.within('.nav-sidebar') { expect(page).to have_content 'Todos 4' }
expect(page).to have_content 'To do 4'
expect(page).to have_content 'Done 0'
@@ -41,6 +42,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
click_link 'Done'
end
+ page.within('.nav-sidebar') { expect(page).to have_content 'Todos 3' }
expect(page).to have_content 'To do 3'
expect(page).to have_content 'Done 1'
should_not_see_todo "John Doe assigned you merge request !#{merge_request.iid}"
diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb
index b6ce5bc9cec..a167d259837 100644
--- a/features/steps/group/milestones.rb
+++ b/features/steps/group/milestones.rb
@@ -5,9 +5,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
include SharedUser
step 'I click on group milestones' do
- page.within '.nav-secondary' do
- click_link("Milestones")
- end
+ click_link 'Milestones'
end
step 'I should see group milestones index page has no milestones' do
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index 483370f41c6..e5b7db4c5e3 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -4,6 +4,10 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
include SharedGroup
include SharedUser
+ step 'I should see back to dashboard button' do
+ expect(page).to have_content 'Go to dashboard'
+ end
+
step 'I should see group "Owned"' do
expect(page).to have_content '@owned'
end
diff --git a/features/steps/profile/notifications.rb b/features/steps/profile/notifications.rb
index 447ea6d9d10..a96f35ada51 100644
--- a/features/steps/profile/notifications.rb
+++ b/features/steps/profile/notifications.rb
@@ -9,4 +9,14 @@ class Spinach::Features::ProfileNotifications < Spinach::FeatureSteps
step 'I should see global notifications settings' do
expect(page).to have_content "Notifications"
end
+
+ step 'I select Mention setting from dropdown' do
+ select 'mention', from: 'notification_setting_level'
+ end
+
+ step 'I should see Notification saved message' do
+ page.within '.flash-container' do
+ expect(page).to have_content 'Notification settings saved'
+ end
+ end
end
diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb
index 4584fc4d754..19d81453d8c 100644
--- a/features/steps/project/active_tab.rb
+++ b/features/steps/project/active_tab.rb
@@ -82,9 +82,7 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
# Sub Tabs: Issues
step 'I click the "Milestones" tab' do
- page.within '.nav-secondary' do
- click_link('Milestones')
- end
+ click_link('Milestones')
end
step 'I click the "Labels" tab' do
diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb
index d9b16afa9b8..527f7853da9 100644
--- a/features/steps/project/fork.rb
+++ b/features/steps/project/fork.rb
@@ -36,7 +36,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
end
step 'I goto the Merge Requests page' do
- page.within '.nav-secondary' do
+ page.within '.page-sidebar-expanded' do
click_link "Merge Requests"
end
end
diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb
index 7e4425ff662..612bb8fd8b1 100644
--- a/features/steps/project/forked_merge_requests.rb
+++ b/features/steps/project/forked_merge_requests.rb
@@ -34,10 +34,14 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step 'I fill out a "Merge Request On Forked Project" merge request' do
- select @forked_project.path_with_namespace, from: "merge_request_source_project_id"
- select @project.path_with_namespace, from: "merge_request_target_project_id"
- select "fix", from: "merge_request_source_branch"
- select "master", from: "merge_request_target_branch"
+ first('.js-source-project').click
+ first('.dropdown-source-project a', text: @forked_project.path_with_namespace)
+
+ first('.js-target-project').click
+ first('.dropdown-target-project a', text: @project.path_with_namespace)
+
+ first('.js-source-branch').click
+ first('.dropdown-source-branch .dropdown-content a', text: 'fix').click
click_button "Compare branches and continue"
@@ -115,10 +119,10 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step 'I fill out an invalid "Merge Request On Forked Project" merge request' do
- expect(find(:select, "merge_request_source_project_id", {}).value).to eq @forked_project.id.to_s
- expect(find(:select, "merge_request_target_project_id", {}).value).to eq @project.id.to_s
- expect(find(:select, "merge_request_source_branch", {}).value).to eq ""
- expect(find(:select, "merge_request_target_branch", {}).value).to eq "master"
+ expect(find_by_id("merge_request_source_project_id", visible: false).value).to eq @forked_project.id.to_s
+ expect(find_by_id("merge_request_target_project_id", visible: false).value).to eq @project.id.to_s
+ expect(find_by_id("merge_request_source_branch", visible: false).value).to eq nil
+ expect(find_by_id("merge_request_target_branch", visible: false).value).to eq "master"
click_button "Compare branches"
end
@@ -127,7 +131,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step 'the target repository should be the original repository' do
- expect(page).to have_select("merge_request_target_project_id", selected: @project.path_with_namespace)
+ expect(find_by_id("merge_request_target_project_id").value).to eq "#{@project.id}"
end
step 'I click "Assign to" dropdown"' do
diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb
index 2ab8956867b..0ca2d6257c3 100644
--- a/features/steps/project/issues/labels.rb
+++ b/features/steps/project/issues/labels.rb
@@ -15,7 +15,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
step 'I delete all labels' do
page.within '.labels' do
- page.all('.btn-remove').each do |remove|
+ page.all('.remove-row').each do |remove|
remove.click
sleep 0.05
end
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index a4f02b590ea..f0af0d097fa 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -93,8 +93,12 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I submit new merge request "Wiki Feature"' do
- select "fix", from: "merge_request_source_branch"
- select "feature", from: "merge_request_target_branch"
+ find('.js-source-branch').click
+ find('.dropdown-source-branch .dropdown-content a', text: 'fix').click
+
+ find('.js-target-branch').click
+ first('.dropdown-target-branch .dropdown-content a', text: 'feature').click
+
click_button "Compare branches"
fill_in "merge_request_title", with: "Wiki Feature"
click_button "Submit merge request"
diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb
index 8f1d4a223a9..ef185861e00 100644
--- a/features/steps/project/project.rb
+++ b/features/steps/project/project.rb
@@ -114,9 +114,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
end
step 'I should not see "Snippets" button' do
- page.within '.nav-secondary' do
- expect(page).not_to have_link 'Snippets'
- end
+ expect(page).not_to have_link 'Snippets'
end
step 'project "Shop" belongs to group' do
@@ -125,6 +123,14 @@ class Spinach::Features::Project < Spinach::FeatureSteps
@project.save!
end
+ step 'I should see back to dashboard button' do
+ expect(page).to have_content 'Go to dashboard'
+ end
+
+ step 'I should see back to group button' do
+ expect(page).to have_content 'Go to group'
+ end
+
step 'I click notifications drop down button' do
click_link 'notifications-button'
end
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index 243469b8e7d..e072505e5d7 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -213,13 +213,12 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I see Browse file link' do
- expect(page).to have_link 'Browse File »'
- expect(page).not_to have_link 'Browse Files »'
+ expect(page).to have_link 'Browse File'
+ expect(page).not_to have_link 'Browse Files'
end
step 'I see Browse code link' do
- expect(page).to have_link 'Browse Files »'
- expect(page).not_to have_link 'Browse File »'
+ expect(page).to have_link 'Browse Files'
expect(page).not_to have_link 'Browse Directory »'
end
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
index 32c3e99f450..1448c3f44cc 100644
--- a/features/steps/shared/diff_note.rb
+++ b/features/steps/shared/diff_note.rb
@@ -155,7 +155,7 @@ module SharedDiffNote
step 'I should see a discussion reply button' do
page.within(diff_file_selector) do
- expect(page).to have_button('Reply')
+ expect(page).to have_button('Reply...')
end
end
diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb
index b6d70a26c21..24b3fb6eacb 100644
--- a/features/steps/shared/issuable.rb
+++ b/features/steps/shared/issuable.rb
@@ -71,13 +71,16 @@ module SharedIssuable
step 'I should not see any related merge requests' do
page.within '.issue-details' do
- expect(page).not_to have_content('.merge-requests')
+ expect(page).not_to have_content('#merge-requests .merge-requests-title')
end
end
step 'I should see the "Enterprise fix" related merge request' do
- page.within '.merge-requests' do
+ page.within '#merge-requests .merge-requests-title' do
expect(page).to have_content('1 Related Merge Request')
+ end
+
+ page.within '#merge-requests ul' do
expect(page).to have_content('Enterprise fix')
end
end
diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb
index fa7d24ce611..4fc2ece79ff 100644
--- a/features/steps/shared/project_tab.rb
+++ b/features/steps/shared/project_tab.rb
@@ -41,7 +41,7 @@ module SharedProjectTab
end
step 'the active main tab should be Settings' do
- page.within '.nav-secondary' do
+ page.within '.nav-sidebar' do
expect(page).to have_content('Go to project')
end
end