X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8d2aebfd3a0e4814b292659710386f949cafe092..9f1ce358ac564abf62965cccf2bf3afa3bcfef95:/apps/workbench/test/integration/users_test.rb diff --git a/apps/workbench/test/integration/users_test.rb b/apps/workbench/test/integration/users_test.rb index 1ae302c239..140cb56127 100644 --- a/apps/workbench/test/integration/users_test.rb +++ b/apps/workbench/test/integration/users_test.rb @@ -80,7 +80,8 @@ class UsersTest < ActionDispatch::IntegrationTest click_link 'Advanced' click_link 'Metadata' - assert !(page.has_text? 'VirtualMachine:') + assert page.has_text? 'can_login' # make sure page is rendered / ready + assert page.has_no_text? 'VirtualMachine:' end test "setup the active user" do @@ -197,4 +198,26 @@ class UsersTest < ActionDispatch::IntegrationTest click_link 'Metadata' assert page.has_text? 'VirtualMachine: testvm.shell' end + + test "test add group button" do + need_javascript + + user_url = "/users/#{api_fixture('users')['active']['uuid']}" + visit page_with_token('admin_trustedclient', user_url) + + # Setup user + click_link 'Admin' + assert page.has_text? 'As an admin, you can setup' + + click_link 'Add new group' + + within '.modal-content' do + fill_in "group_name_input", :with => "test-group-added-in-modal" + click_button "Create" + end + wait_for_ajax + + # Back in the user "Admin" tab + assert page.has_text? 'test-group-added-in-modal' + end end