[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/admin/tool/lp/tests/behat/ -> framework_crud.feature (source)

   1  @tool @javascript @tool_lp @tool_lp_framework
   2  Feature: Manage competency frameworks
   3    As a competency framework admin
   4    In order to perform CRUD operations on competency framework
   5    I need to create, update and delete competency framework
   6  
   7    Background:
   8      Given I log in as "admin"
   9      And I am on site homepage
  10      And I expand "Site administration" node
  11      When I expand "Competencies" node
  12      Then I should see "Competency frameworks"
  13  
  14    Scenario: Create a new framework
  15      Given I follow "Competency frameworks"
  16      And I should see "List of competency frameworks"
  17      And I click on "Add new competency framework" "button"
  18      And I should see "General"
  19      And I should see "Taxonomies"
  20      And I set the field "Name" to "Science Year-1"
  21      And I set the field "ID number" to "Comp-frm-1"
  22      And I press "Save changes"
  23      And I should see "The scale needs to be configured by selecting default and proficient items."
  24      And "Configure scales" "button" should be visible
  25      And I press "Configure scales"
  26      And I click on "//input[@data-field='tool_lp_scale_default_1']" "xpath_element"
  27      And I click on "//input[@data-field='tool_lp_scale_proficient_1']" "xpath_element"
  28      And I click on "//input[@value='Close']" "xpath_element"
  29      When I press "Save changes"
  30      Then I should see "Competency framework created"
  31      And I should see "Science Year-1"
  32  
  33    Scenario: Read a framework
  34      Given the following lp "frameworks" exist:
  35        | shortname | idnumber |
  36        | Science Year-2 | sc-y-2 |
  37      And I follow "Competency frameworks"
  38      And I should see "Science Year-2"
  39      When I click on "Science Year-2" "link"
  40      Then I should see "Science Year-2"
  41  
  42    Scenario: Edit a framework
  43      Given the following lp "frameworks" exist:
  44        | shortname | idnumber |
  45        | Science Year-3 | sc-y-3 |
  46      And I follow "Competency frameworks"
  47      And I should see "Science Year-3"
  48      And I click on "Edit" of edit menu in the "Science Year-3" row
  49      And the field "Name" matches value "Science Year-3 "
  50      And I set the field "Name" to "Science Year-3 Edited"
  51      When I press "Save changes"
  52      Then I should see "Competency framework updated"
  53      And I should see "Science Year-3 Edited"
  54      And I should see "sc-y-3"
  55  
  56    Scenario: Delete a framework
  57      Given the following lp "frameworks" exist:
  58        | shortname | idnumber |
  59        | Science Year-4 | sc-y-4 |
  60      And I follow "Competency frameworks"
  61      And I should see "Science Year-4"
  62      And I should see "sc-y-4"
  63      And I click on "Delete" of edit menu in the "Science Year-4" row
  64      And "Confirm" "dialogue" should be visible
  65      And "Delete" "button" should exist in the "Confirm" "dialogue"
  66      And "Cancel" "button" should exist in the "Confirm" "dialogue"
  67      And I click on "Cancel" "button"
  68      And I click on "Delete" of edit menu in the "Science Year-4" row
  69      And "Confirm" "dialogue" should be visible
  70      When I click on "Delete" "button"
  71      Then I should not see "Science Year-4"
  72      And I should not see "sc-y-4"
  73  
  74  Scenario: Edit a framework with competencies in user competency
  75      Given the following lp "frameworks" exist:
  76        | shortname | idnumber |
  77        | Science Year-5 | sc-y-5 |
  78      And the following lp "competencies" exist:
  79        | shortname | framework |
  80        | Comp1 | sc-y-5 |
  81        | Comp2 | sc-y-5 |
  82      And the following lp "plans" exist:
  83        | name | user | description |
  84        | Plan Science-5 | admin | Plan description |
  85      And the following lp "plancompetencies" exist:
  86        | plan | competency |
  87        | Plan Science-5 | Comp1 |
  88        | Plan Science-5 | Comp2 |
  89      And the following lp "usercompetencies" exist:
  90        | user | competency |
  91        | admin | Comp1 |
  92        | admin | Comp2 |
  93      And I follow "Competency frameworks"
  94      And I should see "Science Year-5"
  95      And I click on "Edit" of edit menu in the "Science Year-5" row
  96      And the field "Name" matches value "Science Year-5 "
  97      And I set the field "Name" to "Science Year-5 Edited"
  98      And the "scaleid" "select" should be readonly
  99      When I press "Save changes"
 100      Then I should see "Competency framework updated"
 101      And I should see "Science Year-5 Edited"
 102      And I should see "sc-y-5"
 103  
 104  Scenario: Edit a framework with competencies in user competency plan
 105      Given the following lp "frameworks" exist:
 106        | shortname | idnumber |
 107        | Science Year-6 | sc-y-6 |
 108      And the following lp "competencies" exist:
 109        | shortname | framework |
 110        | Comp1 | sc-y-6 |
 111        | Comp2 | sc-y-6 |
 112      And the following lp "plans" exist:
 113        | name | user | description |
 114        | Plan Science-6 | admin | Plan description |
 115      And the following lp "plancompetencies" exist:
 116        | plan | competency |
 117        | Plan Science-6 | Comp1 |
 118        | Plan Science-6 | Comp2 |
 119      And the following lp "usercompetencyplans" exist:
 120        | user | competency | plan |
 121        | admin | Comp1 | Plan Science-6 |
 122        | admin | Comp2 | Plan Science-6 |
 123      And I follow "Competency frameworks"
 124      And I should see "Science Year-6"
 125      And I click on "Edit" of edit menu in the "Science Year-6" row
 126      And the field "Name" matches value "Science Year-6 "
 127      And I set the field "Name" to "Science Year-6 Edited"
 128      And the "scaleid" "select" should be readonly
 129      When I press "Save changes"
 130      Then I should see "Competency framework updated"
 131      And I should see "Science Year-6 Edited"
 132      And I should see "sc-y-6"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1