AutorÃa | Ultima modificación | Ver Log |
@tool @tool_lp @tool_lp_planFeature: Admin can create learning plans from templateIn order to link and unlink a learning plan from a studentAs an adminI need to be able to create a learning plan from templateBackground:Given the following "users" exist:| username | firstname | lastname | email || student1 | Student | One | student1@email.com |And the following "core_competency > frameworks" exist:| shortname | idnumber || CF1 | CF1 || CF2 | CF2 |And the following "core_competency > competencies" exist:| shortname | competencyframework | idnumber || CF1 Competency 1 | CF1 | CF1C1 || CF2 Competency 1 | CF2 | CF2C1 |And the following "core_competency > templates" exist:| shortname | description || LPT1 | LPT 1 description |And the following "core_competency > template_competencies" exist:| template | competency || LPT1 | CF1C1 |@javascriptScenario: Admin can assign competencies from different frameworks to a learning planGiven I log in as "admin"And I navigate to "Competencies > Learning plan templates" in site administrationAnd I follow "LPT1"When I press "Add competencies to learning plan template"# Add another competency from a different framework in the learning plan template.And I set the field with xpath "//select[@data-action='chooseframework']" to "CF2 CF2"And I select "CF2 Competency 1" of the competency treeAnd I click on "Add" "button" in the "Competency picker" "dialogue"# Confirm that both competencies from different frameworks are successfully added to learning plan template.Then "LPT1" "text" should existAnd "Learning plan template competencies" "text" should existAnd "CF1 Competency 1" "text" should existAnd "CF2 Competency 1" "text" should exist@javascriptScenario: Admin can link and unlink learning plans created from templateGiven I log in as "admin"And I navigate to "Competencies > Learning plan templates" in site administration# Initially, the number of learning plans is 0.And the following should exist in the "generaltable" table:| Name | Learning plans || LPT1 | 0 |And I click on ".template-userplans" "css_element" in the "LPT1" "table_row"# Create a learning plan for selected student using template.When I set the field "Select users" to "student1"And I press "Create learning plans"# Confirm that selected student is now in the list of learning plans.Then "A learning plan was created" "text" should existAnd the following should exist in the "generaltable" table:| Name | Email address || LPT1 | student1@email.com |And I click on "LPT1" "link" in the "LPT1" "table_row"# Template title and Unlink from learning plan template link exists.And "Learning plan template" "text" should existAnd "Unlink from learning plan template" "link" should exist# Unlink the template.And I click on "Unlink from learning plan template" "link"And I press "Unlink from learning plan template"# Learning plan still exists but Template name and Unlink from learning plan template link no longer exist.And "LPT1" "text" should existAnd "Learning plan template" "text" should not existAnd "Unlink from learning plan template" "link" should not exist