diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-24 15:10:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-24 15:10:17 +0300 |
commit | 4b9bde7848d9538c1635ffe7a5385ba013487b4a (patch) | |
tree | 5aad1d5d94ea233a36c8ac2850e099236e1c2cdc /spec/features | |
parent | 2f752481c2e727834216a93dee82df9f8e2acb2e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
8 files changed, 41 insertions, 23 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index f5b05c76e90..c281ba3aab9 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -525,6 +525,7 @@ RSpec.describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_n end def check_all_events + page.check('Active') page.check('Push') page.check('Issue') page.check('Confidential Issue') diff --git a/spec/features/boards/new_issue_spec.rb b/spec/features/boards/new_issue_spec.rb index efa1f8cfc0d..f434ea0c66f 100644 --- a/spec/features/boards/new_issue_spec.rb +++ b/spec/features/boards/new_issue_spec.rb @@ -130,24 +130,43 @@ RSpec.describe 'Issue Boards new issue', :js do context 'group boards' do let_it_be(:group) { create(:group, :public) } - let_it_be(:project) { create(:project, namespace: group) } + let_it_be(:project) { create(:project, :public, namespace: group) } let_it_be(:group_board) { create(:board, group: group) } - let_it_be(:list) { create(:list, board: group_board, position: 0) } + let_it_be(:project_label) { create(:label, project: project, name: 'label') } + let_it_be(:list) { create(:list, board: group_board, label: project_label, position: 0) } context 'for unauthorized users' do - before do - sign_in(user) - visit group_board_path(group, group_board) - wait_for_requests - end + context 'when backlog does not exist' do + before do + sign_in(user) + visit group_board_path(group, group_board) + wait_for_requests + end - it 'displays new issue button in open list' do - expect(first('.board')).to have_selector('.issue-count-badge-add-button', count: 1) + it 'does not display new issue button in label list' do + page.within('.board.is-draggable') do + expect(page).not_to have_selector('.issue-count-badge-add-button') + end + end end - it 'does not display new issue button in label list' do - page.within('.board.is-draggable') do - expect(page).not_to have_selector('.issue-count-badge-add-button') + context 'when backlog list already exists' do + let!(:backlog_list) { create(:backlog_list, board: group_board) } + + before do + sign_in(user) + visit group_board_path(group, group_board) + wait_for_requests + end + + it 'displays new issue button in open list' do + expect(first('.board')).to have_selector('.issue-count-badge-add-button', count: 1) + end + + it 'does not display new issue button in label list' do + page.within('.board.is-draggable') do + expect(page).not_to have_selector('.issue-count-badge-add-button') + end end end end diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb index 1545cb36e9b..51dcf57eb94 100644 --- a/spec/features/labels_hierarchy_spec.rb +++ b/spec/features/labels_hierarchy_spec.rb @@ -296,6 +296,7 @@ RSpec.describe 'Labels Hierarchy', :js do let(:board) { create(:board, group: parent) } before do + stub_feature_flags(graphql_board_lists: false) parent.add_developer(user) visit group_board_path(parent, board) find('.js-new-board-list').click diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 8747b3ab54c..a9c196bb84b 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -311,7 +311,7 @@ RSpec.describe 'Pipelines', :js do let!(:delayed_job) do create(:ci_build, :scheduled, pipeline: pipeline, - name: 'delayed job', + name: 'delayed job 1', stage: 'test') end @@ -327,7 +327,7 @@ RSpec.describe 'Pipelines', :js do find('.js-pipeline-dropdown-manual-actions').click time_diff = [0, delayed_job.scheduled_at - Time.now].max - expect(page).to have_button('delayed job') + expect(page).to have_button('delayed job 1') expect(page).to have_content(Time.at(time_diff).utc.strftime("%H:%M:%S")) end @@ -335,7 +335,7 @@ RSpec.describe 'Pipelines', :js do let!(:delayed_job) do create(:ci_build, :expired_scheduled, pipeline: pipeline, - name: 'delayed job', + name: 'delayed job 1', stage: 'test') end @@ -349,7 +349,7 @@ RSpec.describe 'Pipelines', :js do context 'when user played a delayed job immediately' do before do find('.js-pipeline-dropdown-manual-actions').click - page.accept_confirm { click_button('delayed job') } + page.accept_confirm { click_button('delayed job 1') } wait_for_requests end diff --git a/spec/features/projects/services/user_activates_issue_tracker_spec.rb b/spec/features/projects/services/user_activates_issue_tracker_spec.rb index 4f25794d058..c7389460a07 100644 --- a/spec/features/projects/services/user_activates_issue_tracker_spec.rb +++ b/spec/features/projects/services/user_activates_issue_tracker_spec.rb @@ -8,7 +8,7 @@ RSpec.describe 'User activates issue tracker', :js do let(:url) { 'http://tracker.example.com' } def fill_form(disable: false, skip_new_issue_url: false) - click_active_toggle if disable + click_active_checkbox if disable fill_in 'service_project_url', with: url fill_in 'service_issues_url', with: "#{url}/:id" diff --git a/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb b/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb index 6ddffb710a8..1b94856d640 100644 --- a/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb +++ b/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb @@ -28,7 +28,7 @@ RSpec.describe 'Set up Mattermost slash commands', :js do token = ('a'..'z').to_a.join fill_in 'service_token', with: token - click_active_toggle + click_active_checkbox click_on 'Save changes' expect(current_path).to eq(edit_project_service_path(project, :mattermost_slash_commands)) diff --git a/spec/features/projects/services/user_activates_slack_slash_command_spec.rb b/spec/features/projects/services/user_activates_slack_slash_command_spec.rb index afe6855d6ad..7a0b56027fe 100644 --- a/spec/features/projects/services/user_activates_slack_slash_command_spec.rb +++ b/spec/features/projects/services/user_activates_slack_slash_command_spec.rb @@ -21,7 +21,7 @@ RSpec.describe 'Slack slash commands', :js do it 'redirects to the integrations page after saving but not activating' do fill_in 'Token', with: 'token' - click_active_toggle + click_active_checkbox click_on 'Save' expect(current_path).to eq(edit_project_service_path(project, :slack_slash_commands)) diff --git a/spec/features/projects/user_sees_sidebar_spec.rb b/spec/features/projects/user_sees_sidebar_spec.rb index 1d443e0b339..50d7b353c46 100644 --- a/spec/features/projects/user_sees_sidebar_spec.rb +++ b/spec/features/projects/user_sees_sidebar_spec.rb @@ -6,10 +6,6 @@ RSpec.describe 'Projects > User sees sidebar' do let(:user) { create(:user) } let(:project) { create(:project, :private, public_builds: false, namespace: user.namespace) } - before do - stub_feature_flags(vue_issuables_list: false) - end - # NOTE: See documented behaviour https://design.gitlab.com/regions/navigation#contextual-navigation context 'on different viewports', :js do include MobileHelpers @@ -134,6 +130,7 @@ RSpec.describe 'Projects > User sees sidebar' do context 'as guest' do let(:guest) { create(:user) } + let!(:issue) { create(:issue, :opened, project: project, author: guest) } before do project.add_guest(guest) |