diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-02 08:05:43 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-05-02 08:05:43 +0000 |
commit | 5412020762b676fdfba5991b59ebec7adc59aeca (patch) | |
tree | fe3754b7bc5dcf79e60af58bdfcede76d9e830ef /spec/features/explore | |
parent | 54beb93ac30371c978d80b03a8e0c386ca75fdb5 (diff) | |
download | gitlab-ce-5412020762b676fdfba5991b59ebec7adc59aeca.tar.gz |
Better Explore Groups view
Diffstat (limited to 'spec/features/explore')
-rw-r--r-- | spec/features/explore/groups_list_spec.rb | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/spec/features/explore/groups_list_spec.rb b/spec/features/explore/groups_list_spec.rb index 8e5421a984b..9828cb179a7 100644 --- a/spec/features/explore/groups_list_spec.rb +++ b/spec/features/explore/groups_list_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Explore Groups page', js: true, feature: true do +describe 'Explore Groups page', :js, :feature do let!(:user) { create :user } let!(:group) { create(:group) } let!(:public_group) { create(:group, :public) } @@ -46,19 +46,39 @@ describe 'Explore Groups page', js: true, feature: true do it 'shows non-archived projects count' do # Initially project is not archived expect(find('.js-groups-list-holder .content-list li:first-child .stats span:first-child')).to have_text("1") - + # Archive project empty_project.archive! visit explore_groups_path # Check project count expect(find('.js-groups-list-holder .content-list li:first-child .stats span:first-child')).to have_text("0") - + # Unarchive project empty_project.unarchive! visit explore_groups_path # Check project count - expect(find('.js-groups-list-holder .content-list li:first-child .stats span:first-child')).to have_text("1") + expect(find('.js-groups-list-holder .content-list li:first-child .stats span:first-child')).to have_text("1") + end + + describe 'landing component' do + it 'should show a landing component' do + expect(page).to have_content('Below you will find all the groups that are public.') + end + + it 'should be dismissable' do + find('.dismiss-button').click + + expect(page).not_to have_content('Below you will find all the groups that are public.') + end + + it 'should persistently not show once dismissed' do + find('.dismiss-button').click + + visit explore_groups_path + + expect(page).not_to have_content('Below you will find all the groups that are public.') + end end end |