AutorÃa | Ultima modificación | Ver Log |
@mod @mod_customcertFeature: Being able to set a site setting to determine whether or not to display the position X and Y fieldsIn order to ensure the show position X and Y fields setting works as expectedAs an adminI need to ensure teachers can see the position X and Y fields depending on the site settingBackground:Given the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 |And the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher |And the following "activities" exist:| activity | name | intro | course | idnumber || customcert | Custom certificate 1 | Custom certificate 1 intro | C1 | customcert1 |Scenario: Adding an element with the show position X and Y setting disabledAnd I log in as "teacher1"And I am on "Course 1" course homepageAnd I follow "Custom certificate 1"And I navigate to "Edit certificate" in current page administrationAnd I add the element "Code" to page "1" of the "Custom certificate 1" certificate templateAnd I should not see "Position X"And I should not see "Position Y"Scenario: Adding an element with the show position X and Y setting enabledAnd I log in as "admin"And I navigate to "Plugins" in site administrationAnd I click on "Settings" "link" in the "Custom certificate" "table_row"And I set the field "Show position X and Y" to "1"And I press "Save changes"And I log outAnd I log in as "teacher1"And I am on "Course 1" course homepageAnd I follow "Custom certificate 1"And I navigate to "Edit certificate" in current page administrationAnd I add the element "Code" to page "1" of the "Custom certificate 1" certificate templateAnd I should see "Position X"And I should see "Position Y"And I set the following fields to these values:| Position X | 5 || Position Y | 10 |And I press "Save changes"And I click on ".edit-icon" "css_element" in the "Code" "table_row"And the following fields match these values:| Position X | 5 || Position Y | 10 |