diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-09-18 13:05:34 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-09-18 13:05:34 -0500 |
commit | 27a28d9970c28142aa4482b6f474b79ccaec2bec (patch) | |
tree | 715cd65e1e7847bf91d525c800435de96f255ef6 /features/steps | |
parent | 4c0beb6c024b25ff24c7c2ea966bacab0ee860d5 (diff) | |
parent | 9b13753302df7a3e8ef86c6af3f84066bde31a21 (diff) | |
download | gitlab-ce-27a28d9970c28142aa4482b6f474b79ccaec2bec.tar.gz |
Merge branch 'master' into sh-headless-chrome-support
* master: (97 commits)
Eliminate N+1 queries in loading discussions.json endpoint
Clean up read_registry scope changes
Add missing import statements
Improve “New project“ page description
Fix notification message when admin label was modified
Remove gaps under nav on build page
Replace the 'project/snippets.feature' spinach test with an rspec analog
Use correct group members path for members flyout link
Fix docs for lightweight tag creation via API
Replace the 'project/commits/revert.feature' spinach test with an rspec analog
Merge branch 'rs-incoming-email-domain-docs' into 'security-10-0'
Replace the 'project/archived.feature' spinach test with an rspec analog
Fix broken link in docs/api/wiki.md
Fixed the new sidebars width when browser has scrollbars
Improve 'spec/features/profiles/*' specs
Replace the 'search.feature' spinach test with an rspec analog
dedupe yarn packages
add dependency approvals (all MIT license)
update build image to latest with node 8.x, yarn 1.0.2, and chrome 61
Ensure we use `Entities::User` for non-admin `users/:id` API requests
...
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/project/archived.rb | 36 | ||||
-rw-r--r-- | features/steps/project/commits/revert.rb | 42 | ||||
-rw-r--r-- | features/steps/project/snippets.rb | 100 | ||||
-rw-r--r-- | features/steps/search.rb | 116 |
4 files changed, 0 insertions, 294 deletions
diff --git a/features/steps/project/archived.rb b/features/steps/project/archived.rb deleted file mode 100644 index e4847180be9..00000000000 --- a/features/steps/project/archived.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Spinach::Features::ProjectArchived < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - - When 'project "Forum" is archived' do - project = Project.find_by(name: "Forum") - project.update_attribute(:archived, true) - end - - When 'project "Shop" is archived' do - project = Project.find_by(name: "Shop") - project.update_attribute(:archived, true) - end - - When 'I visit project "Forum" page' do - project = Project.find_by(name: "Forum") - visit project_path(project) - end - - step 'I should not see "Archived"' do - expect(page).not_to have_content "Archived" - end - - step 'I should see "Archived"' do - expect(page).to have_content "Archived" - end - - When 'I set project archived' do - click_link "Archive" - end - - When 'I set project unarchived' do - click_link "Unarchive" - end -end diff --git a/features/steps/project/commits/revert.rb b/features/steps/project/commits/revert.rb deleted file mode 100644 index ebfa7a878bb..00000000000 --- a/features/steps/project/commits/revert.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Spinach::Features::RevertCommits < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - include SharedDiffNote - include RepoHelpers - - step 'I click on commit link' do - visit project_commit_path(@project, sample_commit.id) - end - - step 'I click on the revert button' do - find(".header-action-buttons .dropdown").click - find("a[href='#modal-revert-commit']").click - end - - step 'I revert the changes directly' do - page.within('#modal-revert-commit') do - uncheck 'create_merge_request' - click_button 'Revert' - end - end - - step 'I should see the revert commit notice' do - page.should have_content('The commit has been successfully reverted.') - end - - step 'I should see a revert error' do - page.should have_content('Sorry, we cannot revert this commit automatically.') - end - - step 'I revert the changes in a new merge request' do - page.within('#modal-revert-commit') do - click_button 'Revert' - end - end - - step 'I should see the new merge request notice' do - page.should have_content('The commit has been successfully reverted. You can now submit a merge request to get this change into the original branch.') - page.should have_content("From revert-#{Commit.truncate_sha(sample_commit.id)} into master") - end -end diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb deleted file mode 100644 index 12257593621..00000000000 --- a/features/steps/project/snippets.rb +++ /dev/null @@ -1,100 +0,0 @@ -class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedNote - include SharedPaths - include WaitForRequests - - step 'project "Shop" have "Snippet one" snippet' do - create(:project_snippet, - title: "Snippet one", - content: "Test content", - file_name: "snippet.rb", - project: project, - author: project.users.first) - end - - step 'project "Shop" have no "Snippet two" snippet' do - create(:snippet, - title: "Snippet two", - content: "Test content", - file_name: "snippet.rb", - author: project.users.first) - end - - step 'I click link "New snippet"' do - page.within '.nav-controls' do - first(:link, "New snippet").click - end - end - - step 'I click link "Snippet one"' do - click_link "Snippet one" - end - - step 'I should see "Snippet one" in snippets' do - expect(page).to have_content "Snippet one" - end - - step 'I should not see "Snippet two" in snippets' do - expect(page).not_to have_content "Snippet two" - end - - step 'I should not see "Snippet one" in snippets' do - expect(page).not_to have_content "Snippet one" - end - - step 'I click link "Edit"' do - page.within ".detail-page-header" do - first(:link, "Edit").click - end - end - - step 'I click link "Delete"' do - first(:link, "Delete").click - end - - step 'I submit new snippet "Snippet three"' do - fill_in "project_snippet_title", with: "Snippet three" - fill_in "project_snippet_file_name", with: "my_snippet.rb" - page.within('.file-editor') do - find('.ace_text-input').native.send_keys 'Content of snippet three' - end - click_button "Create snippet" - wait_for_requests - end - - step 'I should see snippet "Snippet three"' do - expect(page).to have_content "Snippet three" - expect(page).to have_content "Content of snippet three" - end - - step 'I submit new title "Snippet new title"' do - fill_in "project_snippet_title", with: "Snippet new title" - click_button "Save" - end - - step 'I should see "Snippet new title"' do - expect(page).to have_content "Snippet new title" - end - - step 'I leave a comment like "Good snippet!"' do - page.within('.js-main-target-form') do - fill_in "note_note", with: "Good snippet!" - click_button "Comment" - end - wait_for_requests - end - - step 'I should see comment "Good snippet!"' do - expect(page).to have_content "Good snippet!" - end - - step 'I visit snippet page "Snippet one"' do - visit project_snippet_path(project, project_snippet) - end - - def project_snippet - @project_snippet ||= ProjectSnippet.find_by!(title: "Snippet one") - end -end diff --git a/features/steps/search.rb b/features/steps/search.rb deleted file mode 100644 index 2f1b8cc0156..00000000000 --- a/features/steps/search.rb +++ /dev/null @@ -1,116 +0,0 @@ -class Spinach::Features::Search < Spinach::FeatureSteps - include SharedAuthentication - include SharedPaths - include SharedProject - - step 'I search for "Sho"' do - fill_in "dashboard_search", with: "Sho" - click_button "Search" - end - - step 'I search for "Foo"' do - fill_in "dashboard_search", with: "Foo" - find('.btn-search').click - end - - step 'I search for "rspec"' do - fill_in "dashboard_search", with: "rspec" - find('.btn-search').click - end - - step 'I search for "rspec" on project page' do - fill_in "search", with: "rspec" - click_button "Go" - end - - step 'I search for "Wiki content"' do - fill_in "dashboard_search", with: "content" - find('.btn-search').click - end - - step 'I click "Issues" link' do - page.within '.search-filter' do - click_link 'Issues' - end - end - - step 'I click project "Shop" link' do - find('.js-search-project-dropdown').click - page.within '.project-filter' do - click_link project.name_with_namespace - end - end - - step 'I click "Merge requests" link' do - page.within '.search-filter' do - click_link 'Merge requests' - end - end - - step 'I click "Milestones" link' do - page.within '.search-filter' do - click_link 'Milestones' - end - end - - step 'I click "Wiki" link' do - page.within '.search-filter' do - click_link 'Wiki' - end - end - - step 'I should see "Shop" project link' do - expect(page).to have_link "Shop" - end - - step 'I should see code results for project "Shop"' do - page.within('.results') do - page.should have_content 'Update capybara, rspec-rails, poltergeist to recent versions' - end - end - - step 'I search for "Contibuting"' do - fill_in "dashboard_search", with: "Contibuting" - click_button "Search" - end - - step 'project has issues' do - create(:issue, title: "Foo", project: project) - create(:issue, title: "Bar", project: project) - end - - step 'project has merge requests' do - create(:merge_request, title: "Foo", source_project: project, target_project: project) - create(:merge_request, :simple, title: "Bar", source_project: project, target_project: project) - end - - step 'project has milestones' do - create(:milestone, title: "Foo", project: project) - create(:milestone, title: "Bar", project: project) - end - - step 'I should see "Foo" link in the search results' do - page.within('.results') do - find(:css, '.search-results').should have_link 'Foo' - end - end - - step 'I should not see "Bar" link in the search results' do - expect(find(:css, '.search-results')).not_to have_link 'Bar' - end - - step 'I should see "test_wiki" link in the search results' do - page.within('.results') do - expect(find(:css, '.search-results')).to have_link 'test_wiki' - end - end - - step 'project has Wiki content' do - @wiki = ::ProjectWiki.new(project, current_user) - @wiki.create_page("test_wiki", "Some Wiki content", :markdown, "first commit") - end - - step 'project "Shop" is public' do - project.update_attributes(visibility_level: Project::PUBLIC) - end -end |