From f825607286746efaf2c036d8c7e6c68dd24a6869 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Tue, 10 Feb 2015 15:52:17 +0800 Subject: [PATCH] MDL-49150 behat: Removed unnecessary @javascript tags --- admin/tests/behat/filter_users.feature | 2 -- .../tool/monitor/tests/behat/disabled.feature | 3 +- .../behat/access_visible_cohorts.feature | 9 ++--- cohort/tests/behat/add_cohort.feature | 3 -- cohort/tests/behat/behat_cohort.php | 33 ++++++------------- cohort/tests/behat/view_cohorts.feature | 3 -- 6 files changed, 14 insertions(+), 39 deletions(-) diff --git a/admin/tests/behat/filter_users.feature b/admin/tests/behat/filter_users.feature index 8feb5422545..f8b930dd822 100644 --- a/admin/tests/behat/filter_users.feature +++ b/admin/tests/behat/filter_users.feature @@ -27,7 +27,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro And I add "User Three (three@example.com)" user to "CH1" cohort members And I follow "Browse list of users" - @javascript Scenario: Filter user accounts by role and cohort When I set the following fields to these values: | courserole_rl | Student | @@ -51,7 +50,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro And I should see "User Three" And I should see "User Four" - @javascript Scenario: Filter user accounts by confirm and authentication method When I set the following fields to these values: | Confirmed | No | diff --git a/admin/tool/monitor/tests/behat/disabled.feature b/admin/tool/monitor/tests/behat/disabled.feature index 24dbea6ade5..01c76197ff0 100644 --- a/admin/tool/monitor/tests/behat/disabled.feature +++ b/admin/tool/monitor/tests/behat/disabled.feature @@ -1,10 +1,9 @@ -@javascript @tool @tool_monitor +@tool @tool_monitor Feature: Enable/disable managment of the event monitor In order to manage event monitoring As an admin I need to enable/disable it - @javascript Scenario: Tool is disabled by default. Given I log in as "admin" When I navigate to "Event monitoring rules" node in "Site administration > Reports" diff --git a/cohort/tests/behat/access_visible_cohorts.feature b/cohort/tests/behat/access_visible_cohorts.feature index c777c860af9..8f5dc510454 100644 --- a/cohort/tests/behat/access_visible_cohorts.feature +++ b/cohort/tests/behat/access_visible_cohorts.feature @@ -44,12 +44,11 @@ Feature: Access visible and hidden cohorts | user | course | role | | teacher | C1 | editingteacher | - @javascript Scenario: Teacher can see visible cohorts defined in the above contexts When I log in as "teacher" And I follow "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" - And I set the field "Add method" to "Cohort sync" + And I select "Cohort sync" from the "Add method" singleselect Then the "Cohort" select box should contain "Cohort in category 1" And the "Cohort" select box should contain "System cohort" And the "Cohort" select box should not contain "Cohort hidden in category 1" @@ -71,13 +70,12 @@ Feature: Access visible and hidden cohorts And the "Select members from cohort" select box should not contain "Cohort empty in category 1" And the "Select members from cohort" select box should not contain "System empty cohort" - @javascript Scenario: System manager can see all cohorts defined in the above contexts When I log in as "user1" And I am on site homepage And I follow "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" - And I set the field "Add method" to "Cohort sync" + And I select "Cohort sync" from the "Add method" singleselect Then the "Cohort" select box should contain "Cohort in category 1" And the "Cohort" select box should contain "System cohort" And the "Cohort" select box should contain "Cohort hidden in category 1" @@ -99,13 +97,12 @@ Feature: Access visible and hidden cohorts And the "Select members from cohort" select box should not contain "Cohort empty in category 1" And the "Select members from cohort" select box should not contain "System empty cohort" - @javascript Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above When I log in as "user2" And I am on site homepage And I follow "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" - And I set the field "Add method" to "Cohort sync" + And I select "Cohort sync" from the "Add method" singleselect Then the "Cohort" select box should contain "Cohort in category 1" And the "Cohort" select box should contain "System cohort" And the "Cohort" select box should contain "Cohort hidden in category 1" diff --git a/cohort/tests/behat/add_cohort.feature b/cohort/tests/behat/add_cohort.feature index f6b551212d4..5906375e543 100644 --- a/cohort/tests/behat/add_cohort.feature +++ b/cohort/tests/behat/add_cohort.feature @@ -21,7 +21,6 @@ Feature: Add cohorts of users | Description | Test cohort description | And I press "Save changes" - @javascript Scenario: Add a cohort When I follow "Cohorts" Then I should see "Test cohort name" @@ -29,7 +28,6 @@ Feature: Add cohorts of users And I should see "Test cohort description" And I should see "Created manually" - @javascript Scenario: Add users to a cohort selecting them from the system users list When I add "First User (first@example.com)" user to "333" cohort members And I add "Second User (second@example.com)" user to "333" cohort members @@ -39,7 +37,6 @@ Feature: Add cohorts of users And the "Current users" select box should contain "Second User (second@example.com)" And the "Current users" select box should not contain "Forth User (forth@example.com)" - @javascript Scenario: Add users to a cohort using a bulk user action When I follow "Bulk user actions" And I set the field "Available" to "Third User" diff --git a/cohort/tests/behat/behat_cohort.php b/cohort/tests/behat/behat_cohort.php index 8c860b561fb..158ea869869 100644 --- a/cohort/tests/behat/behat_cohort.php +++ b/cohort/tests/behat/behat_cohort.php @@ -59,29 +59,16 @@ class behat_cohort extends behat_base { if (!$this->getSession()->getPage()->find('css', 'input#cohort_search_q')) { // With JS enabled we should expand a few tree nodes. - if ($this->running_javascript()) { - $parentnodes = get_string('administrationsite') . ' > ' . - get_string('users', 'admin') . ' > ' . - get_string('accounts', 'admin'); - $steps = array_merge( - array( - new Given('I am on homepage'), - new Given('I navigate to "' . get_string('cohorts', 'cohort') . '" node in "' . $parentnodes . '"') - ), - $steps - ); - - } else { - // JS disabled. - $steps = array_merge( - array( - new Given('I am on homepage'), - new Given('I follow "' . get_string('administrationsite') . '" node'), - new Given('I follow "' . get_string('cohorts', 'cohort') . '"') - ), - $steps - ); - } + $parentnodes = get_string('administrationsite') . ' > ' . + get_string('users', 'admin') . ' > ' . + get_string('accounts', 'admin'); + $steps = array_merge( + array( + new Given('I am on homepage'), + new Given('I navigate to "' . get_string('cohorts', 'cohort') . '" node in "' . $parentnodes . '"') + ), + $steps + ); } return $steps; diff --git a/cohort/tests/behat/view_cohorts.feature b/cohort/tests/behat/view_cohorts.feature index b5852722ce6..8e7a742e9d1 100644 --- a/cohort/tests/behat/view_cohorts.feature +++ b/cohort/tests/behat/view_cohorts.feature @@ -27,7 +27,6 @@ Feature: View cohort list | user1 | manager | System | | | user2 | manager | Category | CAT1 | - @javascript Scenario: Admin can see system cohorts and all cohorts When I log in as "admin" And I navigate to "Cohorts" node in "Site administration > Users > Accounts" @@ -40,7 +39,6 @@ Feature: View cohort list And I should see "Cohort in category 3" And I log out - @javascript Scenario: Manager can see system cohorts and all cohorts When I log in as "user1" And I navigate to "Cohorts" node in "Site administration > Users > Accounts" @@ -53,7 +51,6 @@ Feature: View cohort list And I should see "Cohort in category 3" And I log out - @javascript Scenario: Manager in category can see cohorts in the category When I log in as "user2" And I follow "Courses"