We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f29e846 + 1c6350a commit 3aee0d1Copy full SHA for 3aee0d1
test/helpers/integration/navigation.rb
@@ -1,6 +1,12 @@
1
module Integration
2
module Navigation
3
4
+ def select_page_tab(tab)
5
+ return if find('#page_tabs li.tab.active').has_content?(tab)
6
+ click_page_tab(tab)
7
+ assert_page_tab(tab)
8
+ end
9
+
10
def click_page_tab(tab)
11
find('#page_tabs').click_on(tab)
12
end
test/helpers/integration/wiki.rb
@@ -2,9 +2,7 @@ module Integration
module Wiki
def update_wiki(content = nil)
# work around not being on edit to begin with
- click_page_tab 'Edit'
- # ensure the edit page is loaded
- find('li.active a.active', text: 'Edit')
+ select_page_tab 'Edit'
content ||= Faker::Lorem.paragraphs(4).join("\n")
within('form.edit_wiki') do
fill_in 'wiki[body]', with: content
0 commit comments