Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@tool @tool_lp @tool_lp_plan
2
Feature: Admin can create learning plans from template
3
  In order to link and unlink a learning plan from a student
4
  As an admin
5
  I need to be able to create a learning plan from template
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email              |
10
      | student1 | Student   | One      | student1@email.com |
11
    And the following "core_competency > frameworks" exist:
12
      | shortname | idnumber |
13
      | CF1       | CF1      |
14
      | CF2       | CF2      |
15
    And the following "core_competency > competencies" exist:
16
      | shortname        | competencyframework | idnumber |
17
      | CF1 Competency 1 | CF1                 | CF1C1    |
18
      | CF2 Competency 1 | CF2                 | CF2C1    |
19
    And the following "core_competency > templates" exist:
20
      | shortname | description       |
21
      | LPT1      | LPT 1 description |
22
    And the following "core_competency > template_competencies" exist:
23
      | template | competency |
24
      | LPT1     | CF1C1      |
25
 
26
  @javascript
27
  Scenario: Admin can assign competencies from different frameworks to a learning plan
28
    Given I log in as "admin"
29
    And I navigate to "Competencies > Learning plan templates" in site administration
30
    And I follow "LPT1"
31
    When I press "Add competencies to learning plan template"
32
    # Add another competency from a different framework in the learning plan template.
33
    And I set the field with xpath "//select[@data-action='chooseframework']" to "CF2 CF2"
34
    And I select "CF2 Competency 1" of the competency tree
35
    And I click on "Add" "button" in the "Competency picker" "dialogue"
36
    # Confirm that both competencies from different frameworks are successfully added to learning plan template.
37
    Then "LPT1" "text" should exist
38
    And "Learning plan template competencies" "text" should exist
39
    And "CF1 Competency 1" "text" should exist
40
    And "CF2 Competency 1" "text" should exist
41
 
42
  @javascript
43
  Scenario: Admin can link and unlink learning plans created from template
44
    Given I log in as "admin"
45
    And I navigate to "Competencies > Learning plan templates" in site administration
46
    # Initially, the number of learning plans is 0.
47
    And the following should exist in the "generaltable" table:
48
      | Name | Learning plans |
49
      | LPT1 | 0              |
50
    And I click on ".template-userplans" "css_element" in the "LPT1" "table_row"
51
    # Create a learning plan for selected student using template.
52
    When I set the field "Select users" to "student1"
53
    And I press "Create learning plans"
54
    # Confirm that selected student is now in the list of learning plans.
55
    Then "A learning plan was created" "text" should exist
56
    And the following should exist in the "generaltable" table:
57
      | Name | Email address      |
58
      | LPT1 | student1@email.com |
59
    And I click on "LPT1" "link" in the "LPT1" "table_row"
60
    # Template title and Unlink from learning plan template link exists.
61
    And "Learning plan template" "text" should exist
62
    And "Unlink from learning plan template" "link" should exist
63
    # Unlink the template.
64
    And I click on "Unlink from learning plan template" "link"
65
    And I press "Unlink from learning plan template"
66
    # Learning plan still exists but Template name and Unlink from learning plan template link no longer exist.
67
    And "LPT1" "text" should exist
68
    And "Learning plan template" "text" should not exist
69
    And "Unlink from learning plan template" "link" should not exist