| 1 | efrain | 1 | @tool @javascript @tool_lp @tool_lp_template
 | 
        
           |  |  | 2 | Feature: Manage plearning plan templates
 | 
        
           |  |  | 3 |   As a learning plan admin
 | 
        
           |  |  | 4 |   In order to perform CRUD operations on learning plan template
 | 
        
           |  |  | 5 |   I need to create, update and delete learning plan temlate
 | 
        
           |  |  | 6 |   | 
        
           |  |  | 7 |   Background:
 | 
        
           |  |  | 8 |     Given I log in as "admin"
 | 
        
           |  |  | 9 |     And I change window size to "small"
 | 
        
           |  |  | 10 |     And I am on site homepage
 | 
        
           |  |  | 11 |   | 
        
           |  |  | 12 |   Scenario: Create a new learning plan template
 | 
        
           |  |  | 13 |     Given I navigate to "Competencies > Learning plan templates" in site administration
 | 
        
           |  |  | 14 |     And I should see "List of learning plan templates"
 | 
        
           |  |  | 15 |     And I click on "Add new learning plan template" "button"
 | 
        
           |  |  | 16 |     And I should see "Add new learning plan template"
 | 
        
           |  |  | 17 |     And I set the field "Name" to "Science template"
 | 
        
           |  |  | 18 |     And I set the field "Description" to "Here description of learning plan template"
 | 
        
           |  |  | 19 |     When I press "Save changes"
 | 
        
           |  |  | 20 |     Then I should see "Learning plan template created"
 | 
        
           |  |  | 21 |     And I should see "Science template"
 | 
        
           |  |  | 22 |   | 
        
           |  |  | 23 |   Scenario: Read a learning plan template
 | 
        
           |  |  | 24 |     Given the following lp "templates" exist:
 | 
        
           |  |  | 25 |       | shortname | description |
 | 
        
           |  |  | 26 |       | Science template Year-2 | science template description |
 | 
        
           |  |  | 27 |     And I navigate to "Competencies > Learning plan templates" in site administration
 | 
        
           |  |  | 28 |     And I should see "Science template Year-2"
 | 
        
           |  |  | 29 |     When I click on "Science template Year-2" "link"
 | 
        
           |  |  | 30 |     Then I should see "Science template Year-2"
 | 
        
           |  |  | 31 |     And I should see "Learning plan template competencies"
 | 
        
           |  |  | 32 |   | 
        
           |  |  | 33 |   Scenario: Edit a learning plan template
 | 
        
           |  |  | 34 |     Given the following lp "templates" exist:
 | 
        
           |  |  | 35 |       | shortname | description |
 | 
        
           |  |  | 36 |       | Science template Year-3 | science template description |
 | 
        
           |  |  | 37 |     And I navigate to "Competencies > Learning plan templates" in site administration
 | 
        
           |  |  | 38 |     And I should see "Science template Year-3"
 | 
        
           |  |  | 39 |     And I click on "Edit" of edit menu in the "Science template Year-3" row
 | 
        
           |  |  | 40 |     And the field "Name" matches value "Science template Year-3"
 | 
        
           |  |  | 41 |     And I set the field "Name" to "Science template Year-3 Edited"
 | 
        
           |  |  | 42 |     When I press "Save changes"
 | 
        
           |  |  | 43 |     Then I should see "Learning plan template updated"
 | 
        
           |  |  | 44 |     And I should see "Science template Year-3 Edited"
 | 
        
           |  |  | 45 |   | 
        
           |  |  | 46 |   Scenario: Delete a learning plan template
 | 
        
           |  |  | 47 |     Given the following lp "templates" exist:
 | 
        
           |  |  | 48 |       | shortname | description |
 | 
        
           |  |  | 49 |       | Science template Year-4 | science template description |
 | 
        
           |  |  | 50 |     And I navigate to "Competencies > Learning plan templates" in site administration
 | 
        
           |  |  | 51 |     And I should see "Science template Year-4"
 | 
        
           |  |  | 52 |     And I click on "Delete" of edit menu in the "Science template Year-4" row
 | 
        
           |  |  | 53 |     And "Confirm" "dialogue" should be visible
 | 
        
           |  |  | 54 |     And "Delete" "button" should exist in the "Confirm" "dialogue"
 | 
        
           |  |  | 55 |     And "Cancel" "button" should exist in the "Confirm" "dialogue"
 | 
        
           |  |  | 56 |     And I click on "Cancel" "button" in the "Confirm" "dialogue"
 | 
        
           |  |  | 57 |     And I click on "Delete" of edit menu in the "Science template Year-4" row
 | 
        
           |  |  | 58 |     And "Confirm" "dialogue" should be visible
 | 
        
           |  |  | 59 |     When I click on "Delete" "button" in the "Confirm" "dialogue"
 | 
        
           |  |  | 60 |     And I wait until the page is ready
 | 
        
           |  |  | 61 |     Then I should not see "Science template Year-4"
 |