Commit d80080b5 authored by Walmyr Lima's avatar Walmyr Lima

Move test method to the bottom

The reason for the change is that reading the code it should be si-
milar to reading a newspaper, where high-level information is at
the top, like the title and summary of the news, and low level, or
more specific information, are at the bottom.

This improves code readability.
parent 33d5ec5b
...@@ -3,11 +3,6 @@ ...@@ -3,11 +3,6 @@
module QA module QA
context 'Create' do context 'Create' do
describe 'Wiki management' do describe 'Wiki management' do
def validate_content(content)
expect(page).to have_content('Wiki was successfully updated')
expect(page).to have_content(/#{content}/)
end
it 'user creates, edits, clones, and pushes to the wiki' do it 'user creates, edits, clones, and pushes to the wiki' do
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials) Page::Main::Login.perform(&:sign_in_using_credentials)
...@@ -38,6 +33,11 @@ module QA ...@@ -38,6 +33,11 @@ module QA
expect(page).to have_content('My Third Wiki Content') expect(page).to have_content('My Third Wiki Content')
end end
def validate_content(content)
expect(page).to have_content('Wiki was successfully updated')
expect(page).to have_content(/#{content}/)
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment