[ARVADOS] updated: 71da9f42b396e6ae8d7ef83b1855d5bb407c2a17
Git user
git at public.curoverse.com
Wed Oct 4 08:24:31 EDT 2017
Summary of changes:
.../test/controllers/projects_controller_test.rb | 1 -
apps/workbench/test/integration/trash_test.rb | 75 ++++++++++++++++++++++
2 files changed, 75 insertions(+), 1 deletion(-)
via 71da9f42b396e6ae8d7ef83b1855d5bb407c2a17 (commit)
via bbdc17a01f835ad500ef8ffbe4da94dd0f933a44 (commit)
from 6be1049f8864afbbdb7f3745359417c06d30081b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 71da9f42b396e6ae8d7ef83b1855d5bb407c2a17
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Oct 4 08:23:00 2017 -0400
12125: Expand test case.
Tests trashing project and checking that it shows up on the trash page. Tests
UI using both trash/recycle buttons and using selections.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/apps/workbench/test/integration/trash_test.rb b/apps/workbench/test/integration/trash_test.rb
index 3e7d897..d01f636 100644
--- a/apps/workbench/test/integration/trash_test.rb
+++ b/apps/workbench/test/integration/trash_test.rb
@@ -55,32 +55,79 @@ class TrashTest < ActionDispatch::IntegrationTest
assert_no_text expired2['uuid']
end
- test "trashed projects" do
- deleted = api_fixture('groups')['trashed_project']
-
- # verify that the un-trashed item are missing in /groups page
- visit page_with_token('active', "/groups")
- assert_no_text deleted['uuid']
-
- # visit trash page
- visit page_with_token('active', "/trash")
- click_on "Trashed projects"
-
- assert_text deleted['name']
- assert_text deleted['uuid']
-
- # Un-trash item using the recycle button
- within('tr', text: deleted['name']) do
- first('.fa-recycle').click
+ ["button","selection"].each do |method|
+ test "trashed projects using #{method}" do
+ deleted = api_fixture('groups')['trashed_project']
+ aproject = api_fixture('groups')['aproject']
+
+ # verify that the un-trashed item are missing in /groups page
+ visit page_with_token('active', "/projects/zzzzz-tpzed-xurymjxw79nv3jz")
+ click_on "Subprojects"
+ assert_no_text deleted['name']
+
+ # visit trash page
+ visit page_with_token('active', "/trash")
+ click_on "Trashed projects"
+
+ assert_text deleted['name']
+ assert_text deleted['uuid']
+ assert_no_text aproject['name']
+ assert_no_text aproject['uuid']
+
+ # Un-trash item
+ if method == "button"
+ within('tr', text: deleted['name']) do
+ first('.fa-recycle').click
+ end
+ else
+ within('tr', text: deleted['name']) do
+ first('input').click
+ end
+ click_button 'Selection...'
+ within('.selection-action-container') do
+ click_link 'Un-trash selected items'
+ end
+ end
+
+ wait_for_ajax
+
+ assert_no_text deleted['name']
+ visit current_path
+ assert_no_text deleted['name']
+
+ # check that the un-trashed item are now shown on parent project page
+ visit page_with_token('active', "/projects/zzzzz-tpzed-xurymjxw79nv3jz")
+ click_on "Subprojects"
+ assert_text deleted['name']
+ assert_text aproject['name']
+
+ # Trash another item
+ if method == "button"
+ within('tr', text: aproject['name']) do
+ first('.fa-trash-o').click
+ end
+ else
+ within('tr', text: aproject['name']) do
+ first('input').click
+ end
+ click_button 'Selection'
+ within('.selection-action-container') do
+ click_link 'Remove selected'
+ end
+ end
+
+ wait_for_ajax
+ assert_no_text aproject['name']
+ visit current_path
+ assert_no_text aproject['name']
+
+ # visit trash page
+ visit page_with_token('active', "/trash")
+ click_on "Trashed projects"
+
+ assert_text aproject['name']
+ assert_text aproject['uuid']
end
-
- wait_for_ajax
-
- assert_no_text deleted['uuid']
-
- # verify that the un-trashed item are now shown in /groups page
- visit page_with_token('active', "/groups")
- assert_text deleted['uuid']
end
test "trash page with search" do
commit bbdc17a01f835ad500ef8ffbe4da94dd0f933a44
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Oct 3 21:05:54 2017 -0400
12125: Adding test
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/apps/workbench/test/controllers/projects_controller_test.rb b/apps/workbench/test/controllers/projects_controller_test.rb
index f45f178..bdf983f 100644
--- a/apps/workbench/test/controllers/projects_controller_test.rb
+++ b/apps/workbench/test/controllers/projects_controller_test.rb
@@ -146,7 +146,6 @@ class ProjectsControllerTest < ActionController::TestCase
# An object which does not offer an expired_at field but has a xx_owner_uuid_name_unique constraint
# will be renamed when removed and another object with the same name exists in user's home project.
[
- ['groups', 'subproject_in_asubproject_with_same_name_as_one_in_active_user_home'],
['pipeline_templates', 'template_in_asubproject_with_same_name_as_one_in_active_user_home'],
].each do |dm, fixture|
test "removing #{dm} from a subproject results in renaming it when there is another such object with same name in home project" do
diff --git a/apps/workbench/test/integration/trash_test.rb b/apps/workbench/test/integration/trash_test.rb
index 5c6987e..3e7d897 100644
--- a/apps/workbench/test/integration/trash_test.rb
+++ b/apps/workbench/test/integration/trash_test.rb
@@ -55,6 +55,34 @@ class TrashTest < ActionDispatch::IntegrationTest
assert_no_text expired2['uuid']
end
+ test "trashed projects" do
+ deleted = api_fixture('groups')['trashed_project']
+
+ # verify that the un-trashed item are missing in /groups page
+ visit page_with_token('active', "/groups")
+ assert_no_text deleted['uuid']
+
+ # visit trash page
+ visit page_with_token('active', "/trash")
+ click_on "Trashed projects"
+
+ assert_text deleted['name']
+ assert_text deleted['uuid']
+
+ # Un-trash item using the recycle button
+ within('tr', text: deleted['name']) do
+ first('.fa-recycle').click
+ end
+
+ wait_for_ajax
+
+ assert_no_text deleted['uuid']
+
+ # verify that the un-trashed item are now shown in /groups page
+ visit page_with_token('active', "/groups")
+ assert_text deleted['uuid']
+ end
+
test "trash page with search" do
deleted = api_fixture('collections')['deleted_on_next_sweep']
expired = api_fixture('collections')['unique_expired_collection']
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list