Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb12
1 files changed, 10 insertions, 2 deletions
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 3fac7e7093c..c6454f62f34 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
@@ -16,6 +16,10 @@ RSpec.shared_examples 'User views a wiki page' do
)
end
+ let(:more_actions_dropdown) do
+ find('[data-testid="wiki-more-dropdown"] button')
+ end
+
before do
sign_in(user)
end
@@ -38,10 +42,12 @@ RSpec.shared_examples 'User views a wiki page' do
expect(page).to have_content('Wiki page was successfully created.')
end
- it 'shows the history of a page that has a path' do
+ it 'shows the history of a page that has a path', :js do
expect(page).to have_current_path(%r{one/two/three-test})
first(:link, text: 'three').click
+
+ more_actions_dropdown.click
click_on('Page history')
expect(page).to have_current_path(%r{one/two/three-test})
@@ -69,6 +75,7 @@ RSpec.shared_examples 'User views a wiki page' do
expect(page).to have_content('Wiki page was successfully updated.')
+ more_actions_dropdown.click
click_on('Page history')
within('.wiki-page-header') do
@@ -119,11 +126,12 @@ RSpec.shared_examples 'User views a wiki page' do
wiki_page.update(message: 'updated home', content: 'updated [some link](other-page)') # rubocop:disable Rails/SaveBang
end
- it 'shows the page history' do
+ it 'shows the page history', :js do
visit(wiki_page_path(wiki, wiki_page))
expect(page).to have_selector('[data-testid="wiki-edit-button"]')
+ more_actions_dropdown.click
click_on('Page history')
expect(page).to have_content(user.name)