Commit 81811623 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'fix_more_decomposed_hanging_specs' into 'master'

Fix hanging specs when decomposed

See merge request gitlab-org/gitlab!82981
parents fd765430 3d2f580c
......@@ -18,7 +18,6 @@ RSpec.describe 'Environment > Metrics' do
stub_any_prometheus_request
sign_in(user)
visit_environment(environment)
end
around do |example|
......@@ -27,6 +26,7 @@ RSpec.describe 'Environment > Metrics' do
shared_examples 'has environment selector' do
it 'has a working environment selector', :js do
visit_environment(environment)
click_link 'Monitoring'
expect(page).to have_current_path(project_metrics_dashboard_path(project, environment: environment.id))
......@@ -56,6 +56,7 @@ RSpec.describe 'Environment > Metrics' do
end
it 'shows metrics', :js do
visit_environment(environment)
click_link 'Monitoring'
expect(page).to have_css('[data-qa-selector="prometheus_graphs"]') # rubocop:disable QA/SelectorUsage
......
......@@ -15,11 +15,10 @@ RSpec.describe 'User browses a job', :js do
stub_feature_flags(bootstrap_confirmation_modals: false)
sign_in(user)
visit(project_job_path(project, build))
end
it 'erases the job log', :js do
visit(project_job_path(project, build))
wait_for_requests
expect(page).to have_content("Job #{build.name}")
......@@ -41,6 +40,7 @@ RSpec.describe 'User browses a job', :js do
let!(:build) { create(:ci_build, :success, :unarchived_trace_artifact, :coverage, pipeline: pipeline) }
it 'shows no trace message', :js do
visit(project_job_path(project, build))
wait_for_requests
expect(page).to have_content('This job does not have a trace.')
......@@ -51,6 +51,7 @@ RSpec.describe 'User browses a job', :js do
let!(:build) { create(:ci_build, :failed, :trace_live, pipeline: pipeline) }
it 'displays the failure reason' do
visit(project_job_path(project, build))
wait_for_all_requests
within('.builds-container') do
expect(page).to have_selector(
......@@ -62,6 +63,7 @@ RSpec.describe 'User browses a job', :js do
let!(:artifact) { create(:ci_job_artifact, :unarchived_trace_artifact, job: build) }
it 'displays the failure reason from the live trace' do
visit(project_job_path(project, build))
wait_for_all_requests
within('.builds-container') do
expect(page).to have_selector(
......@@ -75,6 +77,7 @@ RSpec.describe 'User browses a job', :js do
let!(:build_retried) { create(:ci_build, :failed, :retried, :trace_artifact, pipeline: pipeline) }
it 'displays the failure reason and retried label' do
visit(project_job_path(project, build))
wait_for_all_requests
within('.builds-container') do
expect(page).to have_selector(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment