Commit aed848cc authored by Angelo Gulina's avatar Angelo Gulina Committed by Jonas Wälter

Apply 3 suggestion(s) to 3 file(s)

parent 1c4a0e09
- feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar)
%ul.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs{ class: ('border-0' if feature_project_list_filter_bar) }
%ul.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs{ class: ('gl-border-0!' if feature_project_list_filter_bar) }
= nav_link(page: [dashboard_projects_path, root_path]) do
= link_to dashboard_projects_path, class: 'shortcuts-activity', data: {placement: 'right'} do
= _("Your projects")
......
......@@ -2,6 +2,6 @@
.col-12
.svg-content
= image_tag 'illustrations/labels.svg', data: { qa_selector: 'svg_content' }
.text-content.text-center.pt-0
%h4.text-center= s_('TopicsEmptyState|There are no topics to show.')
%p= _("You can apply topics to projects to categorize them.")
.text-content.gl-text-center.gl-pt-0!
%h4= _('There are no topics to show.')
%p= _('You can apply topics to projects to categorize them.')
......@@ -34332,6 +34332,9 @@ msgstr ""
msgid "There are no projects shared with this group yet"
msgstr ""
msgid "There are no topics to show."
msgstr ""
msgid "There are no variables yet."
msgstr ""
......@@ -35830,9 +35833,6 @@ msgstr ""
msgid "Topics (optional)"
msgstr ""
msgid "TopicsEmptyState|There are no topics to show."
msgstr ""
msgid "Total"
msgstr ""
......
......@@ -14,7 +14,7 @@ RSpec.describe 'Explore Topics' do
visit topics_explore_projects_path
expect(current_path).to eq topics_explore_projects_path
expect(page).to have_content('There are no topics to show')
expect(page).to have_content('There are no topics to show.')
end
end
......
......@@ -5,9 +5,9 @@ require 'spec_helper'
RSpec.describe 'User explores projects' do
context 'when some projects exist' do
let_it_be(:archived_project) { create(:project, :archived) }
let_it_be(:internal_project) { create(:project, :internal) }
let_it_be(:internal_project) { create(:project, :internal, topic_list: 'topic1') }
let_it_be(:private_project) { create(:project, :private) }
let_it_be(:public_project) { create(:project, :public) }
let_it_be(:public_project) { create(:project, :public, topic_list: 'topic1') }
context 'when not signed in' do
context 'when viewing public projects' do
......@@ -28,6 +28,29 @@ RSpec.describe 'User explores projects' do
expect(page).to have_current_path(new_user_session_path)
end
end
context 'when filtering for existing topic' do
before do
visit(explore_projects_path(topic: 'topic1'))
end
it 'shows correct projects' do
expect(page).to have_content(public_project.title)
expect(page).not_to have_content(internal_project.title)
expect(page).not_to have_content(private_project.title)
expect(page).not_to have_content(archived_project.title)
end
end
context 'when filtering for non-existing topic' do
before do
visit(explore_projects_path(topic: 'topic2'))
end
it 'shows correct empty state message' do
expect(page).to have_content('Explore public groups to find projects to contribute to.')
end
end
end
context 'when signed in' do
......@@ -88,6 +111,29 @@ RSpec.describe 'User explores projects' do
include_examples 'empty search results'
include_examples 'minimum search length'
end
context 'when filtering for existing topic' do
before do
visit(explore_projects_path(topic: 'topic1'))
end
it 'shows correct projects' do
expect(page).to have_content(public_project.title)
expect(page).to have_content(internal_project.title)
expect(page).not_to have_content(private_project.title)
expect(page).not_to have_content(archived_project.title)
end
end
context 'when filtering for non-existing topic' do
before do
visit(explore_projects_path(topic: 'topic2'))
end
it 'shows correct empty state message' do
expect(page).to have_content('Explore public groups to find projects to contribute to.')
end
end
end
end
......
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