summaryrefslogtreecommitdiff
path: root/spec/features/signed_commits_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 09:08:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 09:08:39 +0000
commit1078b7bf25c2cb6e03c57da9ae25b0512858556f (patch)
treea50fbfaddb22aca89055296c4c532c7ecb2b1ca0 /spec/features/signed_commits_spec.rb
parent55733b19c526145cceb120e8bb874d476a84383a (diff)
downloadgitlab-ce-1078b7bf25c2cb6e03c57da9ae25b0512858556f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/signed_commits_spec.rb')
-rw-r--r--spec/features/signed_commits_spec.rb28
1 files changed, 12 insertions, 16 deletions
diff --git a/spec/features/signed_commits_spec.rb b/spec/features/signed_commits_spec.rb
index 851e155480b..3c7a31ac11b 100644
--- a/spec/features/signed_commits_spec.rb
+++ b/spec/features/signed_commits_spec.rb
@@ -15,8 +15,7 @@ describe 'GPG signed commits' do
visit project_commit_path(project, ref)
- expect(page).to have_button 'Unverified'
- expect(page).not_to have_button 'Verified'
+ expect(page).to have_selector('.gpg-status-box', text: 'Unverified')
# user changes their email which makes the gpg key verified
perform_enqueued_jobs do
@@ -26,8 +25,7 @@ describe 'GPG signed commits' do
visit project_commit_path(project, ref)
- expect(page).not_to have_button 'Unverified'
- expect(page).to have_button 'Verified'
+ expect(page).to have_selector('.gpg-status-box', text: 'Verified')
end
it 'changes from unverified to verified when the user adds the missing gpg key', :sidekiq_might_not_need_inline do
@@ -36,8 +34,7 @@ describe 'GPG signed commits' do
visit project_commit_path(project, ref)
- expect(page).to have_button 'Unverified'
- expect(page).not_to have_button 'Verified'
+ expect(page).to have_selector('.gpg-status-box', text: 'Unverified')
# user adds the gpg key which makes the signature valid
perform_enqueued_jobs do
@@ -46,8 +43,7 @@ describe 'GPG signed commits' do
visit project_commit_path(project, ref)
- expect(page).not_to have_button 'Unverified'
- expect(page).to have_button 'Verified'
+ expect(page).to have_selector('.gpg-status-box', text: 'Verified')
end
context 'shows popover badges', :js do
@@ -77,7 +73,7 @@ describe 'GPG signed commits' do
it 'unverified signature' do
visit project_commit_path(project, GpgHelpers::SIGNED_COMMIT_SHA)
- click_on 'Unverified'
+ page.find('.gpg-status-box', text: 'Unverified').click
within '.popover' do
expect(page).to have_content 'This commit was signed with an unverified signature.'
@@ -90,7 +86,7 @@ describe 'GPG signed commits' do
visit project_commit_path(project, GpgHelpers::DIFFERING_EMAIL_SHA)
- click_on 'Unverified'
+ page.find('.gpg-status-box', text: 'Unverified').click
within '.popover' do
expect(page).to have_content 'This commit was signed with a verified signature, but the committer email is not verified to belong to the same user.'
@@ -105,7 +101,7 @@ describe 'GPG signed commits' do
visit project_commit_path(project, GpgHelpers::SIGNED_COMMIT_SHA)
- click_on 'Unverified'
+ page.find('.gpg-status-box', text: 'Unverified').click
within '.popover' do
expect(page).to have_content "This commit was signed with a different user's verified signature."
@@ -120,7 +116,7 @@ describe 'GPG signed commits' do
visit project_commit_path(project, GpgHelpers::SIGNED_AND_AUTHORED_SHA)
- click_on 'Verified'
+ page.find('.gpg-status-box', text: 'Verified').click
within '.popover' do
expect(page).to have_content 'This commit was signed with a verified signature and the committer email is verified to belong to the same user.'
@@ -136,13 +132,13 @@ describe 'GPG signed commits' do
visit project_commit_path(project, GpgHelpers::SIGNED_AND_AUTHORED_SHA)
# wait for the signature to get generated
- expect(page).to have_button 'Verified'
+ expect(page).to have_selector('.gpg-status-box', text: 'Verified')
user_1.destroy!
refresh
- click_on 'Verified'
+ page.find('.gpg-status-box', text: 'Verified').click
within '.popover' do
expect(page).to have_content 'This commit was signed with a verified signature and the committer email is verified to belong to the same user.'
@@ -160,9 +156,9 @@ describe 'GPG signed commits' do
end
it 'displays commit signature' do
- expect(page).to have_button 'Unverified'
+ expect(page).to have_selector('.gpg-status-box', text: 'Unverified')
- click_on 'Unverified'
+ page.find('.gpg-status-box', text: 'Unverified').click
within '.popover' do
expect(page).to have_content 'This commit was signed with an unverified signature'