[ARVADOS] updated: b7b408b33fee197dcc6e04353a58959595a4156d
Git user
git at public.curoverse.com
Wed Jun 21 15:39:21 EDT 2017
Summary of changes:
.../test/controllers/collections_controller_test.rb | 14 +++++++++-----
apps/workbench/test/integration/collections_test.rb | 6 ++++++
2 files changed, 15 insertions(+), 5 deletions(-)
via b7b408b33fee197dcc6e04353a58959595a4156d (commit)
from f028cd05df30e4fba77d85743be1c509cd7adfdf (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 b7b408b33fee197dcc6e04353a58959595a4156d
Author: radhika <radhika at curoverse.com>
Date: Wed Jun 21 15:39:00 2017 -0400
9426: update test assertions
Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika at curoverse.com>
diff --git a/apps/workbench/test/controllers/collections_controller_test.rb b/apps/workbench/test/controllers/collections_controller_test.rb
index a2785c4..2e0f94e 100644
--- a/apps/workbench/test/controllers/collections_controller_test.rb
+++ b/apps/workbench/test/controllers/collections_controller_test.rb
@@ -797,7 +797,8 @@ class CollectionsControllerTest < ActionController::TestCase
collection = api_fixture('collections')['collection_with_tags_owned_by_active']
- new_tags = {"new_tag1": "new_tag1_value", "new_tag2": "new_tag2_value"}
+ new_tags = {"new_tag1" => "new_tag1_value",
+ "new_tag2" => "new_tag2_value"}
post :save_tags, {
id: collection['uuid'],
@@ -814,10 +815,13 @@ class CollectionsControllerTest < ActionController::TestCase
assert_equal false, response.body.include?("value for existing tag 1")
updated_properties = Collection.find(collection['uuid']).properties
- assert_equal true, new_tags.keys.include?(:'new_tag1')
- assert_equal true, new_tags.keys.include?(:'new_tag2')
- assert_equal false, new_tags.keys.include?(:'existing tag 1')
- assert_equal false, new_tags.keys.include?(:'existing tag 2')
+ updated_tags = updated_properties[:tags]
+ assert_equal true, updated_tags.keys.include?(:'new_tag1')
+ assert_equal new_tags['new_tag1'], updated_tags[:'new_tag1']
+ assert_equal true, updated_tags.keys.include?(:'new_tag2')
+ assert_equal new_tags['new_tag2'], updated_tags[:'new_tag2']
+ assert_equal false, updated_tags.keys.include?(:'existing tag 1')
+ assert_equal false, updated_tags.keys.include?(:'existing tag 2')
assert_equal true, updated_properties.keys.include?(:'some other property')
assert_equal 'value for the other property', updated_properties[:'some other property']
end
diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb
index 208379c..dbdcef8 100644
--- a/apps/workbench/test/integration/collections_test.rb
+++ b/apps/workbench/test/integration/collections_test.rb
@@ -427,6 +427,7 @@ class CollectionsTest < ActionDispatch::IntegrationTest
visit page_with_token('active', '/collections/zzzzz-4zz18-bv31uwvy3neko21')
click_link 'Tags'
+ wait_for_ajax
# verify initial state
assert_selector 'a', text: 'Edit'
@@ -459,6 +460,7 @@ class CollectionsTest < ActionDispatch::IntegrationTest
editable_val_fields[1].set('value 2')
click_on 'Save'
+ wait_for_ajax
# added tags; verify
assert_text 'key 1'
@@ -473,6 +475,7 @@ class CollectionsTest < ActionDispatch::IntegrationTest
assert_not_nil first('.glyphicon-remove')
first('.glyphicon-remove').click
click_on 'Save'
+ wait_for_ajax
assert_text 'key 2'
assert_text 'value 2'
@@ -488,6 +491,7 @@ class CollectionsTest < ActionDispatch::IntegrationTest
first('.collection-tag-field-value').set('this value wont stick')
click_on 'Cancel'
+ wait_for_ajax
assert_text 'key 2'
assert_text 'value 2'
@@ -498,6 +502,8 @@ class CollectionsTest < ActionDispatch::IntegrationTest
first('.edit-collection-tags').click
first('.glyphicon-remove').click
click_on 'Save'
+ wait_for_ajax
+
assert_selector 'a', text: 'Edit'
assert_no_text 'key 2'
assert_no_text 'value 2'
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list