2872: Fix up tests
authorTom Clegg <tom@curoverse.com>
Mon, 2 Jun 2014 16:04:07 +0000 (12:04 -0400)
committerTom Clegg <tom@curoverse.com>
Mon, 2 Jun 2014 16:04:07 +0000 (12:04 -0400)
apps/workbench/test/integration/users_test.rb
apps/workbench/test/integration/virtual_machines_test.rb

index 7be12d7e2911d79fba601eaef1450e4419dbd282..b7bb49abc289118dcf02b21ebf0e3a56cd0e1fd9 100644 (file)
@@ -25,7 +25,7 @@ class UsersTest < ActionDispatch::IntegrationTest
     end
 
     find('tr', text: 'zzzzz-tpzed-xurymjxw79nv3jz').
-      find('a,button', text: 'Show').
+      find('a[data-original-title=show]').
       click
     assert page.has_text? 'Attributes'
     assert page.has_text? 'Metadata'
@@ -80,7 +80,7 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     # go to the new user's page
     find('tr', text: new_user_uuid).
-      find('a,button', text: 'Show').
+      find('a[data-original-title=show]').
       click
 
     assert page.has_text? 'modified_by_user_uuid'
@@ -107,7 +107,7 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     # click on active user
     find('tr', text: 'zzzzz-tpzed-xurymjxw79nv3jz').
-      find('a,button', text: 'Show').
+      find('a[data-original-title=show]').
       click
 
     # Setup user
@@ -167,7 +167,7 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     # click on active user
     find('tr', text: 'zzzzz-tpzed-xurymjxw79nv3jz').
-      find('a,button', text: 'Show').
+      find('a[data-original-title=show]').
       click
 
     # Verify that is_active is set
@@ -193,6 +193,7 @@ class UsersTest < ActionDispatch::IntegrationTest
       assert_equal "false", text, "Expected user's is_active to be false after unsetup"
     end
 
+    click_link 'Advanced'
     click_link 'Metadata'
     assert !(page.has_text? '(Repository: test_repo)')
     assert !(page.has_text? '(Repository: second_test_repo)')
@@ -213,6 +214,7 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     assert page.has_text? 'modified_by_client_uuid'
 
+    click_link 'Advanced'
     click_link 'Metadata'
     assert page.has_text? '(Repository: second_test_repo)'
     assert page.has_text? '(VirtualMachine: testvm.shell)'
index 7a40d0df0164fd04bcb53a0d749bdd386cfc637b..121941e2bda2ee1983a0fb8063d48aa38833a50c 100644 (file)
@@ -9,7 +9,7 @@ class VirtualMachinesTest < ActionDispatch::IntegrationTest
     assert page.has_text? 'testvm.shell'
     click_on 'Add a new virtual machine'
     find('tr', text: 'hostname').
-      find('span', text: 'none').click
+      find('a[data-original-title=edit]').click
     assert page.has_text? 'Update hostname'
     fill_in 'editable-text', with: 'testname'
     click_button 'editable-submit'