smart_evidence_workflow.feature 6.88 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@javascript @core @core_portfolio
Feature: Smart evidence work flow from Institution member submitting to Institution staff making
    and adding comments to collection submission.

Background: Setting up test data for users and portfolio pages
    Given the following "users" exist:
    | username | password | email | firstname | lastname | institution | authname | role |
    | UserA | Kupuh1pa! | UserA@example.org | Alice | User | mahara | internal | member |
    | UserB | Kupuh1pa! | UserB@example.org | Bob | User | mahara | internal | staff |

    And the following "pages" exist:
    | title | description | ownertype | ownername |
    | Page UserA_01 | Page 01 | user | UserA |
    | Page UserA_02 | Page 02 | user | UserA |
    | Page UserA_03 | Page 02 | user | UserA |

    # Background step required
    # And the site has been made ready for smart evidence - Admin set up site ready for Smartevidence
    # annotations = enabled
    # Matrix config file is loaded
    # Enable Institutions to allow Smart Evidence
    # ********************************************************
     # Admin user enable annotations module
    Given I log in as "admin" with password "Kupuh1pa!"
    And I choose "Plugin administration" in "Extensions" from administration menu
    And I press "activate_blocktype_annotation_submit"
    # confirm Smart evidence is also enabled
    And I should see "Hide" in the "smartevidence" property
    # Make sure we have a matrix config form
    And I choose "SmartEvidence" in "Extensions" from administration menu
31
    And I follow "Import" in the "Arrow-bar nav" property
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
    And I attach the file "example.matrix" to "Matrix file"
    And I press "Upload matrix"
    # Check that we have new framework
    Then I should see "Title of your framework"
    # Enable Institutions to allow Smart Evidencelcd
    And I choose "Settings" in "Institutions" from administration menu
    And I press "Edit"
    And I enable the switch "Allow SmartEvidence"
    And I press "Submit"
    Then I log out

Scenario: 1) Mahara member creates a collection of 3 pages and submits for marking
    2) Mahara admin/staff marks and comments on submission
    3) Mahara member places feedback in return
    4) Check that feedback comments made by Mahara admin/staff cannot be deleted
    # Creating a collection AND adding pages
    Given I log in as "UserA" with password "Kupuh1pa!"
49
    And I choose "Pages and collections" in "Create" from main menu
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    And I follow "Add"
    When I click on "Collection" in the dialog
    And I fill in the following:
    | Collection name | Smart Evidence Collection 1 |
    | Collection description | Smart Evidence Collection 1 description |
    And I select "Title of your framework" from "SmartEvidence framework"
    # Adding page 1, 2 & 3 to the collection
    And I press "Next: Edit collection pages"
    And I follow "All"
    And I press "Add pages"
    # Verifying that the pages were added
    Then I should see "Page UserA_01"
    And I should see "Page UserA_03"
    When I follow "Done"
    Then I should see "Pages and collections"

    # Mahara member makes to page visible to public
67
    And I click on "Manage access" in "Smart Evidence Collection 1" card access menu
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
    And I select "Public" from "accesslist[0][searchtype]"
    And I click on "Save"
    And I click on "Return to pages and collections"
    # Verify user is on correct page
    And I should see "Smart Evidence Collection 1"

    # Mahara member must make comment on a competencies before it can be accessed by admin/staff
    When I follow "Smart Evidence Collection 1"
    # click the standard group 3.1 to make an annotation for page 1 column
    And I click on the matrix point "2,21"
    And I fill in "First annotation description" in first editor
    And I click on "Save"
    # click the standard group 3.2 to make an annotation for page 2 column
    And I click on the matrix point "3,21"
    And I fill in "First annotation description" in first editor
    And I click on "Save"
    # click the standard group 3.1 to make an annotation for page 3 column
    And I click on the matrix point "4,21"
    And I fill in "First annotation description" in first editor
    And I click on "Save"
    # Mahara member logs out so staff can log in and make an assessment
    And I log out

    # Log in as admin/staff grade the collection pages and make comments ( 3 pages 3.1sub level of the standard only)
    Given I log in as "UserB" with password "Kupuh1pa!"
    And I wait "1" seconds
    And I should see "Smart Evidence Collection 1 "
    And I follow "Smart Evidence Collection 1"
    # Admin/staff selects the competencies ready for assessment and makes a Annotation
    And I click on the matrix point "2,21"
    And I fill in "Staff annotation description" in first editor
    And I click on "Place feedback"
100
101
102
103
    And I fill in "Another annotation description" in first editor
    And I disable the switch "Make public"
    And I click on "Place feedback"
    And I should see "This feedback is private."
104
105
106
107
108
    And I select "Partially meets the standard" from "Assessment"
    And I click on "Save"
    And I click on the matrix point "3,21"
    And I fill in "Staff annotation description" in first editor
    And I click on "Place feedback"
109
    And I select "Meets the standard" from "Assessment"
110
111
112
113
    And I click on "Save"
    And I click on the matrix point "4,21"
    And I fill in "Staff annotation description" in first editor
    And I click on "Place feedback"
114
115
116
    And I fill in "Another Staff annotation description" in first editor
    And I disable the switch "Make public"
    And I select "Doesn't meet the standard" from "Assessment"
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
    And I click on "Save"
    And I log out

    # Mahara member logs in, views annotations and confirms cannot delete annotations (Bug - 1781278)
    Given I log in as "UserA" with password "Kupuh1pa!"
    And I should see "Smart Evidence Collection 1 "
    And I follow "Smart Evidence Collection 1"
    # Mahara member clicks the next to view next page
    And I press "Next page"
    # Mahara member places feedback
    When I follow "Place feedback"
    And I fill in "Mahara member placing feedback" in first editor
    And I press "Place feedback"
    # Mahara member follows "Feedback (3)"
    And I wait "1" seconds
132
    When I follow "Feedback (4)"
133
134
135
136
    # Mahara member should see 3 feedback annotations
    Then I should see "Staff annotation description"
    And I should see "Assessment: Partially meets the standard "
    And I should see "Mahara member placing feedback"
137
    And I should see "Make public"
138
    # Mahara member should see edit and delete for their own annotation feedback comment
139
    And I should see "Edit" in the "//*[starts-with(@id,'annotation_feedbacktable')]/div/div/div[2]/li[4]/div[1]/div" "xpath_element"
140
141
    # verify that user cannot delete Other user's annotations.
    And I should not see "Edit" in the "//*[starts-with(@id,'annotation_feedbacktable')]/div/div/div[2]/li[2]/div[1]/div" "xpath_element"