diff options
Diffstat (limited to 'features')
| -rw-r--r-- | features/group.feature | 2 | ||||
| -rw-r--r-- | features/project/archived.feature (renamed from features/project/archived_projects.feature) | 0 | ||||
| -rw-r--r-- | features/project/commits/comments.feature (renamed from features/project/commits/commit_comments.feature) | 0 | ||||
| -rw-r--r-- | features/project/commits/diff_comments.feature (renamed from features/project/commits/commit_diff_comments.feature) | 0 | ||||
| -rw-r--r-- | features/project/commits/user_lookup.feature (renamed from features/project/commits/commits_user_lookup.feature) | 0 | ||||
| -rw-r--r-- | features/project/create.feature (renamed from features/project/create_project.feature) | 3 | ||||
| -rw-r--r-- | features/project/fork.feature (renamed from features/project/fork_project.feature) | 0 | ||||
| -rw-r--r-- | features/project/merge_requests.feature | 44 | ||||
| -rw-r--r-- | features/project/public.feature (renamed from features/project/public_projects.feature) | 0 | ||||
| -rw-r--r-- | features/project/service.feature | 6 | ||||
| -rw-r--r-- | features/public/projects.feature (renamed from features/public/public_projects.feature) | 0 | ||||
| -rw-r--r-- | features/snippets/discover.feature (renamed from features/snippets/discover_snippets.feature) | 0 | ||||
| -rw-r--r-- | features/snippets/user.feature (renamed from features/snippets/user_snippets.feature) | 0 | ||||
| -rw-r--r-- | features/steps/admin/active_tab.rb (renamed from features/steps/admin/admin_active_tab.rb) | 0 | ||||
| -rw-r--r-- | features/steps/admin/broadcast_messages.rb (renamed from features/steps/admin/admin_broadcast_messages.rb) | 0 | ||||
| -rw-r--r-- | features/steps/admin/groups.rb (renamed from features/steps/admin/admin_groups.rb) | 0 | ||||
| -rw-r--r-- | features/steps/admin/logs.rb (renamed from features/steps/admin/admin_logs.rb) | 0 | ||||
| -rw-r--r-- | features/steps/admin/projects.rb (renamed from features/steps/admin/admin_projects.rb) | 0 | ||||
| -rw-r--r-- | features/steps/admin/users.rb (renamed from features/steps/admin/admin_users.rb) | 0 | ||||
| -rw-r--r-- | features/steps/dashboard/active_tab.rb (renamed from features/steps/dashboard/dashboard_active_tab.rb) | 0 | ||||
| -rw-r--r-- | features/steps/dashboard/dashboard.rb | 2 | ||||
| -rw-r--r-- | features/steps/dashboard/event_filters.rb (renamed from features/steps/dashboard/dashboard_event_filters.rb) | 0 | ||||
| -rw-r--r-- | features/steps/dashboard/issues.rb (renamed from features/steps/dashboard/dashboard_issues.rb) | 0 | ||||
| -rw-r--r-- | features/steps/dashboard/merge_requests.rb (renamed from features/steps/dashboard/dashboard_merge_requests.rb) | 0 | ||||
| -rw-r--r-- | features/steps/dashboard/projects.rb (renamed from features/steps/dashboard/dashboard_projects.rb) | 0 | ||||
| -rw-r--r-- | features/steps/dashboard/search.rb (renamed from features/steps/dashboard/dashboard_search.rb) | 0 | ||||
| -rw-r--r-- | features/steps/dashboard/with_archived_projects.rb (renamed from features/steps/dashboard/dashboard_with_archived_projects.rb) | 0 | ||||
| -rw-r--r-- | features/steps/profile/active_tab.rb (renamed from features/steps/profile/profile_active_tab.rb) | 0 | ||||
| -rw-r--r-- | features/steps/profile/emails.rb (renamed from features/steps/profile/profile_emails.rb) | 0 | ||||
| -rw-r--r-- | features/steps/profile/notifications.rb (renamed from features/steps/profile/profile_notifications.rb) | 0 | ||||
| -rw-r--r-- | features/steps/profile/ssh_keys.rb (renamed from features/steps/profile/profile_ssh_keys.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/active_tab.rb (renamed from features/steps/project/project_active_tab.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/archived.rb (renamed from features/steps/project/project_archived.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/browse_branches.rb (renamed from features/steps/project/project_browse_branches.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/browse_commits.rb (renamed from features/steps/project/project_browse_commits.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/browse_commits_user_lookup.rb (renamed from features/steps/project/project_browse_commits_user_lookup.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/browse_files.rb (renamed from features/steps/project/project_browse_files.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/browse_git_repo.rb (renamed from features/steps/project/project_browse_git_repo.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/browse_tags.rb (renamed from features/steps/project/project_browse_tags.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/create.rb (renamed from features/steps/project/create_project.rb) | 2 | ||||
| -rw-r--r-- | features/steps/project/filter_labels.rb (renamed from features/steps/project/project_filter_labels.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/fork.rb (renamed from features/steps/project/project_fork.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/forked_merge_requests.rb (renamed from features/steps/project/project_forked_merge_requests.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/graph.rb (renamed from features/steps/project/project_graph.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/hooks.rb (renamed from features/steps/project/project_hooks.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/issue_tracker.rb (renamed from features/steps/project/project_issue_tracker.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/issues.rb (renamed from features/steps/project/project_issues.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/labels.rb (renamed from features/steps/project/project_labels.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/markdown_render.rb (renamed from features/steps/project/project_markdown_render.rb) | 11 | ||||
| -rw-r--r-- | features/steps/project/merge_requests.rb (renamed from features/steps/project/project_merge_requests.rb) | 68 | ||||
| -rw-r--r-- | features/steps/project/milestones.rb (renamed from features/steps/project/project_milestones.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/multiselect_blob.rb (renamed from features/steps/project/project_multiselect_blob.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/network_graph.rb (renamed from features/steps/project/project_network_graph.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/public.rb (renamed from features/steps/project/public_projects.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/redirects.rb | 2 | ||||
| -rw-r--r-- | features/steps/project/search_code.rb (renamed from features/steps/project/project_search_code.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/services.rb (renamed from features/steps/project/project_services.rb) | 18 | ||||
| -rw-r--r-- | features/steps/project/snippets.rb (renamed from features/steps/project/project_snippets.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/team_management.rb (renamed from features/steps/project/project_team_management.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/wall.rb (renamed from features/steps/project/project_wall.rb) | 0 | ||||
| -rw-r--r-- | features/steps/project/wiki.rb (renamed from features/steps/project/project_wiki.rb) | 0 | ||||
| -rw-r--r-- | features/steps/public/projects.rb (renamed from features/steps/public/projects_feature.rb) | 2 | ||||
| -rw-r--r-- | features/steps/shared/project.rb | 8 | ||||
| -rw-r--r-- | features/steps/snippets/discover.rb (renamed from features/steps/snippets/discover_snippets.rb) | 0 | ||||
| -rw-r--r-- | features/steps/snippets/user.rb (renamed from features/steps/snippets/user_snippets.rb) | 0 |
65 files changed, 152 insertions, 16 deletions
diff --git a/features/group.feature b/features/group.feature index 71282fb75ba..4e11bcba939 100644 --- a/features/group.feature +++ b/features/group.feature @@ -74,7 +74,7 @@ Feature: Groups When I visit group "Owned" members page Then I should see user "John Doe" in team list Then I should see user "Mary Jane" in team list - Then I should not see the "Remove User From Group" button for "Mary Jane" + Then I should not see the "Remove User From Group" button for "John Doe" @javascript Scenario: Guest should be able to remove himself from group diff --git a/features/project/archived_projects.feature b/features/project/archived.feature index 9aac29384ba..9aac29384ba 100644 --- a/features/project/archived_projects.feature +++ b/features/project/archived.feature diff --git a/features/project/commits/commit_comments.feature b/features/project/commits/comments.feature index a1aa745a681..a1aa745a681 100644 --- a/features/project/commits/commit_comments.feature +++ b/features/project/commits/comments.feature diff --git a/features/project/commits/commit_diff_comments.feature b/features/project/commits/diff_comments.feature index b26019f832f..b26019f832f 100644 --- a/features/project/commits/commit_diff_comments.feature +++ b/features/project/commits/diff_comments.feature diff --git a/features/project/commits/commits_user_lookup.feature b/features/project/commits/user_lookup.feature index f3864c0ab38..f3864c0ab38 100644 --- a/features/project/commits/commits_user_lookup.feature +++ b/features/project/commits/user_lookup.feature diff --git a/features/project/create_project.feature b/features/project/create.feature index 395a3218b2b..bb8e3a368ed 100644 --- a/features/project/create_project.feature +++ b/features/project/create.feature @@ -3,6 +3,7 @@ Feature: Create Project A user with ability to create a project Should be able to create a new one + @javascript Scenario: User create a project Given I sign in as a user When I visit new project page @@ -19,4 +20,4 @@ Feature: Create Project And I click on HTTP Then Remote url should update to http link And If I click on SSH - Then Remote url should update to ssh link
\ No newline at end of file + Then Remote url should update to ssh link diff --git a/features/project/fork_project.feature b/features/project/fork.feature index dc477ca3bf3..dc477ca3bf3 100644 --- a/features/project/fork_project.feature +++ b/features/project/fork.feature diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index 435c47a276c..6a2ba7e3b28 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -95,3 +95,47 @@ Feature: Project Merge Requests Given I visit merge request page "Bug NS-04" And I leave a comment with a header containing "Comment with a header" Then The comment with the header should not have an ID + + # Toggling inline comments + + @javascript + Scenario: I hide comments on a merge request diff with comments in a single file + Given project "Shop" have "Bug NS-05" open merge request with diffs inside + And I visit merge request page "Bug NS-05" + And I switch to the diff tab + And I leave a comment like "Line is wrong" on line 39 of the second file + And I click link "Hide inline discussion" of the second file + Then I should not see a comment like "Line is wrong" in the second file + + @javascript + Scenario: I show comments on a merge request diff with comments in a single file + Given project "Shop" have "Bug NS-05" open merge request with diffs inside + And I visit merge request page "Bug NS-05" + And I switch to the diff tab + And I leave a comment like "Line is wrong" on line 39 of the second file + And I click link "Hide inline discussion" of the second file + And I click link "Show inline discussion" of the second file + Then I should see a comment like "Line is wrong" in the second file + + @javascript + Scenario: I hide comments on a merge request diff with comments in multiple files + Given project "Shop" have "Bug NS-05" open merge request with diffs inside + And I visit merge request page "Bug NS-05" + And I switch to the diff tab + And I leave a comment like "Line is correct" on line 12 of the first file + And I leave a comment like "Line is wrong" on line 39 of the second file + And I click link "Hide inline discussion" of the second file + Then I should not see a comment like "Line is wrong" in the second file + And I should still see a comment like "Line is correct" in the first file + + @javascript + Scenario: I show comments on a merge request diff with comments in multiple files + Given project "Shop" have "Bug NS-05" open merge request with diffs inside + And I visit merge request page "Bug NS-05" + And I switch to the diff tab + And I leave a comment like "Line is correct" on line 12 of the first file + And I leave a comment like "Line is wrong" on line 39 of the second file + And I click link "Hide inline discussion" of the second file + And I click link "Show inline discussion" of the second file + Then I should see a comment like "Line is wrong" in the second file + And I should still see a comment like "Line is correct" in the first file diff --git a/features/project/public_projects.feature b/features/project/public.feature index c5a9da14c54..c5a9da14c54 100644 --- a/features/project/public_projects.feature +++ b/features/project/public.feature diff --git a/features/project/service.feature b/features/project/service.feature index 46b983e8f9a..a5af065c9e7 100644 --- a/features/project/service.feature +++ b/features/project/service.feature @@ -37,6 +37,12 @@ Feature: Project Services And I fill Assembla settings Then I should see Assembla service settings saved + Scenario: Activate Slack service + When I visit project "Shop" services page + And I click Slack service link + And I fill Slack settings + Then I should see Slack service settings saved + Scenario: Activate email on push service When I visit project "Shop" services page And I click email on push service link diff --git a/features/public/public_projects.feature b/features/public/projects.feature index 57fe834b4bf..57fe834b4bf 100644 --- a/features/public/public_projects.feature +++ b/features/public/projects.feature diff --git a/features/snippets/discover_snippets.feature b/features/snippets/discover.feature index d6fd2cd7808..d6fd2cd7808 100644 --- a/features/snippets/discover_snippets.feature +++ b/features/snippets/discover.feature diff --git a/features/snippets/user_snippets.feature b/features/snippets/user.feature index 4c8a91501c4..4c8a91501c4 100644 --- a/features/snippets/user_snippets.feature +++ b/features/snippets/user.feature diff --git a/features/steps/admin/admin_active_tab.rb b/features/steps/admin/active_tab.rb index ccafe09c18f..ccafe09c18f 100644 --- a/features/steps/admin/admin_active_tab.rb +++ b/features/steps/admin/active_tab.rb diff --git a/features/steps/admin/admin_broadcast_messages.rb b/features/steps/admin/broadcast_messages.rb index a35fa34a3a2..a35fa34a3a2 100644 --- a/features/steps/admin/admin_broadcast_messages.rb +++ b/features/steps/admin/broadcast_messages.rb diff --git a/features/steps/admin/admin_groups.rb b/features/steps/admin/groups.rb index 9c1bcfefb9c..9c1bcfefb9c 100644 --- a/features/steps/admin/admin_groups.rb +++ b/features/steps/admin/groups.rb diff --git a/features/steps/admin/admin_logs.rb b/features/steps/admin/logs.rb index 83958545c4d..83958545c4d 100644 --- a/features/steps/admin/admin_logs.rb +++ b/features/steps/admin/logs.rb diff --git a/features/steps/admin/admin_projects.rb b/features/steps/admin/projects.rb index b410b23851b..b410b23851b 100644 --- a/features/steps/admin/admin_projects.rb +++ b/features/steps/admin/projects.rb diff --git a/features/steps/admin/admin_users.rb b/features/steps/admin/users.rb index 659008dd875..659008dd875 100644 --- a/features/steps/admin/admin_users.rb +++ b/features/steps/admin/users.rb diff --git a/features/steps/dashboard/dashboard_active_tab.rb b/features/steps/dashboard/active_tab.rb index 8f5f0eed816..8f5f0eed816 100644 --- a/features/steps/dashboard/dashboard_active_tab.rb +++ b/features/steps/dashboard/active_tab.rb diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb index 3526006c94a..394acd3fe8f 100644 --- a/features/steps/dashboard/dashboard.rb +++ b/features/steps/dashboard/dashboard.rb @@ -25,7 +25,7 @@ class Dashboard < Spinach::FeatureSteps find("#merge_request_target_project_id").value.should == @project.id.to_s find("#merge_request_source_branch").value.should == "new_design" find("#merge_request_target_branch").value.should == "master" - find("#merge_request_title").value.should == "New Design" + find("#merge_request_title").value.should == "New design" end Given 'user with name "John Doe" joined project "Shop"' do diff --git a/features/steps/dashboard/dashboard_event_filters.rb b/features/steps/dashboard/event_filters.rb index d0fe5c9b64b..d0fe5c9b64b 100644 --- a/features/steps/dashboard/dashboard_event_filters.rb +++ b/features/steps/dashboard/event_filters.rb diff --git a/features/steps/dashboard/dashboard_issues.rb b/features/steps/dashboard/issues.rb index 1344edfa80b..1344edfa80b 100644 --- a/features/steps/dashboard/dashboard_issues.rb +++ b/features/steps/dashboard/issues.rb diff --git a/features/steps/dashboard/dashboard_merge_requests.rb b/features/steps/dashboard/merge_requests.rb index 62d84506c49..62d84506c49 100644 --- a/features/steps/dashboard/dashboard_merge_requests.rb +++ b/features/steps/dashboard/merge_requests.rb diff --git a/features/steps/dashboard/dashboard_projects.rb b/features/steps/dashboard/projects.rb index 85251565446..85251565446 100644 --- a/features/steps/dashboard/dashboard_projects.rb +++ b/features/steps/dashboard/projects.rb diff --git a/features/steps/dashboard/dashboard_search.rb b/features/steps/dashboard/search.rb index 32966a8617a..32966a8617a 100644 --- a/features/steps/dashboard/dashboard_search.rb +++ b/features/steps/dashboard/search.rb diff --git a/features/steps/dashboard/dashboard_with_archived_projects.rb b/features/steps/dashboard/with_archived_projects.rb index 1bc69555b56..1bc69555b56 100644 --- a/features/steps/dashboard/dashboard_with_archived_projects.rb +++ b/features/steps/dashboard/with_archived_projects.rb diff --git a/features/steps/profile/profile_active_tab.rb b/features/steps/profile/active_tab.rb index ee9f5f201cf..ee9f5f201cf 100644 --- a/features/steps/profile/profile_active_tab.rb +++ b/features/steps/profile/active_tab.rb diff --git a/features/steps/profile/profile_emails.rb b/features/steps/profile/emails.rb index 99588c85991..99588c85991 100644 --- a/features/steps/profile/profile_emails.rb +++ b/features/steps/profile/emails.rb diff --git a/features/steps/profile/profile_notifications.rb b/features/steps/profile/notifications.rb index e884df3098e..e884df3098e 100644 --- a/features/steps/profile/profile_notifications.rb +++ b/features/steps/profile/notifications.rb diff --git a/features/steps/profile/profile_ssh_keys.rb b/features/steps/profile/ssh_keys.rb index 65ca824bb5b..65ca824bb5b 100644 --- a/features/steps/profile/profile_ssh_keys.rb +++ b/features/steps/profile/ssh_keys.rb diff --git a/features/steps/project/project_active_tab.rb b/features/steps/project/active_tab.rb index dcc252f4765..dcc252f4765 100644 --- a/features/steps/project/project_active_tab.rb +++ b/features/steps/project/active_tab.rb diff --git a/features/steps/project/project_archived.rb b/features/steps/project/archived.rb index dfbe762c438..dfbe762c438 100644 --- a/features/steps/project/project_archived.rb +++ b/features/steps/project/archived.rb diff --git a/features/steps/project/project_browse_branches.rb b/features/steps/project/browse_branches.rb index 30c8cef80c8..30c8cef80c8 100644 --- a/features/steps/project/project_browse_branches.rb +++ b/features/steps/project/browse_branches.rb diff --git a/features/steps/project/project_browse_commits.rb b/features/steps/project/browse_commits.rb index d667b58240f..d667b58240f 100644 --- a/features/steps/project/project_browse_commits.rb +++ b/features/steps/project/browse_commits.rb diff --git a/features/steps/project/project_browse_commits_user_lookup.rb b/features/steps/project/browse_commits_user_lookup.rb index 328be373553..328be373553 100644 --- a/features/steps/project/project_browse_commits_user_lookup.rb +++ b/features/steps/project/browse_commits_user_lookup.rb diff --git a/features/steps/project/project_browse_files.rb b/features/steps/project/browse_files.rb index 069086d5eac..069086d5eac 100644 --- a/features/steps/project/project_browse_files.rb +++ b/features/steps/project/browse_files.rb diff --git a/features/steps/project/project_browse_git_repo.rb b/features/steps/project/browse_git_repo.rb index cd9a60f49cb..cd9a60f49cb 100644 --- a/features/steps/project/project_browse_git_repo.rb +++ b/features/steps/project/browse_git_repo.rb diff --git a/features/steps/project/project_browse_tags.rb b/features/steps/project/browse_tags.rb index 0cbfa0d80aa..0cbfa0d80aa 100644 --- a/features/steps/project/project_browse_tags.rb +++ b/features/steps/project/browse_tags.rb diff --git a/features/steps/project/create_project.rb b/features/steps/project/create.rb index b59345e7078..b42e5bd3623 100644 --- a/features/steps/project/create_project.rb +++ b/features/steps/project/create.rb @@ -8,8 +8,8 @@ class CreateProject < Spinach::FeatureSteps end Then 'I should see project page' do - current_path.should == project_path(Project.last) page.should have_content "Empty" + current_path.should == project_path(Project.last) end And 'I should see empty project instuctions' do diff --git a/features/steps/project/project_filter_labels.rb b/features/steps/project/filter_labels.rb index 5926d69d6c7..5926d69d6c7 100644 --- a/features/steps/project/project_filter_labels.rb +++ b/features/steps/project/filter_labels.rb diff --git a/features/steps/project/project_fork.rb b/features/steps/project/fork.rb index c00d9014b1d..c00d9014b1d 100644 --- a/features/steps/project/project_fork.rb +++ b/features/steps/project/fork.rb diff --git a/features/steps/project/project_forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb index df69cb75437..df69cb75437 100644 --- a/features/steps/project/project_forked_merge_requests.rb +++ b/features/steps/project/forked_merge_requests.rb diff --git a/features/steps/project/project_graph.rb b/features/steps/project/graph.rb index 89fe5fdeadf..89fe5fdeadf 100644 --- a/features/steps/project/project_graph.rb +++ b/features/steps/project/graph.rb diff --git a/features/steps/project/project_hooks.rb b/features/steps/project/hooks.rb index 19ff3244543..19ff3244543 100644 --- a/features/steps/project/project_hooks.rb +++ b/features/steps/project/hooks.rb diff --git a/features/steps/project/project_issue_tracker.rb b/features/steps/project/issue_tracker.rb index c2fd4e15c9e..c2fd4e15c9e 100644 --- a/features/steps/project/project_issue_tracker.rb +++ b/features/steps/project/issue_tracker.rb diff --git a/features/steps/project/project_issues.rb b/features/steps/project/issues.rb index a92fd50584d..a92fd50584d 100644 --- a/features/steps/project/project_issues.rb +++ b/features/steps/project/issues.rb diff --git a/features/steps/project/project_labels.rb b/features/steps/project/labels.rb index 0907cdb526f..0907cdb526f 100644 --- a/features/steps/project/project_labels.rb +++ b/features/steps/project/labels.rb diff --git a/features/steps/project/project_markdown_render.rb b/features/steps/project/markdown_render.rb index 8fbf2753aa7..c94de283069 100644 --- a/features/steps/project/project_markdown_render.rb +++ b/features/steps/project/markdown_render.rb @@ -203,7 +203,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps end And 'I add various links to the wiki page' do - fill_in "wiki[content]", with: "[test](test)\n[GitLab API doc](doc/api/README.md)\n[Rake tasks](doc/raketasks)\n" + fill_in "wiki[content]", with: "[test](test)\n[GitLab API doc](api)\n[Rake tasks](raketasks)\n" fill_in "wiki[message]", with: "Adding links to wiki" click_button "Create page" end @@ -242,8 +242,8 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps end Then 'I see Gitlab API document' do - current_path.should == project_blob_path(@project, "master/doc/api/README.md") - page.should have_content "Status codes" + current_path.should == project_wiki_path(@project, "api") + page.should have_content "Editing" end And 'I click on Rake tasks link' do @@ -251,9 +251,8 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps end Then 'I see Rake tasks directory' do - current_path.should == project_tree_path(@project, "master/doc/raketasks") - page.should have_content "backup_restore.md" - page.should have_content "maintenance.md" + current_path.should == project_wiki_path(@project, "raketasks") + page.should have_content "Editing" end Given 'I go directory which contains README file' do diff --git a/features/steps/project/project_merge_requests.rb b/features/steps/project/merge_requests.rb index 813e7439b2c..f42eb6377ce 100644 --- a/features/steps/project/project_merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -182,6 +182,62 @@ class ProjectMergeRequests < Spinach::FeatureSteps end end + step 'I click link "Hide inline discussion" of the second file' do + within '.files [id^=diff]:nth-child(2)' do + click_link "Diff comments" + end + end + + step 'I click link "Show inline discussion" of the second file' do + within '.files [id^=diff]:nth-child(2)' do + click_link "Diff comments" + end + end + + step 'I should not see a comment like "Line is wrong" in the second file' do + within '.files [id^=diff]:nth-child(2)' do + page.should_not have_visible_content "Line is wrong" + end + end + + step 'I should see a comment like "Line is wrong" in the second file' do + within '.files [id^=diff]:nth-child(2) .note-text' do + page.should have_visible_content "Line is wrong" + end + end + + step 'I leave a comment like "Line is correct" on line 12 of the first file' do + init_diff_note_first_file + + within(".js-discussion-note-form") do + fill_in "note_note", with: "Line is correct" + click_button "Add Comment" + end + + within ".files [id^=diff]:nth-child(1) .note-text" do + page.should have_content "Line is correct" + end + end + + step 'I leave a comment like "Line is wrong" on line 39 of the second file' do + init_diff_note_second_file + + within(".js-discussion-note-form") do + fill_in "note_note", with: "Line is wrong" + click_button "Add Comment" + end + + within ".files [id^=diff]:nth-child(2) .note-text" do + page.should have_content "Line is wrong" + end + end + + step 'I should still see a comment like "Line is correct" in the first file' do + within '.files [id^=diff]:nth-child(1) .note-text' do + page.should have_visible_content "Line is correct" + end + end + def project @project ||= Project.find_by!(name: "Shop") end @@ -204,4 +260,16 @@ class ProjectMergeRequests < Spinach::FeatureSteps page.should have_content message end end + + def init_diff_note_first_file + find('a[data-line-code="a5cc2925ca8258af241be7e5b0381edf30266302_12_12"]').click + end + + def init_diff_note_second_file + find('a[data-line-code="8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d_28_39"]').click + end + + def have_visible_content (text) + have_css("*", text: text, visible: true) + end end diff --git a/features/steps/project/project_milestones.rb b/features/steps/project/milestones.rb index 9ce18fbaabd..9ce18fbaabd 100644 --- a/features/steps/project/project_milestones.rb +++ b/features/steps/project/milestones.rb diff --git a/features/steps/project/project_multiselect_blob.rb b/features/steps/project/multiselect_blob.rb index 3d330e837c1..3d330e837c1 100644 --- a/features/steps/project/project_multiselect_blob.rb +++ b/features/steps/project/multiselect_blob.rb diff --git a/features/steps/project/project_network_graph.rb b/features/steps/project/network_graph.rb index 1c5cfcc6c68..1c5cfcc6c68 100644 --- a/features/steps/project/project_network_graph.rb +++ b/features/steps/project/network_graph.rb diff --git a/features/steps/project/public_projects.rb b/features/steps/project/public.rb index 7063e7d56ae..7063e7d56ae 100644 --- a/features/steps/project/public_projects.rb +++ b/features/steps/project/public.rb diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb index 76ffea1bb6f..cfa4ce82be3 100644 --- a/features/steps/project/redirects.rb +++ b/features/steps/project/redirects.rb @@ -4,7 +4,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps include SharedProject step 'public project "Community"' do - create :project, name: 'Community', visibility_level: Gitlab::VisibilityLevel::PUBLIC + create :project, :public, name: 'Community' end step 'private project "Enterprise"' do diff --git a/features/steps/project/project_search_code.rb b/features/steps/project/search_code.rb index d117b019a15..d117b019a15 100644 --- a/features/steps/project/project_search_code.rb +++ b/features/steps/project/search_code.rb diff --git a/features/steps/project/project_services.rb b/features/steps/project/services.rb index 54b3f18e084..0594a08a5e7 100644 --- a/features/steps/project/project_services.rb +++ b/features/steps/project/services.rb @@ -100,4 +100,22 @@ class ProjectServices < Spinach::FeatureSteps step 'I should see email on push service settings saved' do find_field('Recipients').value.should == 'qa@company.name' end + + step 'I click Slack service link' do + click_link 'Slack' + end + + step 'I fill Slack settings' do + check 'Active' + fill_in 'Subdomain', with: 'gitlab' + fill_in 'Room', with: '#gitlab' + fill_in 'Token', with: 'verySecret' + click_button 'Save' + end + + step 'I should see Slack service settings saved' do + find_field('Subdomain').value.should == 'gitlab' + find_field('Room').value.should == '#gitlab' + find_field('Token').value.should == 'verySecret' + end end diff --git a/features/steps/project/project_snippets.rb b/features/steps/project/snippets.rb index c3a76bea269..c3a76bea269 100644 --- a/features/steps/project/project_snippets.rb +++ b/features/steps/project/snippets.rb diff --git a/features/steps/project/project_team_management.rb b/features/steps/project/team_management.rb index ffc5016529f..ffc5016529f 100644 --- a/features/steps/project/project_team_management.rb +++ b/features/steps/project/team_management.rb diff --git a/features/steps/project/project_wall.rb b/features/steps/project/wall.rb index 7c61580eb2c..7c61580eb2c 100644 --- a/features/steps/project/project_wall.rb +++ b/features/steps/project/wall.rb diff --git a/features/steps/project/project_wiki.rb b/features/steps/project/wiki.rb index 6146599cc4a..6146599cc4a 100644 --- a/features/steps/project/project_wiki.rb +++ b/features/steps/project/wiki.rb diff --git a/features/steps/public/projects_feature.rb b/features/steps/public/projects.rb index eb1d235f435..7c7311bb91c 100644 --- a/features/steps/public/projects_feature.rb +++ b/features/steps/public/projects.rb @@ -4,7 +4,7 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps include SharedProject step 'public empty project "Empty Public Project"' do - create :empty_project, name: 'Empty Public Project', visibility_level: Gitlab::VisibilityLevel::PUBLIC + create :empty_project, :public, name: 'Empty Public Project' end step 'I should see project "Empty Public Project"' do diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index f35beab8af2..f8cb753b78f 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -79,7 +79,7 @@ module SharedProject end step 'internal project "Internal"' do - create :project, name: 'Internal', visibility_level: Gitlab::VisibilityLevel::INTERNAL + create :project, :internal, name: 'Internal' end step 'I should see project "Internal"' do @@ -91,7 +91,7 @@ module SharedProject end step 'public project "Community"' do - create :project, name: 'Community', visibility_level: Gitlab::VisibilityLevel::PUBLIC + create :project, :public, name: 'Community' end step 'I should see project "Community"' do @@ -112,14 +112,14 @@ module SharedProject step '"John Doe" is authorized to internal project "Internal"' do user = user_exists("John Doe", username: "john_doe") project = Project.find_by(name: "Internal") - project ||= create :project, name: 'Internal', visibility_level: Gitlab::VisibilityLevel::INTERNAL + project ||= create :project, :internal, name: 'Internal' project.team << [user, :master] end step '"John Doe" is authorized to public project "Community"' do user = user_exists("John Doe", username: "john_doe") project = Project.find_by(name: "Community") - project ||= create :project, name: 'Community', visibility_level: Gitlab::VisibilityLevel::PUBLIC + project ||= create :project, :public, name: 'Community' project.team << [user, :master] end end diff --git a/features/steps/snippets/discover_snippets.rb b/features/steps/snippets/discover.rb index 09337937002..09337937002 100644 --- a/features/steps/snippets/discover_snippets.rb +++ b/features/steps/snippets/discover.rb diff --git a/features/steps/snippets/user_snippets.rb b/features/steps/snippets/user.rb index 2d7ffc866e7..2d7ffc866e7 100644 --- a/features/steps/snippets/user_snippets.rb +++ b/features/steps/snippets/user.rb |
