From 265b1a3b72ff7552e2ae01a059f80bd59714649d Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Fri, 6 Oct 2017 20:40:41 +0000 Subject: Show confirmation modal before deleting account --- spec/features/issues/issue_detail_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'spec/features/issues') diff --git a/spec/features/issues/issue_detail_spec.rb b/spec/features/issues/issue_detail_spec.rb index 28b636f9359..c0c396af93f 100644 --- a/spec/features/issues/issue_detail_spec.rb +++ b/spec/features/issues/issue_detail_spec.rb @@ -28,8 +28,7 @@ feature 'Issue Detail', :js do fill_in 'issue-title', with: 'issue title' click_button 'Save' - visit profile_account_path - click_link 'Delete account' + Users::DestroyService.new(user).execute(user) visit project_issue_path(project, issue) end -- cgit v1.2.1 From 0ce6785851510ccb49f0d1edc0220aca46f815f5 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Tue, 3 Oct 2017 10:35:01 +0200 Subject: Replaces `tag: true` into `:tag` in the specs Replaces all the explicit include metadata syntax in the specs (tag: true) into the implicit one (:tag). Added a cop to prevent future errors and handle autocorrection. --- spec/features/issues/award_emoji_spec.rb | 18 +++++++++--------- spec/features/issues/award_spec.rb | 2 +- spec/features/issues/bulk_assignment_labels_spec.rb | 2 +- ...eate_issue_for_discussions_in_merge_request_spec.rb | 2 +- ...ssue_for_single_discussion_in_merge_request_spec.rb | 2 +- .../issues/filtered_search/dropdown_author_spec.rb | 2 +- .../issues/filtered_search/dropdown_emoji_spec.rb | 2 +- .../issues/filtered_search/dropdown_label_spec.rb | 2 +- .../issues/filtered_search/filter_issues_spec.rb | 2 +- .../issues/filtered_search/recent_searches_spec.rb | 2 +- .../features/issues/filtered_search/search_bar_spec.rb | 2 +- .../issues/filtered_search/visual_tokens_spec.rb | 2 +- spec/features/issues/gfm_autocomplete_spec.rb | 2 +- spec/features/issues/issue_sidebar_spec.rb | 8 ++++---- spec/features/issues/markdown_toolbar_spec.rb | 2 +- spec/features/issues/move_spec.rb | 6 +++--- spec/features/issues/spam_issues_spec.rb | 2 +- spec/features/issues/todo_spec.rb | 2 +- spec/features/issues/user_uses_slash_commands_spec.rb | 2 +- 19 files changed, 32 insertions(+), 32 deletions(-) (limited to 'spec/features/issues') diff --git a/spec/features/issues/award_emoji_spec.rb b/spec/features/issues/award_emoji_spec.rb index a29acb30163..850b35c4467 100644 --- a/spec/features/issues/award_emoji_spec.rb +++ b/spec/features/issues/award_emoji_spec.rb @@ -24,7 +24,7 @@ describe 'Awards Emoji' do end # Regression test: https://gitlab.com/gitlab-org/gitlab-ce/issues/29529 - it 'does not shows a 500 page', js: true do + it 'does not shows a 500 page', :js do expect(page).to have_text(issue.title) end end @@ -37,37 +37,37 @@ describe 'Awards Emoji' do wait_for_requests end - it 'increments the thumbsdown emoji', js: true do + it 'increments the thumbsdown emoji', :js do find('[data-name="thumbsdown"]').click wait_for_requests expect(thumbsdown_emoji).to have_text("1") end context 'click the thumbsup emoji' do - it 'increments the thumbsup emoji', js: true do + it 'increments the thumbsup emoji', :js do find('[data-name="thumbsup"]').click wait_for_requests expect(thumbsup_emoji).to have_text("1") end - it 'decrements the thumbsdown emoji', js: true do + it 'decrements the thumbsdown emoji', :js do expect(thumbsdown_emoji).to have_text("0") end end context 'click the thumbsdown emoji' do - it 'increments the thumbsdown emoji', js: true do + it 'increments the thumbsdown emoji', :js do find('[data-name="thumbsdown"]').click wait_for_requests expect(thumbsdown_emoji).to have_text("1") end - it 'decrements the thumbsup emoji', js: true do + it 'decrements the thumbsup emoji', :js do expect(thumbsup_emoji).to have_text("0") end end - it 'toggles the smiley emoji on a note', js: true do + it 'toggles the smiley emoji on a note', :js do toggle_smiley_emoji(true) within('.note-body') do @@ -82,7 +82,7 @@ describe 'Awards Emoji' do end context 'execute /award quick action' do - it 'toggles the emoji award on noteable', js: true do + it 'toggles the emoji award on noteable', :js do execute_quick_action('/award :100:') expect(find(noteable_award_counter)).to have_text("1") @@ -95,7 +95,7 @@ describe 'Awards Emoji' do end end - context 'unauthorized user', js: true do + context 'unauthorized user', :js do before do visit project_issue_path(project, issue) end diff --git a/spec/features/issues/award_spec.rb b/spec/features/issues/award_spec.rb index e95eb19f7d1..ddb69d414da 100644 --- a/spec/features/issues/award_spec.rb +++ b/spec/features/issues/award_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -feature 'Issue awards', js: true do +feature 'Issue awards', :js do let(:user) { create(:user) } let(:project) { create(:project, :public) } let(:issue) { create(:issue, project: project) } diff --git a/spec/features/issues/bulk_assignment_labels_spec.rb b/spec/features/issues/bulk_assignment_labels_spec.rb index a89dcdf41dc..3223eb20b55 100644 --- a/spec/features/issues/bulk_assignment_labels_spec.rb +++ b/spec/features/issues/bulk_assignment_labels_spec.rb @@ -9,7 +9,7 @@ feature 'Issues > Labels bulk assignment' do let!(:feature) { create(:label, project: project, title: 'feature') } let!(:wontfix) { create(:label, project: project, title: 'wontfix') } - context 'as an allowed user', js: true do + context 'as an allowed user', :js do before do project.team << [user, :master] diff --git a/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb b/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb index 80cc8d22999..822ba48e005 100644 --- a/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb +++ b/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -feature 'Resolving all open discussions in a merge request from an issue', js: true do +feature 'Resolving all open discussions in a merge request from an issue', :js do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb b/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb index ad5fd0fd97b..f0bed85595c 100644 --- a/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb +++ b/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb @@ -24,7 +24,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue' do end end - context 'resolving the discussion', js: true do + context 'resolving the discussion', :js do before do click_button 'Resolve discussion' end diff --git a/spec/features/issues/filtered_search/dropdown_author_spec.rb b/spec/features/issues/filtered_search/dropdown_author_spec.rb index 3cec59050ab..5e20fb48768 100644 --- a/spec/features/issues/filtered_search/dropdown_author_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_author_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'Dropdown author', js: true do +describe 'Dropdown author', :js do include FilteredSearchHelpers let!(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/dropdown_emoji_spec.rb b/spec/features/issues/filtered_search/dropdown_emoji_spec.rb index 44741bcc92d..3012c77f2b9 100644 --- a/spec/features/issues/filtered_search/dropdown_emoji_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_emoji_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'Dropdown emoji', js: true do +describe 'Dropdown emoji', :js do include FilteredSearchHelpers let!(:project) { create(:project, :public) } diff --git a/spec/features/issues/filtered_search/dropdown_label_spec.rb b/spec/features/issues/filtered_search/dropdown_label_spec.rb index c46803112a9..cbc4f8d4c50 100644 --- a/spec/features/issues/filtered_search/dropdown_label_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_label_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Dropdown label', js: true do +describe 'Dropdown label', :js do include FilteredSearchHelpers let(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/filter_issues_spec.rb b/spec/features/issues/filtered_search/filter_issues_spec.rb index 630d6a10c9c..2974016c6a7 100644 --- a/spec/features/issues/filtered_search/filter_issues_spec.rb +++ b/spec/features/issues/filtered_search/filter_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Filter issues', js: true do +describe 'Filter issues', :js do include FilteredSearchHelpers let(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/recent_searches_spec.rb b/spec/features/issues/filtered_search/recent_searches_spec.rb index 447281ed19d..eef7988e2bd 100644 --- a/spec/features/issues/filtered_search/recent_searches_spec.rb +++ b/spec/features/issues/filtered_search/recent_searches_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Recent searches', js: true do +describe 'Recent searches', :js do include FilteredSearchHelpers let(:project_1) { create(:project, :public) } diff --git a/spec/features/issues/filtered_search/search_bar_spec.rb b/spec/features/issues/filtered_search/search_bar_spec.rb index d4dd570fb37..88688422dc7 100644 --- a/spec/features/issues/filtered_search/search_bar_spec.rb +++ b/spec/features/issues/filtered_search/search_bar_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'Search bar', js: true do +describe 'Search bar', :js do include FilteredSearchHelpers let!(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/visual_tokens_spec.rb b/spec/features/issues/filtered_search/visual_tokens_spec.rb index 2b624f4842d..920f5546eef 100644 --- a/spec/features/issues/filtered_search/visual_tokens_spec.rb +++ b/spec/features/issues/filtered_search/visual_tokens_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'Visual tokens', js: true do +describe 'Visual tokens', :js do include FilteredSearchHelpers include WaitForRequests diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb index c6cf6265645..15041ff04ea 100644 --- a/spec/features/issues/gfm_autocomplete_spec.rb +++ b/spec/features/issues/gfm_autocomplete_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -feature 'GFM autocomplete', js: true do +feature 'GFM autocomplete', :js do let(:user) { create(:user, name: '💃speciąl someone💃', username: 'someone.special') } let(:project) { create(:project) } let(:label) { create(:label, project: project, title: 'special+') } diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb index af11b474842..bc9c3d825c1 100644 --- a/spec/features/issues/issue_sidebar_spec.rb +++ b/spec/features/issues/issue_sidebar_spec.rb @@ -13,7 +13,7 @@ feature 'Issue Sidebar' do sign_in(user) end - context 'assignee', js: true do + context 'assignee', :js do let(:user2) { create(:user) } let(:issue2) { create(:issue, project: project, author: user2) } @@ -82,7 +82,7 @@ feature 'Issue Sidebar' do visit_issue(project, issue) end - context 'sidebar', js: true do + context 'sidebar', :js do it 'changes size when the screen size is smaller' do sidebar_selector = 'aside.right-sidebar.right-sidebar-collapsed' # Resize the window @@ -101,7 +101,7 @@ feature 'Issue Sidebar' do end end - context 'editing issue labels', js: true do + context 'editing issue labels', :js do before do page.within('.block.labels') do find('.edit-link').click @@ -114,7 +114,7 @@ feature 'Issue Sidebar' do end end - context 'creating a new label', js: true do + context 'creating a new label', :js do before do page.within('.block.labels') do click_link 'Create new' diff --git a/spec/features/issues/markdown_toolbar_spec.rb b/spec/features/issues/markdown_toolbar_spec.rb index 634ea111dc1..6869c2c869d 100644 --- a/spec/features/issues/markdown_toolbar_spec.rb +++ b/spec/features/issues/markdown_toolbar_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -feature 'Issue markdown toolbar', js: true do +feature 'Issue markdown toolbar', :js do let(:project) { create(:project, :public) } let(:issue) { create(:issue, project: project) } let(:user) { create(:user) } diff --git a/spec/features/issues/move_spec.rb b/spec/features/issues/move_spec.rb index b2724945da4..6d7b1b1cd8f 100644 --- a/spec/features/issues/move_spec.rb +++ b/spec/features/issues/move_spec.rb @@ -37,7 +37,7 @@ feature 'issue move to another project' do visit issue_path(issue) end - scenario 'moving issue to another project', js: true do + scenario 'moving issue to another project', :js do find('.js-move-issue').trigger('click') wait_for_requests all('.js-move-issue-dropdown-item')[0].click @@ -49,7 +49,7 @@ feature 'issue move to another project' do expect(page.current_path).to include project_path(new_project) end - scenario 'searching project dropdown', js: true do + scenario 'searching project dropdown', :js do new_project_search.team << [user, :reporter] find('.js-move-issue').trigger('click') @@ -63,7 +63,7 @@ feature 'issue move to another project' do end end - context 'user does not have permission to move the issue to a project', js: true do + context 'user does not have permission to move the issue to a project', :js do let!(:private_project) { create(:project, :private) } let(:another_project) { create(:project) } background { another_project.team << [user, :guest] } diff --git a/spec/features/issues/spam_issues_spec.rb b/spec/features/issues/spam_issues_spec.rb index 332ce78b138..d25231d624c 100644 --- a/spec/features/issues/spam_issues_spec.rb +++ b/spec/features/issues/spam_issues_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'New issue', js: true do +describe 'New issue', :js do include StubENV let(:project) { create(:project, :public) } diff --git a/spec/features/issues/todo_spec.rb b/spec/features/issues/todo_spec.rb index 8405f1cd48d..29a2d38ae18 100644 --- a/spec/features/issues/todo_spec.rb +++ b/spec/features/issues/todo_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -feature 'Manually create a todo item from issue', js: true do +feature 'Manually create a todo item from issue', :js do let!(:project) { create(:project) } let!(:issue) { create(:issue, project: project) } let!(:user) { create(:user)} diff --git a/spec/features/issues/user_uses_slash_commands_spec.rb b/spec/features/issues/user_uses_slash_commands_spec.rb index 7437c469a72..9f5e25ff2cb 100644 --- a/spec/features/issues/user_uses_slash_commands_spec.rb +++ b/spec/features/issues/user_uses_slash_commands_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -feature 'Issues > User uses quick actions', js: true do +feature 'Issues > User uses quick actions', :js do include QuickActionsHelpers it_behaves_like 'issuable record that supports quick actions in its description and notes', :issue do -- cgit v1.2.1