diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 18:09:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 18:09:36 +0300 |
commit | 074d013e1eb3f6e0c27f96a3be8b9361254c8a98 (patch) | |
tree | f185c474ddc8624a4793c84b0b1f4cc07349694b /spec/features/projects/wiki | |
parent | 8f9beefac3774b30e911fb00a68f4c7a5244cf27 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects/wiki')
-rw-r--r-- | spec/features/projects/wiki/user_creates_wiki_page_spec.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb index e67982bbd31..67996cc3e5d 100644 --- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb @@ -312,7 +312,6 @@ describe "User creates wiki page" do visit(project_wikis_path(project)) expect(page).to have_content('another') - expect(page).to have_content('More Pages') end context 'when there is a customized sidebar' do @@ -324,10 +323,23 @@ describe "User creates wiki page" do visit(project_wikis_path(project)) expect(page).to have_content('My customized sidebar') - expect(page).to have_content('More Pages') expect(page).not_to have_content('Another') end end end + + context 'when there are more than 15 existing pages' do + before do + create(:wiki_page, wiki: wiki, attrs: { title: 'home', content: 'home' }) + (1..14).each { |i| create(:wiki_page, wiki: wiki, attrs: { title: "page-#{i}", content: "page #{i}" }) } + end + + it 'renders a default sidebar when there is no customized sidebar' do + visit(project_wikis_path(project)) + + expect(page).to have_content('View All Pages') + expect(page).to have_content('page 1') + end + end end end |