From 3ea8721a0cf4fc6fe48cfa5ac32f3db19a3bb6d8 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Fri, 22 Mar 2013 10:57:26 +0800 Subject: [PATCH] MDL-38621 behat: New test According to MDLQA-1172, course short names may be displayed on the list of courses page. --- admin/tests/behat/display_short_names.feature | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 admin/tests/behat/display_short_names.feature diff --git a/admin/tests/behat/display_short_names.feature b/admin/tests/behat/display_short_names.feature new file mode 100644 index 00000000000..dc94a6f834b --- /dev/null +++ b/admin/tests/behat/display_short_names.feature @@ -0,0 +1,22 @@ +@admin +Feature: Display extended course names + In order to display more info about the courses + As a moodle admin + I need to display courses short names along with courses full names + + Background: + Given the following "courses" exists: + | fullname | shortname | category | + | Course fullname | C_shortname | 0 | + And I log in as "admin" + + Scenario: Courses list without extended course names (default value) + Then I should see "Course fullname" + And I should not see "C_shortname Course fullname" + + Scenario: Courses list with extended course names + Given I click on "Courses" "link" in the "//div[@id='settingsnav']//descendant::li[contains(concat(' ', @class, ' '), ' type_setting ')][not(contains(., 'Site administration'))][contains(., 'Appearance')]" "xpath_element" + And I check "Display extended course names" + When I press "Save changes" + And I am on homepage + Then I should see "C_shortname Course fullname"