[ARVADOS] created: 4999699d7614f214eb8718b85c5c30e9fb382c23
git at public.curoverse.com
git at public.curoverse.com
Fri Jul 17 14:40:50 EDT 2015
at 4999699d7614f214eb8718b85c5c30e9fb382c23 (commit)
commit 4999699d7614f214eb8718b85c5c30e9fb382c23
Author: Manoj <jonam33 at gmail.com>
Date: Fri Jul 17 14:39:04 2015 -0400
6652-Added tests for the system menu and each of the pages in the
dropdown menu.
diff --git a/apps/workbench/test/integration/system_menu_test.rb b/apps/workbench/test/integration/system_menu_test.rb
new file mode 100644
index 0000000..7e67b1b
--- /dev/null
+++ b/apps/workbench/test/integration/system_menu_test.rb
@@ -0,0 +1,42 @@
+require 'integration_helper'
+
+class SystemMenuTest < ActionDispatch::IntegrationTest
+ # These tests don't do state-changing API calls. Save some time by
+ # skipping the database reset.
+ reset_api_fixtures :after_each_test, false
+ reset_api_fixtures :after_suite, true
+
+ setup do
+ need_javascript
+ end
+
+ [
+ #['Repositories','repository','Attributes'], Fails due to #6652
+ ['Virtual machines','virtual machine','current_user_logins'],
+ ['SSH keys','authorized key','public_key'],
+ ['Links','link','link_class'],
+ ['Groups','group','group_class'],
+ ['Compute nodes','node','info[ping_secret'],
+ ['Keep services','keep service','service_ssl_flag'],
+ ['Keep disks', 'keep disk','bytes_free'],
+ ].each do |page_name, add_button_text, look_for|
+
+ test "test system menu #{page_name} link" do
+ visit page_with_token('admin')
+ within('.navbar-fixed-top') do
+ page.find("#system-menu").click
+ within('.dropdown-menu') do
+ assert_selector 'a', text: page_name
+ find('a', text: page_name).click
+ end
+ end
+
+ # click the add button
+ assert_selector 'button', text: "Add a new #{add_button_text}"
+ find('button', text: "Add a new #{add_button_text}").click
+
+ # look for unique property in the created object page
+ assert page.has_text? look_for
+ end
+ end
+end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list