Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 12:08:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 12:08:39 +0300
commit1078b7bf25c2cb6e03c57da9ae25b0512858556f (patch)
treea50fbfaddb22aca89055296c4c532c7ecb2b1ca0 /spec/features
parent55733b19c526145cceb120e8bb874d476a84383a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/dashboard/snippets_spec.rb7
-rw-r--r--spec/features/signed_commits_spec.rb28
2 files changed, 18 insertions, 17 deletions
diff --git a/spec/features/dashboard/snippets_spec.rb b/spec/features/dashboard/snippets_spec.rb
index eb9d722e164..db5e56bdde0 100644
--- a/spec/features/dashboard/snippets_spec.rb
+++ b/spec/features/dashboard/snippets_spec.rb
@@ -32,7 +32,7 @@ describe 'Dashboard snippets' do
it 'shows the empty state when there are no snippets' do
element = page.find('.row.empty-state')
- expect(element).to have_content("Snippets are small pieces of code or notes that you want to keep.")
+ expect(element).to have_content("Code snippets")
expect(element.find('.svg-content img')['src']).to have_content('illustrations/snippets_empty')
end
@@ -40,6 +40,11 @@ describe 'Dashboard snippets' do
parent_element = page.find('.row.empty-state')
expect(parent_element).to have_link('New snippet')
end
+
+ it 'shows documentation button in main comment area' do
+ parent_element = page.find('.row.empty-state')
+ expect(parent_element).to have_link('Documentation', href: help_page_path('user/snippets.md'))
+ end
end
context 'filtering by visibility' do
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'