From 67472674e099a0f2d278cabc66c7737279c015e2 Mon Sep 17 00:00:00 2001 From: Jinelle Foley-Barnes Date: Mon, 20 Apr 2015 14:50:32 +1200 Subject: [PATCH] Behat Testsuite: Tidying admin feature files (Bug #1446395) To see what's been changed look in /test/behat/features/admin Change-Id: Ic768495672c15ab9eb99ae902ff2a587e5d191eb --- .../admin/add_institution_and_users.feature | 46 ------------------- .../features/admin/configure_menus.feature | 29 ------------ .../admin/create_and_delete_menu_item.feature | 19 ++++++++ .../features/admin/group_categories.feature | 2 +- .../admin/switch_site_options.feature | 15 ------ 5 files changed, 20 insertions(+), 91 deletions(-) delete mode 100644 test/behat/features/admin/add_institution_and_users.feature delete mode 100644 test/behat/features/admin/configure_menus.feature delete mode 100644 test/behat/features/admin/switch_site_options.feature diff --git a/test/behat/features/admin/add_institution_and_users.feature b/test/behat/features/admin/add_institution_and_users.feature deleted file mode 100644 index 51de85edb6..0000000000 --- a/test/behat/features/admin/add_institution_and_users.feature +++ /dev/null @@ -1,46 +0,0 @@ -@javascript @core @core_administration -Feature: Creating an institution then adding users in different roles - In order to add users to the institution - As an admin I need to create an user and give institution privileges - So I can add it to the institution - -Scenario: Creating an institution and users - # Log in as "Admin" user - Given I log in as "admin" with password "Password1" - # Verifying log in was successful - And I should see "Admin User" - # Creating an Institution - And I follow "Administration" - And I follow "Institutions" - And I press "Add institution" - And I fill in the following: - | Institution name | institutionone | - | Institution display name | institution One | - And I press "Submit" - # Verifying Institution was created successfully - And I should see "Institution added successfully" - # Creating user 1 as Institution administrator" - Then I follow "Users" - And I choose "Add user" in "Users" - And I fill in the following: - | firstname | bob | - | lastname | bobby | - | email | bob@example.com | - | username | bob | - | password | mahara1 | - And I select "institution One" from "Institution" - And I check "Institution administrator" - And I press "Create user" - # Creating user 2 as a normal Institution member - And I follow "Users" - And I choose "Add user" in "Users" - And I fill in the following: - | firstname | Jen | - | lastname | Jenny | - | email | jen@example.com | - | username | jen | - | password | mahara1 | - And I select "institution One" from "Institution" - And I press "Create user" - # Verifying user was added successfully - And I should see "New user account created successfully" diff --git a/test/behat/features/admin/configure_menus.feature b/test/behat/features/admin/configure_menus.feature deleted file mode 100644 index 6715cd962a..0000000000 --- a/test/behat/features/admin/configure_menus.feature +++ /dev/null @@ -1,29 +0,0 @@ -@javascript @core @core_administration -Feature: Configuration of menus page in site configuration -In order to be able to change the menu configuration -As an admin -So I can benefit from the use of the configuration changes - - Scenario: Turning switches on and off on Menus page in Configure site (Bug 1431569) - Given I log in as "admin" with password "Password1" - And I follow "Administration" - And I choose "Menus" in "Configure site" - # Checking the default settings are correct - And the following fields match these values: - | Terms and conditions | 0 | - | Privacy statement | 1 | - | About | 1 | - | Contact us | 1 | - # Flicking the switches to the opposite - And I set the following fields to these values: - | Terms and conditions | 1 | - | Privacy statement | 0 | - | About | 0 | - | Contact us | 0 | -# Checking the switches held the setting - And the following fields match these values: - | Terms and conditions | 1 | - | Privacy statement | 0 | - | About | 0 | - | Contact us | 0 | - And I press "Save changes" diff --git a/test/behat/features/admin/create_and_delete_menu_item.feature b/test/behat/features/admin/create_and_delete_menu_item.feature index 2c2ffb5b79..5e19f8983d 100644 --- a/test/behat/features/admin/create_and_delete_menu_item.feature +++ b/test/behat/features/admin/create_and_delete_menu_item.feature @@ -28,3 +28,22 @@ Scenario: Creating and deleting external links (Selenium 1426983) And I select "Logged-in links and resources" from "Edit:" And I press "Delete" And I press "Save changes" + # Checking the default settings are correct + And the following fields match these values: + | Terms and conditions | 0 | + | Privacy statement | 1 | + | About | 1 | + | Contact us | 1 | + # Flicking the switches to the opposite + And I set the following fields to these values: + | Terms and conditions | 1 | + | Privacy statement | 0 | + | About | 0 | + | Contact us | 0 | + # Checking the switches held the setting + And the following fields match these values: + | Terms and conditions | 1 | + | Privacy statement | 0 | + | About | 0 | + | Contact us | 0 | + And I press "Save changes" diff --git a/test/behat/features/admin/group_categories.feature b/test/behat/features/admin/group_categories.feature index 1cc85e7d28..4296a36a05 100644 --- a/test/behat/features/admin/group_categories.feature +++ b/test/behat/features/admin/group_categories.feature @@ -1,4 +1,4 @@ -@javascript @core @core_administration +@javascript @core @core_administration @core_group Feature: Group categories settings In order to enable group categories As an admin diff --git a/test/behat/features/admin/switch_site_options.feature b/test/behat/features/admin/switch_site_options.feature deleted file mode 100644 index ecf5dc41ea..0000000000 --- a/test/behat/features/admin/switch_site_options.feature +++ /dev/null @@ -1,15 +0,0 @@ -@javascript @core @core_administration -Feature: User options lang string and switch -In order to use the switch -As as admin -So change the settings - -Scenario: Checking lang string on switch on site options user settings page (Bug 1432523 & 1431569) - Given I log in as "admin" with password "Password1" - And I go to "admin/site/options.php" - And I follow "User settings" - And the "Profile access for all registered users" checkbox should be checked - And I uncheck "Profile access for all registered users" - And I check "Profile access for all registered users" - And I should see "Profile access for all registered users" - And I press "Update site options" -- GitLab