diff options
Diffstat (limited to 'spec/support/shared_examples/features/wiki')
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') |