summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/features/wiki
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 08:27:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 08:27:35 +0000
commit7e9c479f7de77702622631cff2628a9c8dcbc627 (patch)
treec8f718a08e110ad7e1894510980d2155a6549197 /spec/support/shared_examples/features/wiki
parente852b0ae16db4052c1c567d9efa4facc81146e88 (diff)
downloadgitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/support/shared_examples/features/wiki')
-rw-r--r--spec/support/shared_examples/features/wiki/user_deletes_wiki_page_shared_examples.rb4
-rw-r--r--spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb4
-rw-r--r--spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb6
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/support/shared_examples/features/wiki/user_deletes_wiki_page_shared_examples.rb b/spec/support/shared_examples/features/wiki/user_deletes_wiki_page_shared_examples.rb
index e1fd9c8dbec..ee0261771f9 100644
--- a/spec/support/shared_examples/features/wiki/user_deletes_wiki_page_shared_examples.rb
+++ b/spec/support/shared_examples/features/wiki/user_deletes_wiki_page_shared_examples.rb
@@ -17,8 +17,8 @@ RSpec.shared_examples 'User deletes wiki page' do
it 'deletes a page', :js do
click_on('Edit')
click_on('Delete')
- find('.modal-footer .btn-danger').click
+ find('[data-testid="confirm_deletion_button"]').click
- expect(page).to have_content('Page was successfully deleted')
+ expect(page).to have_content('Wiki page was successfully deleted.')
end
end
diff --git a/spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb b/spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb
index 1a5f8d7d8df..3350e54a8a7 100644
--- a/spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb
+++ b/spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb
@@ -213,11 +213,11 @@ RSpec.shared_examples 'User updates wiki page' do
visit wiki_page_path(wiki_page.wiki, wiki_page, action: :edit)
end
- it 'allows changing the title if the content does not change' do
+ it 'allows changing the title if the content does not change', :js do
fill_in 'Title', with: 'new title'
click_on 'Save changes'
- expect(page).to have_content('Wiki was successfully updated.')
+ expect(page).to have_content('Wiki page was successfully updated.')
end
it 'shows a validation error when trying to change the content' do
diff --git a/spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb b/spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb
index 85eedbf4cc5..af769be6d4b 100644
--- a/spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb
+++ b/spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb
@@ -33,7 +33,7 @@ RSpec.shared_examples 'User views a wiki page' do
click_on('Create page')
end
- expect(page).to have_content('Wiki was successfully updated.')
+ expect(page).to have_content('Wiki page was successfully created.')
end
it 'shows the history of a page that has a path' do
@@ -49,7 +49,7 @@ RSpec.shared_examples 'User views a wiki page' do
end
end
- it 'shows an old version of a page' do
+ it 'shows an old version of a page', :js do
expect(current_path).to include('one/two/three-test')
expect(find('.wiki-pages')).to have_content('three')
@@ -65,7 +65,7 @@ RSpec.shared_examples 'User views a wiki page' do
fill_in('Content', with: 'Updated Wiki Content')
click_on('Save changes')
- expect(page).to have_content('Wiki was successfully updated.')
+ expect(page).to have_content('Wiki page was successfully updated.')
click_on('Page history')