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