1 |
efrain |
1 |
@report @javascript @tool_lp
|
|
|
2 |
Feature: See the competencies for an activity on the course competencies page.
|
|
|
3 |
As a student
|
|
|
4 |
In order to see only the competencies for an activity in the course competencies page.
|
|
|
5 |
|
|
|
6 |
Background:
|
|
|
7 |
Given the following lp "frameworks" exist:
|
|
|
8 |
| shortname | idnumber |
|
|
|
9 |
| Test-Framework | ID-FW1 |
|
|
|
10 |
And the following lp "competencies" exist:
|
|
|
11 |
| shortname | framework |
|
|
|
12 |
| Test-Comp1 | ID-FW1 |
|
|
|
13 |
| Test-Comp2 | ID-FW1 |
|
|
|
14 |
Given the following "courses" exist:
|
|
|
15 |
| shortname | fullname | enablecompletion |
|
|
|
16 |
| C1 | Course 1 | 1 |
|
|
|
17 |
And the following "users" exist:
|
|
|
18 |
| username | firstname | lastname | email |
|
|
|
19 |
| student1 | Student | 1 | student1@example.com |
|
|
|
20 |
And the following "course enrolments" exist:
|
|
|
21 |
| user | course | role |
|
|
|
22 |
| student1 | C1 | student |
|
|
|
23 |
And the following "activities" exist:
|
|
|
24 |
| activity | name | intro | course | idnumber | completion | completionview |
|
|
|
25 |
| page | PageName1 | PageDesc1 | C1 | PAGE1 | 1 | 1 |
|
|
|
26 |
| page | PageName2 | PageDesc2 | C1 | PAGE2 | 1 | 1 |
|
|
|
27 |
And I am on the "Course 1" course page logged in as admin
|
|
|
28 |
And I navigate to "Competencies" in current page administration
|
|
|
29 |
And I press "Add competencies to course"
|
|
|
30 |
And "Competency picker" "dialogue" should be visible
|
|
|
31 |
And I select "Test-Comp1" of the competency tree
|
|
|
32 |
And I click on "Add" "button" in the "Competency picker" "dialogue"
|
|
|
33 |
And I press "Add competencies to course"
|
|
|
34 |
And "Competency picker" "dialogue" should be visible
|
|
|
35 |
And I select "Test-Comp2" of the competency tree
|
|
|
36 |
And I click on "Add" "button" in the "Competency picker" "dialogue"
|
|
|
37 |
And I am on the PageName1 "page activity editing" page
|
|
|
38 |
And I click on "Expand all" "link" in the "region-main" "region"
|
|
|
39 |
And I set the field "Course competencies" to "Test-Comp1"
|
|
|
40 |
And I press "Save and return to course"
|
|
|
41 |
And I log out
|
|
|
42 |
|
|
|
43 |
@javascript
|
|
|
44 |
Scenario: Go to the competency course competencies page.
|
|
|
45 |
Given I am on the "Course 1" course page logged in as student1
|
|
|
46 |
When I follow "Competencies"
|
|
|
47 |
Then I should see "Test-Comp1"
|
|
|
48 |
And I should see "Test-Comp2"
|
|
|
49 |
And I set the field "Filter competencies by resource or activity" to "PageName1"
|
|
|
50 |
And I press the enter key
|
|
|
51 |
And I should see "Test-Comp1"
|
|
|
52 |
And I should not see "Test-Comp2"
|
|
|
53 |
And I set the field "Filter competencies by resource or activity" to "PageName2"
|
|
|
54 |
And I press the enter key
|
|
|
55 |
And I should not see "Test-Comp1"
|
|
|
56 |
And I should not see "Test-Comp2"
|
|
|
57 |
And I should see "No competencies have been linked to this activity or resource."
|
|
|
58 |
|
|
|
59 |
@javascript
|
|
|
60 |
Scenario: None course competencies page.
|
|
|
61 |
When I am on the PageName1 "page activity" page logged in as student1
|
|
|
62 |
Then I should see "Test page content"
|