install_framework.feature 4.26 KB
Newer Older
1
@javascript @core @core_administration
2
3
Feature: Make sure 'framework' module is installed and we can add it
to a collection
4
5
In order to use SmartEvidence
As an admin
6
7
So I can benefit from the recording/marking of SmartEvidence in a
Mahara institution
8

9
Background:
10
11
12
13
14
  Given the following "users" exist:
    | username | password | email | firstname | lastname | institution | authname | role |
    | userA | Kupuhipa1 | test01@example.com | Pete | Mc | mahara | internal | admin |

  And the following "pages" exist:
15
16
17
18
19
20
21
22
23
24
    | title | description| ownertype | ownername |
    | PageA | This is page A | user | admin |
    | PageB | This is page B | user | admin |
    | PageC | This is page C | user | admin |
    | PageD | This is page D | user | admin |
    | PageE | This is page E | user | admin |
    | PageF | This is page F | user | admin |
    | PageG | This is page G | user | admin |
    | PageH | This is page H | user | admin |

25
  And the following "collections" exist:
26
27
28
    | title | description| ownertype | ownername | pages |
    | CollA | This is collection A | user | admin | PageA, PageB, PageC, PageD, PageE, PageF, PageG, PageH |

29
30
31
  And the following "permissions" exist:
    | title | accesstype |
    | CollA | public |
32
33

Scenario: Installing framework module and activating for an institution
34
 Given I log in as "admin" with password "Kupuhipa1"
35
 And I choose "Plugin administration" in "Extensions" from administration menu
36
37
 Then I should see "smartevidence"
 And I should see "Hide" in the "form#activate_module_framework" "css_element"
38
39
 # Also make sure the annotation blocktype plugin is active
 And I press "Show" in the "form#activate_blocktype_annotation" "css_element"
40
41

 # Make sure we have a matrix config form
42
 And I choose "SmartEvidence" in "Extensions" from administration menu
43
 And I follow "Add framework"
44
 And I attach the file "example.matrix" to "Matrix file"
45
 And I press "Upload matrix"
46

47
 # Check that we have new framework
48
 Then I should see "Title of your framework"
49

50
 # Activate smartevidence in an institution
51
 And I choose "Settings" in "Institutions" from administration menu
52
53
54
55
 And I click on "Edit" in "No Institution" row
 And I enable the switch "Allow SmartEvidence"
 And I press "Submit"
 Then I should see "Institution updated successfully."
56
57

 # Adding framework to existing collection
58
 And I choose "Pages and collections" in "Portfolio" from main menu
59
60
 And I click on "CollA" panel menu
 And I click on "Edit" in "CollA" panel menu
61
 And I select "Title of your framework" from "SmartEvidence framework"
62
63
 And I press "Save"
 Then I should see "Collection saved successfully."
64
65

 # Testing the collection navigation and matrix carousel
66
 And I choose "Pages and collections" in "Portfolio" from main menu
67
 And I click the panel "CollA"
68
 And I should see "You are on page 1/9"
Robert Lyon's avatar
Robert Lyon committed
69
 And I should see "by Admin User (admin)"
70
71
72
73
 And I press "Next" in the "table#tablematrix" "css_element"
 Then I should see "PageF"
 And I press "Prev" in the "table#tablematrix" "css_element"
 Then I should not see "PageF"
74
75

 # Click on a matrix point to add an annotation
76
 And I click on the matrix point "3,4"
77
 And I wait "1" seconds
78
 And I fill in "My two cents" in editor "Annotation"
79
80
81
 And I press "Save"
 And I go to portfolio page "PageB"
 Then I should see "Annotation"
82
83
84
85

 # Add another compentency annotation block
 And I follow "Edit"
 And I expand "General" node
86
 And I wait "1" seconds
87
88
 And I follow "Annotation"
 And I press "Add"
89
90
 And I fill in "My three cents" in editor "Annotation"
 And I set the select2 value "1.1 - Sub level of the standard" for "instconf_smartevidence"
91
 And I press "Save"
92
93

 # Re-click a matrix point to add some feedback
94
 And I choose "Pages and collections" in "Portfolio" from main menu
95
 And I click the panel "CollA"
96
 And I click on the matrix point "3,4"
97
 And I wait "1" seconds
98
 And I fill in "This is annotation feedback" in editor "Feedback"
99
100
 And I press "Place feedback"
 # And change assessment status
101
 And I should not see the field "Assessment"
102
 And I press "Save"
103
104
105
106
107
108
 And I log out

 # Try as another admin
 Given  I log in as "userA" with password "Kupuhipa1"
 And I wait "1" seconds
 And I follow "CollA"
109
 And I click on the matrix point "3,4"
110
111
112
 And I wait "1" seconds
 And I select "Partially meets the standard" from "Assessment"
 And I press "Save"
113
 Then I should see "SmartEvidence updated"