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.
This commit is contained in:
Walmyr Lima 2019-04-29 13:34:01 +02:00
parent 33d5ec5b56
commit d80080b5cb
1 changed files with 5 additions and 5 deletions

View File

@ -3,11 +3,6 @@
module QA
context 'Create' 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
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
@ -38,6 +33,11 @@ module QA
expect(page).to have_content('My Third Wiki Content')
end
def validate_content(content)
expect(page).to have_content('Wiki was successfully updated')
expect(page).to have_content(/#{content}/)
end
end
end
end