Commit 2fe09748 authored by svistas's avatar svistas

Fix delete action for package tests

Prior to this change, the click took
more than a couple of lines when it
could be achieved in less.

This change simpliflies and increases
readability and compactability of the
test
parent bbf4dfea
......@@ -104,9 +104,7 @@ module QA
index.click_package(package_name)
end
Page::Project::Packages::Show.perform do |package|
package.click_delete
end
Page::Project::Packages::Show.perform(&:click_delete)
Page::Project::Packages::Index.perform do |index|
aggregate_failures 'package deletion' do
......
......@@ -75,9 +75,7 @@ module QA
index.click_package(package_name)
end
Page::Project::Packages::Show.perform do |package|
package.click_delete
end
Page::Project::Packages::Show.perform(&:click_delete)
Page::Project::Packages::Index.perform do |index|
expect(index).to have_content("Package deleted successfully")
......
......@@ -100,9 +100,7 @@ module QA
index.click_package(package_name)
end
Page::Project::Packages::Show.perform do |package|
package.click_delete
end
Page::Project::Packages::Show.perform(&:click_delete)
Page::Project::Packages::Index.perform do |index|
aggregate_failures 'package deletion' do
......
......@@ -112,9 +112,7 @@ module QA
index.click_package(package_name)
end
Page::Project::Packages::Show.perform do |show|
show.click_delete
end
Page::Project::Packages::Show.perform(&:click_delete)
Page::Project::Packages::Index.perform do |index|
expect(index).to have_content("Package deleted successfully")
......
......@@ -78,9 +78,7 @@ module QA
index.click_package(package_name)
end
Page::Project::Packages::Show.perform do |package|
package.click_delete
end
Page::Project::Packages::Show.perform(&:click_delete)
Page::Project::Packages::Index.perform do |index|
expect(index).to have_content("Package deleted successfully")
......
......@@ -98,9 +98,7 @@ module QA
index.click_package(package_name)
end
Page::Project::Packages::Show.perform do |package|
package.click_delete
end
Page::Project::Packages::Show.perform(&:click_delete)
Page::Project::Packages::Index.perform do |index|
aggregate_failures do
......
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