Commit e16d9395 authored by Walmyr Lima's avatar Walmyr Lima

Simplify test by not calling the same class twice

Also, wrapping assertions inside the same block.
parent fb72ef07
......@@ -87,16 +87,16 @@ module QA
Page::Project::Show.perform(&:create_new_file!)
Page::File::Form.perform do |form|
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(page).to have_content(template[:type])
expect(page).to have_content('Add new file')
expect(page).to have_content(template[:content])
expect(form).to have_content('The file has been successfully created.')
expect(form).to have_content(template[:type])
expect(form).to have_content('Add new file')
expect(form).to have_content(template[:content])
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