Skip to content
代码片段 群组 项目
未验证 提交 ac04f6ea 编辑于 作者: Florie Guibert's avatar Florie Guibert 提交者: GitLab
浏览文件

Merge branch '418151-update-snippets-empty-state' into 'master'

Update 'Your work' -> 'Snippets' empty state to match user profile snippets

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/179169



Merged-by: default avatarFlorie Guibert <fguibert@gitlab.com>
Approved-by: default avatarChaoyue Zhao <czhao@gitlab.com>
Approved-by: default avatarAlyssa Trinh <atrinh@gitlab.com>
Approved-by: default avatarFlorie Guibert <fguibert@gitlab.com>
Reviewed-by: default avatarAlyssa Trinh <atrinh@gitlab.com>
Co-authored-by: default avatarajit <ajit@directshifts.com>
No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
......@@ -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,
......
......@@ -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"
......@@ -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
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册