4951: Incorporate review feedback. Always show the request button, along with the...
[arvados.git] / apps / workbench / test / integration / user_manage_account_test.rb
index 28790b4a796fe2522facdc90f931e30a322385d8..a84d424d3ec730940f8fedb5c8c757da347561ae 100644 (file)
@@ -133,4 +133,22 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
       end
     end
   end
+
+  test "request shell access" do
+    visit page_with_token('spectator', '/manage_account')
+    assert_text 'You do not have access to any virtual machines'
+    click_button 'Send request for shell access'
+    assert_text 'A request for shell access was sent.'
+    assert_no_text 'You do not have access to any virtual machines.'
+
+    # revisit the page and verify that the Request button is no longer shown
+    within('.navbar-fixed-top') do
+      find('a', text: 'spectator').click
+      within('.dropdown-menu') do
+        find('a', text: 'Manage account').click
+      end
+    end
+    assert_text 'You do not have access to any virtual machines.'
+    assert_text 'A request for shell access was sent on '
+  end
 end