diff --git a/app/views/shared/empty_states/_snippets.html.haml b/app/views/shared/empty_states/_snippets.html.haml index e7c499dcbaabd150fe653f33c352f809a91fef76..1aa702ea5c852a5dfcc3744714a7ee93068a542b 100644 --- a/app/views/shared/empty_states/_snippets.html.haml +++ b/app/views/shared/empty_states/_snippets.html.haml @@ -4,17 +4,16 @@ - if current_user = render Pajamas::EmptyStateComponent.new(svg_path: illustration, - title: s_('SnippetsEmptyState|Code snippets'), + title: s_('SnippetsEmptyState|Get started with snippets'), primary_button_text: button_text, primary_button_link: button_path, primary_button_options: { data: { testid: 'create-first-snippet-link' } }, - secondary_button_text: _('Explore snippets'), - secondary_button_link: explore_snippets_path, + secondary_button_text: _('Learn More'), + secondary_button_link: help_page_path('user/snippets.md'), empty_state_options: { data: { testid: 'snippets-empty-state' } }) do |c| - c.with_description do - = s_('SnippetsEmptyState|Store, share, and embed small pieces of code and text.') - = link_to _('Learn more.'), help_page_path('user/snippets.md'), target: '_blank', rel: 'noopener noreferrer', class: 'gl-underline' + = s_('SnippetsEmptyState|Store, share, and embed bits of code and text.') - else = render Pajamas::EmptyStateComponent.new(svg_path: illustration, diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 8bcdd57fc75390ab239f84f465a916cdceaa6d84..39fc9314f3b8b82e8c93dbfaf6213fa25dcf21a6 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -55751,13 +55751,13 @@ msgstr "" msgid "Snippets with non-text files can only be edited via Git." msgstr "" -msgid "SnippetsEmptyState|Code snippets" +msgid "SnippetsEmptyState|Get started with snippets" msgstr "" msgid "SnippetsEmptyState|New snippet" msgstr "" -msgid "SnippetsEmptyState|Store, share, and embed small pieces of code and text." +msgid "SnippetsEmptyState|Store, share, and embed bits of code and text." msgstr "" msgid "SnippetsEmptyState|There are no snippets found" diff --git a/spec/features/dashboard/snippets_spec.rb b/spec/features/dashboard/snippets_spec.rb index a623fb25d5e7029be47f7ba198ce839b41b8e8d4..80269eb2cf57f14fb6382c6e9d554a67df24bbc7 100644 --- a/spec/features/dashboard/snippets_spec.rb +++ b/spec/features/dashboard/snippets_spec.rb @@ -7,11 +7,11 @@ it_behaves_like 'a "Your work" page with sidebar and breadcrumbs', :dashboard_snippets_path, :snippets - it 'links to the "Explore snippets" page' do + it 'links to the "Learn More" page' do sign_in(user) visit dashboard_snippets_path - expect(page).to have_link("Explore snippets", href: explore_snippets_path) + expect(page).to have_link("Learn More", href: help_page_path('user/snippets.md')) end context 'when the project has snippets' do @@ -47,7 +47,7 @@ it 'shows the empty state when there are no snippets' do element = page.find('.gl-empty-state') - expect(element).to have_content("Code snippets") + expect(element).to have_content("Get started with snippets") expect(element.find('img')['src']) .to have_content('illustrations/empty-state/empty-snippets-md') end @@ -57,11 +57,6 @@ expect(parent_element).to have_link('New snippet') end - it 'shows documentation button in main comment area' do - parent_element = page.find('.gl-empty-state') - expect(parent_element).to have_link('Learn more', href: help_page_path('user/snippets.md')) - end - it 'passes axe automated accessibility testing' do expect(page).to be_axe_clean.within('#content-body') end