Commit 3e113661 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'sh-wait-for-requests-commit-spec' into 'master'

Attempt to make signed_commits_spec.rb less flaky

Closes #216530

See merge request gitlab-org/gitlab!36534
parents 4d8b9cfe 2aa0c849
...@@ -72,6 +72,7 @@ RSpec.describe 'GPG signed commits' do ...@@ -72,6 +72,7 @@ RSpec.describe 'GPG signed commits' do
it 'unverified signature' do it 'unverified signature' do
visit project_commit_path(project, GpgHelpers::SIGNED_COMMIT_SHA) visit project_commit_path(project, GpgHelpers::SIGNED_COMMIT_SHA)
wait_for_all_requests
page.find('.gpg-status-box', text: 'Unverified').click page.find('.gpg-status-box', text: 'Unverified').click
...@@ -85,6 +86,7 @@ RSpec.describe 'GPG signed commits' do ...@@ -85,6 +86,7 @@ RSpec.describe 'GPG signed commits' do
user_2_key user_2_key
visit project_commit_path(project, GpgHelpers::DIFFERING_EMAIL_SHA) visit project_commit_path(project, GpgHelpers::DIFFERING_EMAIL_SHA)
wait_for_all_requests
page.find('.gpg-status-box', text: 'Unverified').click page.find('.gpg-status-box', text: 'Unverified').click
...@@ -100,6 +102,7 @@ RSpec.describe 'GPG signed commits' do ...@@ -100,6 +102,7 @@ RSpec.describe 'GPG signed commits' do
user_2_key user_2_key
visit project_commit_path(project, GpgHelpers::SIGNED_COMMIT_SHA) visit project_commit_path(project, GpgHelpers::SIGNED_COMMIT_SHA)
wait_for_all_requests
page.find('.gpg-status-box', text: 'Unverified').click page.find('.gpg-status-box', text: 'Unverified').click
...@@ -115,6 +118,7 @@ RSpec.describe 'GPG signed commits' do ...@@ -115,6 +118,7 @@ RSpec.describe 'GPG signed commits' do
user_1_key user_1_key
visit project_commit_path(project, GpgHelpers::SIGNED_AND_AUTHORED_SHA) visit project_commit_path(project, GpgHelpers::SIGNED_AND_AUTHORED_SHA)
wait_for_all_requests
page.find('.gpg-status-box', text: 'Verified').click page.find('.gpg-status-box', text: 'Verified').click
...@@ -130,6 +134,7 @@ RSpec.describe 'GPG signed commits' do ...@@ -130,6 +134,7 @@ RSpec.describe 'GPG signed commits' do
user_1_key user_1_key
visit project_commit_path(project, GpgHelpers::SIGNED_AND_AUTHORED_SHA) visit project_commit_path(project, GpgHelpers::SIGNED_AND_AUTHORED_SHA)
wait_for_all_requests
# wait for the signature to get generated # wait for the signature to get generated
expect(page).to have_selector('.gpg-status-box', text: 'Verified') expect(page).to have_selector('.gpg-status-box', text: 'Verified')
...@@ -137,6 +142,7 @@ RSpec.describe 'GPG signed commits' do ...@@ -137,6 +142,7 @@ RSpec.describe 'GPG signed commits' do
user_1.destroy! user_1.destroy!
refresh refresh
wait_for_all_requests
page.find('.gpg-status-box', text: 'Verified').click page.find('.gpg-status-box', text: 'Verified').click
...@@ -153,6 +159,7 @@ RSpec.describe 'GPG signed commits' do ...@@ -153,6 +159,7 @@ RSpec.describe 'GPG signed commits' do
shared_examples 'a commit with a signature' do shared_examples 'a commit with a signature' do
before do before do
visit project_tree_path(project, 'signed-commits') visit project_tree_path(project, 'signed-commits')
wait_for_all_requests
end end
it 'displays commit signature' do it 'displays commit signature' do
......
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