diff options
Diffstat (limited to 'spec/features')
7 files changed, 25 insertions, 25 deletions
diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb index ee71181fba2..4cf558b04cc 100644 --- a/spec/features/issues/issue_sidebar_spec.rb +++ b/spec/features/issues/issue_sidebar_spec.rb @@ -162,7 +162,7 @@ RSpec.describe 'Issue Sidebar', feature_category: :team_planning do open_assignees_dropdown page.within '.dropdown-menu-user' do - find('.js-dropdown-input-field').find('input').set(user2.name) + find('[data-testid="user-search-input"]').set(user2.name) wait_for_requests @@ -182,7 +182,7 @@ RSpec.describe 'Issue Sidebar', feature_category: :team_planning do it 'keeps your filtered term after filtering and dismissing the dropdown' do open_assignees_dropdown - find('.js-dropdown-input-field').find('input').set(user2.name) + find('[data-testid="user-search-input"]').set(user2.name) wait_for_requests page.within '.dropdown-menu-user' do @@ -199,7 +199,7 @@ RSpec.describe 'Issue Sidebar', feature_category: :team_planning do expect(page.all('[data-testid="selected-participant"]').length).to eq(1) end - expect(find('.js-dropdown-input-field').find('input').value).to eq(user2.name) + expect(find('[data-testid="user-search-input"]').value).to eq(user2.name) end end end diff --git a/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb b/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb index 7d024103943..ca12e0e2b65 100644 --- a/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb +++ b/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb @@ -67,7 +67,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', it 'sees branch pipelines and detached merge request pipelines in correct order' do page.within('.ci-table') do - expect(page).to have_selector('.ci-created', count: 2) + expect(page).to have_selector('[data-testid="ci-badge-created"]', count: 2) expect(first('[data-testid="pipeline-url-link"]')).to have_content("##{detached_merge_request_pipeline.id}") end end @@ -103,7 +103,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', it 'sees branch pipelines and detached merge request pipelines in correct order' do page.within('.ci-table') do - expect(page).to have_selector('.ci-pending', count: 4) + expect(page).to have_selector('[data-testid="ci-badge-pending"]', count: 4) expect(all('[data-testid="pipeline-url-link"]')[0]) .to have_content("##{detached_merge_request_pipeline_2.id}") @@ -246,7 +246,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', it 'sees a branch pipeline in pipeline tab' do page.within('.ci-table') do - expect(page).to have_selector('.ci-created', count: 1) + expect(page).to have_selector('[data-testid="ci-badge-created"]', count: 1) expect(first('[data-testid="pipeline-url-link"]')).to have_content("##{push_pipeline.id}") end end @@ -299,7 +299,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', it 'sees branch pipelines and detached merge request pipelines in correct order' do page.within('.ci-table') do - expect(page).to have_selector('.ci-pending', count: 2) + expect(page).to have_selector('[data-testid="ci-badge-pending"]', count: 2) expect(first('[data-testid="pipeline-url-link"]')).to have_content("##{detached_merge_request_pipeline.id}") end end @@ -315,7 +315,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', it 'sees pipeline list in forked project' do visit project_pipelines_path(forked_project) - expect(page).to have_selector('.ci-pending', count: 2) + expect(page).to have_selector('[data-testid="ci-badge-pending"]', count: 2) end context 'when a user updated a merge request from a forked project to the parent project' do @@ -341,7 +341,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', it 'sees branch pipelines and detached merge request pipelines in correct order' do page.within('.ci-table') do - expect(page).to have_selector('.ci-pending', count: 4) + expect(page).to have_selector('[data-testid="ci-badge-pending"]', count: 4) expect(all('[data-testid="pipeline-url-link"]')[0]) .to have_content("##{detached_merge_request_pipeline_2.id}") @@ -384,7 +384,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', it 'sees pipeline list in forked project' do visit project_pipelines_path(forked_project) - expect(page).to have_selector('.ci-pending', count: 4) + expect(page).to have_selector('[data-testid="ci-badge-pending"]', count: 4) end end diff --git a/spec/features/merge_request/user_sees_pipelines_spec.rb b/spec/features/merge_request/user_sees_pipelines_spec.rb index f92ce3865a9..a2796cd250b 100644 --- a/spec/features/merge_request/user_sees_pipelines_spec.rb +++ b/spec/features/merge_request/user_sees_pipelines_spec.rb @@ -42,7 +42,7 @@ RSpec.describe 'Merge request > User sees pipelines', :js, feature_category: :co wait_for_requests page.within('[data-testid="pipeline-table-row"]') do - expect(page).to have_selector('.ci-success') + expect(page).to have_selector('[data-testid="ci-badge-passed"]') expect(page).to have_content(pipeline.id) expect(page).to have_content('API') expect(page).to have_css('[data-testid="pipeline-mini-graph"]') diff --git a/spec/features/projects/commit/user_sees_pipelines_tab_spec.rb b/spec/features/projects/commit/user_sees_pipelines_tab_spec.rb index da83bbcb63a..e44364c7f2d 100644 --- a/spec/features/projects/commit/user_sees_pipelines_tab_spec.rb +++ b/spec/features/projects/commit/user_sees_pipelines_tab_spec.rb @@ -36,7 +36,7 @@ RSpec.describe 'Commit > Pipelines tab', :js, feature_category: :source_code_man wait_for_requests page.within('[data-testid="pipeline-table-row"]') do - expect(page).to have_selector('.ci-success') + expect(page).to have_selector('[data-testid="ci-badge-passed"]') expect(page).to have_content(pipeline.id) expect(page).to have_content('API') expect(page).to have_css('[data-testid="pipeline-mini-graph"]') diff --git a/spec/features/projects/jobs/user_browses_jobs_spec.rb b/spec/features/projects/jobs/user_browses_jobs_spec.rb index d74a3d28068..aeba53c22b6 100644 --- a/spec/features/projects/jobs/user_browses_jobs_spec.rb +++ b/spec/features/projects/jobs/user_browses_jobs_spec.rb @@ -72,7 +72,7 @@ RSpec.describe 'User browses jobs', feature_category: :groups_and_projects do wait_for_requests - expect(page).to have_selector('.ci-canceled') + expect(page).to have_selector('[data-testid="ci-badge-canceled"]') expect(page).not_to have_selector('[data-testid="jobs-table-error-alert"]') end end @@ -94,7 +94,7 @@ RSpec.describe 'User browses jobs', feature_category: :groups_and_projects do wait_for_requests - expect(page).to have_selector('.ci-pending') + expect(page).to have_selector('[data-testid="ci-badge-pending"]') end end @@ -134,7 +134,7 @@ RSpec.describe 'User browses jobs', feature_category: :groups_and_projects do wait_for_requests - expect(page).to have_selector('.ci-pending') + expect(page).to have_selector('[data-testid="ci-badge-pending"]') end it 'unschedules a job successfully' do @@ -142,7 +142,7 @@ RSpec.describe 'User browses jobs', feature_category: :groups_and_projects do wait_for_requests - expect(page).to have_selector('.ci-manual') + expect(page).to have_selector('[data-testid="ci-badge-manual"]') end end diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index 01f8f2166ac..a16db71354c 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -66,7 +66,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state, feature_category: :grou wait_for_requests - expect(page).to have_css('.ci-status.ci-success', text: 'passed') + expect(page).to have_css('[data-testid="ci-badge-passed"]', text: 'passed') end it 'shows commit`s data', :js do diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index b8bb81991fc..70f9961ced8 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -120,7 +120,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :groups_and_projects do it 'indicates that pipeline can be canceled' do expect(page).to have_selector('.js-pipelines-cancel-button') - expect(page).to have_selector('.ci-running') + expect(page).to have_selector('[data-testid="ci-badge-running"]') end context 'when canceling' do @@ -132,7 +132,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :groups_and_projects do it 'indicated that pipelines was canceled', :sidekiq_might_not_need_inline do expect(page).not_to have_selector('.js-pipelines-cancel-button') - expect(page).to have_selector('.ci-canceled') + expect(page).to have_selector('[data-testid="ci-badge-canceled"]') end end end @@ -150,7 +150,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :groups_and_projects do it 'indicates that pipeline can be retried' do expect(page).to have_selector('.js-pipelines-retry-button') - expect(page).to have_selector('.ci-failed') + expect(page).to have_selector('[data-testid="ci-badge-failed"]') end context 'when retrying' do @@ -161,7 +161,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :groups_and_projects do it 'shows running pipeline that is not retryable' do expect(page).not_to have_selector('.js-pipelines-retry-button') - expect(page).to have_selector('.ci-running') + expect(page).to have_selector('[data-testid="ci-badge-running"]') end end end @@ -400,7 +400,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :groups_and_projects do end it 'shows the pipeline as preparing' do - expect(page).to have_selector('.ci-preparing') + expect(page).to have_selector('[data-testid="ci-badge-preparing"]') end end @@ -421,7 +421,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :groups_and_projects do end it 'has pipeline running' do - expect(page).to have_selector('.ci-running') + expect(page).to have_selector('[data-testid="ci-badge-running"]') end context 'when canceling' do @@ -432,7 +432,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :groups_and_projects do it 'indicates that pipeline was canceled', :sidekiq_might_not_need_inline do expect(page).not_to have_selector('.js-pipelines-cancel-button') - expect(page).to have_selector('.ci-canceled') + expect(page).to have_selector('[data-testid="ci-badge-canceled"]') end end end @@ -454,7 +454,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :groups_and_projects do end it 'has failed pipeline', :sidekiq_might_not_need_inline do - expect(page).to have_selector('.ci-failed') + expect(page).to have_selector('[data-testid="ci-badge-failed"]') end end end |