Commit d958d282 authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'simplify-test-by-not-calling-the-same-class-twice' into 'master'

Simplify test by not calling the same class twice

See merge request gitlab-org/gitlab!20073
parents c4b6caf4 e16d9395
...@@ -87,16 +87,16 @@ module QA ...@@ -87,16 +87,16 @@ module QA
Page::Project::Show.perform(&:create_new_file!) Page::Project::Show.perform(&:create_new_file!)
Page::File::Form.perform do |form| Page::File::Form.perform do |form|
form.select_template template[:type], template[:template] form.select_template template[:type], template[:template]
end
expect(page).to have_content(template[:content]) expect(form).to have_content(template[:content])
Page::File::Form.perform(&:commit_changes) form.commit_changes
expect(page).to have_content('The file has been successfully created.') expect(form).to have_content('The file has been successfully created.')
expect(page).to have_content(template[:type]) expect(form).to have_content(template[:type])
expect(page).to have_content('Add new file') expect(form).to have_content('Add new file')
expect(page).to have_content(template[:content]) expect(form).to have_content(template[:content])
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