diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-03 10:27:56 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-04-03 10:27:56 +0000 |
commit | dc4ae317ea858952acd5c91dd8034832638b3794 (patch) | |
tree | 4f62604b27b0ec1ed9f35a509380372e0bdcb638 /features/steps/shared | |
parent | 95b3bf26cae3c2e483df4591ec5fe492ab9746a5 (diff) | |
download | gitlab-ce-dc4ae317ea858952acd5c91dd8034832638b3794.tar.gz |
Replace the `project/issues/issues.feature` spinach test with an rspec analog
Diffstat (limited to 'features/steps/shared')
-rw-r--r-- | features/steps/shared/issuable.rb | 23 | ||||
-rw-r--r-- | features/steps/shared/markdown.rb | 37 | ||||
-rw-r--r-- | features/steps/shared/note.rb | 22 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 26 | ||||
-rw-r--r-- | features/steps/shared/project.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/user.rb | 4 |
6 files changed, 0 insertions, 116 deletions
diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb index f90247c3fe8..a9174efd334 100644 --- a/features/steps/shared/issuable.rb +++ b/features/steps/shared/issuable.rb @@ -105,17 +105,6 @@ module SharedIssuable edit_issuable end - step 'I click link "Edit" for the issue' do - edit_issuable - end - - step 'I sort the list by "Last updated"' do - find('button.dropdown-toggle').click - page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do - click_link "Last updated" - end - end - step 'I sort the list by "Least popular"' do find('button.dropdown-toggle').click @@ -124,18 +113,6 @@ module SharedIssuable end end - step 'I sort the list by "Popularity"' do - find('button.dropdown-toggle').click - - page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do - click_link 'Popularity' - end - end - - step 'The list should be sorted by "Last updated"' do - expect(find('.issues-filters')).to have_content('Last updated') - end - step 'I click link "Next" in the sidebar' do page.within '.issuable-sidebar' do click_link 'Next' diff --git a/features/steps/shared/markdown.rb b/features/steps/shared/markdown.rb index c2bec2a6320..c66280127e9 100644 --- a/features/steps/shared/markdown.rb +++ b/features/steps/shared/markdown.rb @@ -18,43 +18,6 @@ module SharedMarkdown expect(find('.gfm-form .js-md-preview')).not_to be_visible end - step 'The Markdown preview tab should say there is nothing to do' do - page.within('.gfm-form') do - find('.js-md-preview-button').click - expect(find('.js-md-preview')).to have_content('Nothing to preview.') - end - end - - step 'I should not see the Markdown text field' do - expect(find('.gfm-form textarea')).not_to be_visible - end - - step 'I should see the Markdown write tab' do - expect(first('.gfm-form')).to have_link('Write', visible: true) - end - - step 'I should see the Markdown preview' do - expect(find('.gfm-form')).to have_css('.js-md-preview', visible: true) - end - - step 'The Markdown preview tab should display rendered Markdown' do - page.within('.gfm-form') do - find('.js-md-preview-button').click - expect(find('.js-md-preview')).to have_css('gl-emoji', visible: true) - end - end - - step 'I write a description like ":+1: Nice"' do - find('.gfm-form').fill_in 'Description', with: ':+1: Nice' - end - - step 'I preview a description text like "Bug fixed :smile:"' do - page.within(first('.gfm-form')) do - fill_in 'Description', with: 'Bug fixed :smile:' - click_link 'Preview' - end - end - step 'I haven\'t written any description text' do find('.gfm-form').fill_in 'Description', with: '' end diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb index 95f0cd2156e..cbe1cae096e 100644 --- a/features/steps/shared/note.rb +++ b/features/steps/shared/note.rb @@ -114,34 +114,12 @@ module SharedNote end end - step 'I should see comment "XML attached"' do - page.within(".note") do - expect(page).to have_content("XML attached") - end - end - step 'I should see no notes at all' do expect(page).not_to have_css('.note') end # Markdown - step 'I leave a comment with a header containing "Comment with a header"' do - page.within(".js-main-target-form") do - fill_in "note[note]", with: "# Comment with a header" - click_button "Comment" - end - - wait_for_requests - end - - step 'The comment with the header should not have an ID' do - page.within(".note-body > .note-text") do - expect(page).to have_content("Comment with a header") - expect(page).not_to have_css("#comment-with-a-header") - end - end - step 'I edit the last comment with a +1' do page.within(".main-notes-list") do note = find('.note') diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index bff0d58aaf4..9a5db75fe98 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -96,10 +96,6 @@ module SharedPaths visit assigned_issues_dashboard_path end - step 'I visit dashboard merge requests page' do - visit assigned_mrs_dashboard_path - end - step 'I visit dashboard search page' do visit search_path end @@ -200,10 +196,6 @@ module SharedPaths # Generic Project # ---------------------------------------- - step "I visit my project's home page" do - visit project_path(@project) - end - step "I visit my project's settings page" do visit edit_project_path(@project) end @@ -339,10 +331,6 @@ module SharedPaths visit project_commit_path(@project, sample_commit.id) end - step 'I visit project "Shop" issues page' do - visit project_issues_path(project) - end - step 'I visit issue page "Release 0.4"' do issue = Issue.find_by(title: "Release 0.4") visit project_issue_path(issue.project, issue) @@ -394,10 +382,6 @@ module SharedPaths wait_for_requests end - step 'I visit project "Shop" merge requests page' do - visit project_merge_requests_path(project) - end - step 'I visit forked project "Shop" merge requests page' do visit project_merge_requests_path(project) end @@ -418,11 +402,6 @@ module SharedPaths # Visibility Projects # ---------------------------------------- - step 'I visit project "Community" page' do - project = Project.find_by(name: "Community") - visit project_path(project) - end - step 'I visit project "Community" source page' do project = Project.find_by(name: 'Community') visit project_tree_path(project, root_ref) @@ -442,11 +421,6 @@ module SharedPaths # Empty Projects # ---------------------------------------- - step "I visit empty project page" do - project = Project.find_by(name: "Empty Public Project") - visit project_path(project) - end - step "I should not see command line instructions" do expect(page).not_to have_css('.empty_wrapper') end diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index 07a0e2e072c..be848ebafa0 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -236,10 +236,6 @@ module SharedProject @project.update(public_builds: false) end - step 'project "Shop" has a "Bugfix MR" merge request open' do - create(:merge_request, title: "Bugfix MR", target_project: project, source_project: project, author: project.users.first) - end - def user_owns_project(user_name:, project_name:, visibility: :private) user = user_exists(user_name, username: user_name.gsub(/\s/, '').underscore) project = Project.find_by(name: project_name) diff --git a/features/steps/shared/user.rb b/features/steps/shared/user.rb index 9856c510aa0..9cadc91769d 100644 --- a/features/steps/shared/user.rb +++ b/features/steps/shared/user.rb @@ -19,10 +19,6 @@ module SharedUser User.find_by(name: name) || create(:user, { name: name, admin: false }.merge(options)) end - step 'I have an ssh key' do - create(:personal_key, user: @user) - end - step 'I have no ssh keys' do @user.keys.delete_all end |