summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-09-06 16:23:17 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-09-06 16:23:17 +0800
commitad0511f5b07504f63ce89b770f11cc360f5f914a (patch)
tree448e6452b2a032a7213b1efbc593c48dd44d8acb /features
parentda1acf04cef4cd7ee53f9da7bb870ba226ed1441 (diff)
parentad599eb65c8ce483a7faaffe226ec7ce53da0f55 (diff)
downloadgitlab-ce-ad0511f5b07504f63ce89b770f11cc360f5f914a.tar.gz
Merge remote-tracking branch 'upstream/master' into pipeline-hooks
* upstream/master: (368 commits) Don't fail on an empty database Refactor authorization_for_merge_requests.md Support MySQL too, when removing gitorious from import_sources Remove gitorious from import_sources on ApplicationSetting model Add links to new docs in merge_requests.md and workflow/README.md Move merge request versions to its own document Move "Only allow merge requests to be merged if the build succeeds" to new location Move revert_changes.md to new location Move cherry_pick_changes.md to new location Move `wip_merge_requests.md` to a new location Move merge_when_build_succeeds.md to new location Fix missing flash messages on service edit page Move authorization_for_merge_requests.md to new location Move `workflow/merge_requests.md` to `user/project/merge_requests.md` Update README.md Fix randomly failing specs in expand_collapse_diff_spec: Add link on API docs index page Move CHANGELOG entries of !5361, !5451 and !5887 from 8.11 to 8.12 Remove suggested colors hover underline Fix markdown anchor icon interaction ...
Diffstat (limited to 'features')
-rw-r--r--features/dashboard/todos.feature20
-rw-r--r--features/steps/dashboard/todos.rb24
-rw-r--r--features/steps/project/project.rb2
-rw-r--r--features/steps/shared/project.rb6
4 files changed, 23 insertions, 29 deletions
diff --git a/features/dashboard/todos.feature b/features/dashboard/todos.feature
index 42f5d6d2af7..0b23bbb7951 100644
--- a/features/dashboard/todos.feature
+++ b/features/dashboard/todos.feature
@@ -23,26 +23,6 @@ Feature: Dashboard Todos
Then I should see all todos marked as done
@javascript
- Scenario: I filter by project
- Given I filter by "Enterprise"
- Then I should not see todos
-
- @javascript
- Scenario: I filter by author
- Given I filter by "John Doe"
- Then I should not see todos related to "Mary Jane" in the list
-
- @javascript
- Scenario: I filter by type
- Given I filter by "Issue"
- Then I should not see todos related to "Merge Requests" in the list
-
- @javascript
- Scenario: I filter by action
- Given I filter by "Mentioned"
- Then I should not see todos related to "Assignments" in the list
-
- @javascript
Scenario: I click on a todo row
Given I click on the todo
Then I should be directed to the corresponding page
diff --git a/features/steps/dashboard/todos.rb b/features/steps/dashboard/todos.rb
index 60152d3da55..344b6fda9a6 100644
--- a/features/steps/dashboard/todos.rb
+++ b/features/steps/dashboard/todos.rb
@@ -3,7 +3,6 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
include SharedPaths
include SharedProject
include SharedUser
- include Select2Helper
step '"John Doe" is a developer of project "Shop"' do
project.team << [john_doe, :developer]
@@ -54,7 +53,8 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
page.within('.todos-pending-count') { expect(page).to have_content '0' }
expect(page).to have_content 'To do 0'
expect(page).to have_content 'Done 4'
- expect(page).not_to have_link project.name_with_namespace
+ expect(page).to have_content "You're all done!"
+ expect('.prepend-top-default').not_to have_link project.name_with_namespace
should_not_see_todo "John Doe assigned you merge request #{merge_request.to_reference}"
should_not_see_todo "John Doe mentioned you on issue #{issue.to_reference}"
should_not_see_todo "John Doe assigned you issue #{issue.to_reference}"
@@ -79,19 +79,31 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
end
step 'I filter by "Enterprise"' do
- select2(enterprise.id, from: "#project_id")
+ click_button 'Project'
+ page.within '.dropdown-menu-project' do
+ click_link enterprise.name_with_namespace
+ end
end
step 'I filter by "John Doe"' do
- select2(john_doe.id, from: "#author_id")
+ click_button 'Author'
+ page.within '.dropdown-menu-author' do
+ click_link john_doe.username
+ end
end
step 'I filter by "Issue"' do
- select2('Issue', from: "#type")
+ click_button 'Type'
+ page.within '.dropdown-menu-type' do
+ click_link 'Issue'
+ end
end
step 'I filter by "Mentioned"' do
- select2("#{Todo::MENTIONED}", from: '#action_id')
+ click_button 'Action'
+ page.within '.dropdown-menu-action' do
+ click_link 'Mentioned'
+ end
end
step 'I should not see todos' do
diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb
index 76fefee9254..975c879149e 100644
--- a/features/steps/project/project.rb
+++ b/features/steps/project/project.rb
@@ -5,7 +5,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
step 'change project settings' do
fill_in 'project_name_edit', with: 'NewName'
- uncheck 'project_issues_enabled'
+ select 'Disabled', from: 'project_project_feature_attributes_issues_access_level'
end
step 'I save project' do
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index 0b4920883b8..afbd8ef1233 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -15,7 +15,7 @@ module SharedProject
# Create a specific project called "Shop"
step 'I own project "Shop"' do
@project = Project.find_by(name: "Shop")
- @project ||= create(:project, name: "Shop", namespace: @user.namespace, snippets_enabled: true)
+ @project ||= create(:project, name: "Shop", namespace: @user.namespace)
@project.team << [@user, :master]
end
@@ -41,6 +41,8 @@ module SharedProject
step 'I own project "Forum"' do
@project = Project.find_by(name: "Forum")
@project ||= create(:project, name: "Forum", namespace: @user.namespace, path: 'forum_project')
+ @project.build_project_feature
+ @project.project_feature.save
@project.team << [@user, :master]
end
@@ -95,7 +97,7 @@ module SharedProject
step 'I should see project settings' do
expect(current_path).to eq edit_namespace_project_path(@project.namespace, @project)
expect(page).to have_content("Project name")
- expect(page).to have_content("Features")
+ expect(page).to have_content("Feature Visibility")
end
def current_project