diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-17 18:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-17 18:09:24 +0300 |
commit | e14148b7edcfc4aff7ec966c399b3913318fb293 (patch) | |
tree | 31866782e6411c7ddc6b8b9f42ed66e700f6359b /spec/features | |
parent | c6283014fe69dc6699b00abedff607bd5c5718b0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/issues/group_label_sidebar_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/issues/issue_sidebar_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/issues/resource_label_events_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/issues/user_edits_issue_spec.rb | 5 | ||||
-rw-r--r-- | spec/features/labels_hierarchy_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/users/signup_spec.rb | 1 |
6 files changed, 14 insertions, 14 deletions
diff --git a/spec/features/issues/group_label_sidebar_spec.rb b/spec/features/issues/group_label_sidebar_spec.rb index e6a173f4589..8150f9c6faf 100644 --- a/spec/features/issues/group_label_sidebar_spec.rb +++ b/spec/features/issues/group_label_sidebar_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'Group label on issue' do - it 'renders link to the project issues page' do + it 'renders link to the project issues page', :js do group = create(:group) project = create(:project, :public, namespace: group) feature = create(:group_label, group: group, title: 'feature') @@ -14,6 +14,6 @@ RSpec.describe 'Group label on issue' do link = find('.issuable-show-labels a') - expect(link[:href]).to eq(label_link) + expect(CGI.unescape(link[:href])).to include(CGI.unescape(label_link)) end end diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb index ecda80f2483..38d11ee2560 100644 --- a/spec/features/issues/issue_sidebar_spec.rb +++ b/spec/features/issues/issue_sidebar_spec.rb @@ -168,7 +168,7 @@ RSpec.describe 'Issue Sidebar' do it 'escapes XSS when viewing issue labels' do page.within('.block.labels') do - find('.edit-link').click + click_on 'Edit' expect(page).to have_content '<script>alert("xss");</script>' end @@ -179,7 +179,7 @@ RSpec.describe 'Issue Sidebar' do before do issue.update(labels: [label]) page.within('.block.labels') do - find('.edit-link').click + click_on 'Edit' end end @@ -286,7 +286,7 @@ RSpec.describe 'Issue Sidebar' do end it 'does not have a option to edit labels' do - expect(page).not_to have_selector('.block.labels .edit-link') + expect(page).not_to have_selector('.block.labels .js-sidebar-dropdown-toggle') end context 'interacting with collapsed sidebar', :js do diff --git a/spec/features/issues/resource_label_events_spec.rb b/spec/features/issues/resource_label_events_spec.rb index f2c978c525e..8faec85f3df 100644 --- a/spec/features/issues/resource_label_events_spec.rb +++ b/spec/features/issues/resource_label_events_spec.rb @@ -35,12 +35,12 @@ RSpec.describe 'List issue resource label events', :js do context 'when user adds label to the issue' do def toggle_labels(labels) page.within '.labels' do - click_link 'Edit' + click_on 'Edit' wait_for_requests labels.each { |label| click_link label } - click_link 'Edit' + click_on 'Edit' wait_for_requests end end diff --git a/spec/features/issues/user_edits_issue_spec.rb b/spec/features/issues/user_edits_issue_spec.rb index 7321f2243b9..88b8e9624e2 100644 --- a/spec/features/issues/user_edits_issue_spec.rb +++ b/spec/features/issues/user_edits_issue_spec.rb @@ -95,11 +95,12 @@ RSpec.describe "Issues > User edits issue", :js do describe 'update labels' do it 'will not send ajax request when no data is changed' do page.within '.labels' do - click_link 'Edit' + click_on 'Edit' - find('.dropdown-menu-close', match: :first).click + find('.dropdown-title button').click expect(page).not_to have_selector('.block-loading') + expect(page).not_to have_selector('.gl-spinner') end end end diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb index 51dcf57eb94..eed9a6d1043 100644 --- a/spec/features/labels_hierarchy_spec.rb +++ b/spec/features/labels_hierarchy_spec.rb @@ -42,12 +42,12 @@ RSpec.describe 'Labels Hierarchy', :js do it 'does not find child group labels on dropdown' do page.within('.block.labels') do - find('.edit-link').click - end + click_on 'Edit' - wait_for_requests + wait_for_requests - expect(page).not_to have_selector('.badge', text: child_group_label.title) + expect(page).not_to have_text(child_group_label.title) + end end end diff --git a/spec/features/users/signup_spec.rb b/spec/features/users/signup_spec.rb index 7b54a590805..5fd0e677cd0 100644 --- a/spec/features/users/signup_spec.rb +++ b/spec/features/users/signup_spec.rb @@ -419,7 +419,6 @@ RSpec.shared_examples 'Signup' do expect(new_user.software_developer_role?).to be_truthy expect(new_user.setup_for_company).to be_nil expect(page).to have_current_path(new_project_path) - expect(page).to have_content("Welcome! You have signed up successfully.") end end |