Skip to content

Commit 0b9de01

Browse files
committed
Merge remote-tracking branch 'davidcc99/MOBILE-3294' into master
2 parents 865f852 + 259e597 commit 0b9de01

File tree

12 files changed

+4218
-30
lines changed

12 files changed

+4218
-30
lines changed
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
@mod @mod_assign @app @javascript
2+
Feature: Test basic usage of assignment activity in app
3+
In order to participate in the assignment while using the mobile app
4+
I need basic assignment functionality to work
5+
6+
Background:
7+
Given the following "users" exist:
8+
| username | firstname | lastname | email |
9+
| teacher1 | Teacher | teacher | teacher1@example.com |
10+
| student1 | Student | student | student1@example.com |
11+
And the following "courses" exist:
12+
| fullname | shortname | category |
13+
| Course 1 | C1 | 0 |
14+
And the following "course enrolments" exist:
15+
| user | course | role |
16+
| teacher1 | C1 | editingteacher |
17+
| student1 | C1 | student |
18+
And the following "activities" exist:
19+
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | duedate | attemptreopenmethod |
20+
| assign | C1 | assign1 | assignment1 | Test assignment description1 | 1 | 1 | manual |
21+
22+
23+
@app @3.8.0 @OK
24+
Scenario: View assign and add a submission (online text), submit for grading, view own submission or student submission and view list of student submissions (as teacher)
25+
When I enter the app
26+
And I log in as "student1"
27+
Then the header should be "Acceptance test site" in the app
28+
And I should see "Course 1"
29+
And I press "Course 1" near "Recently accessed courses" in the app
30+
Then the header should be "Course 1" in the app
31+
And I press "assignment1" in the app
32+
Then the header should be "assignment1" in the app
33+
And I should see "Test assignment description1"
34+
And I should see "Due date"
35+
And I should see "Thursday, 1 January 1970, 1:00 AM"
36+
And I press "Add submission" in the app
37+
And I set the field "Online text submissions" to "Submission test" in the app
38+
And I press "Save" in the app
39+
Then I should see "Draft (not submitted)"
40+
And I should see "Not graded"
41+
And I press "Edit submission" in the app
42+
And I set the field "Online text submissions" to "Submission test edited" in the app
43+
And I press "Save" in the app
44+
And I press "OK" in the app
45+
And I press "Submit assignment" in the app
46+
And I press "OK" in the app
47+
Then I should see "Submitted for grading"
48+
And I should see "Not graded"
49+
And I should see "Submission test edited"
50+
When I enter the app
51+
And I log in as "teacher1"
52+
Then the header should be "Acceptance test site" in the app
53+
And I should see "Course 1"
54+
And I press "Course 1" near "Recently accessed courses" in the app
55+
Then the header should be "Course 1" in the app
56+
And I press "assignment1" in the app
57+
Then the header should be "assignment1" in the app
58+
And I press "Submitted" in the app
59+
Then I should see "Student student"
60+
And I should see "Not graded"
61+
And I press "Student student" near "assignment1" in the app
62+
Then I should see "Online text submission"
63+
And I should see "Submission test edited"
64+
65+
@app @3.8.0 @OK
66+
Scenario: Add new attempt from previous submission
67+
When I enter the app
68+
And I log in as "student1"
69+
Then the header should be "Acceptance test site" in the app
70+
And I should see "Course 1"
71+
And I press "Course 1" near "Recently accessed courses" in the app
72+
Then the header should be "Course 1" in the app
73+
And I press "assignment1" in the app
74+
Then the header should be "assignment1" in the app
75+
And I should see "Test assignment description1"
76+
And I should see "Due date"
77+
And I should see "Thursday, 1 January 1970, 1:00 AM"
78+
And I press "Add submission" in the app
79+
And I set the field "Online text submissions" to "Submission test" in the app
80+
And I press "Save" in the app
81+
And I press "Submit assignment" in the app
82+
And I press "OK" in the app
83+
When I enter the app
84+
And I log in as "teacher1"
85+
Then the header should be "Acceptance test site" in the app
86+
And I should see "Course 1"
87+
And I press "Course 1" near "Recently accessed courses" in the app
88+
Then the header should be "Course 1" in the app
89+
And I press "assignment1" in the app
90+
Then the header should be "assignment1" in the app
91+
And I press "Participants" in the app
92+
Then I should see "Student student"
93+
And I should see "Not graded"
94+
And I press "Student student" near "assignment1" in the app
95+
Then I should see "Online text submission"
96+
And I should see "Submission test"
97+
And I press "Grade" in the app
98+
And I press "Allow another attempt" in the app
99+
And I press "Done"
100+
Then I should see "Reopened"
101+
And I should see "Not graded"
102+
When I enter the app
103+
And I log in as "student1"
104+
Then the header should be "Acceptance test site" in the app
105+
And I should see "Course 1"
106+
And I press "Course 1" near "Recently accessed courses" in the app
107+
Then the header should be "Course 1" in the app
108+
And I press "assignment1" in the app
109+
And I should see "Reopened"
110+
And I should see "2 out of Unlimited"
111+
And I should see "Add a new attempt based on previous submission"
112+
And I should see "Add a new attempt"
113+
And I press "Add a new attempt based on previous submission" in the app
114+
And I press "OK" in the app
115+
Then I should see "Submission test"
116+
And I set the field "Online text submissions" to "Submission test 2 attempt" in the app
117+
And I press "Save" in the app
118+
And I press "OK" in the app
119+
And I press "Submit assignment" in the app
120+
And I press "OK" in the app
121+
When I enter the app
122+
And I log in as "teacher1"
123+
Then the header should be "Acceptance test site" in the app
124+
And I should see "Course 1"
125+
And I press "Course 1" near "Recently accessed courses" in the app
126+
Then the header should be "Course 1" in the app
127+
And I press "assignment1" in the app
128+
Then the header should be "assignment1" in the app
129+
And I press "Participants" in the app
130+
Then I should see "Student student"
131+
And I should see "Not graded"
132+
And I press "Student student" near "assignment1" in the app
133+
Then I should see "Online text submission"
134+
And I should see "Submission test 2 attempt"
135+
136+
@app @3.8.0 @OK
137+
Scenario: Add submission offline (online text), submit for grading offline and sync submissions
138+
When I enter the app
139+
And I log in as "student1"
140+
Then the header should be "Acceptance test site" in the app
141+
And I should see "Course 1"
142+
And I press "Course 1" near "Recently accessed courses" in the app
143+
Then the header should be "Course 1" in the app
144+
And I press "assignment1" in the app
145+
Then the header should be "assignment1" in the app
146+
And I should see "Test assignment description1"
147+
And I should see "Due date"
148+
And I should see "Thursday, 1 January 1970, 1:00 AM"
149+
And I press "Add submission" in the app
150+
And I switch offline mode to "true"
151+
And I set the field "Online text submissions" to "Submission test" in the app
152+
And I press "Save" in the app
153+
And I press "Submit assignment" in the app
154+
And I press "OK" in the app
155+
Then I should see "This Assignment has offline data to be synchronised."
156+
And I switch offline mode to "false"
157+
And I press the back button in the app
158+
And I press "assignment1" in the app
159+
And I press "Display options" in the app
160+
And I press "Refresh" in the app
161+
Then I should not see "This Assignment has offline data to be synchronised."
162+
And I should see "Submitted for grading"
163+
164+
@app @3.8.0 @OK
165+
Scenario: Edit an offline submission before synchronizing it
166+
When I enter the app
167+
And I log in as "student1"
168+
Then the header should be "Acceptance test site" in the app
169+
And I should see "Course 1"
170+
And I press "Course 1" near "Recently accessed courses" in the app
171+
Then the header should be "Course 1" in the app
172+
And I press "assignment1" in the app
173+
Then the header should be "assignment1" in the app
174+
And I should see "Test assignment description1"
175+
And I should see "Due date"
176+
And I should see "Thursday, 1 January 1970, 1:00 AM"
177+
And I press "Add submission" in the app
178+
And I switch offline mode to "true"
179+
And I set the field "Online text submissions" to "Submission test1" in the app
180+
And I press "Save" in the app
181+
Then I should see "This Assignment has offline data to be synchronised."
182+
And I should see "Submission test1"
183+
And I press "Edit submission" in the app
184+
And I set the field "Online text submissions" to "Submission test edited offline" in the app
185+
And I press "Save" in the app
186+
Then I should see "This Assignment has offline data to be synchronised."
187+
And I should not see "Submission test1"
188+
And I should see "Submission test edited offline"
189+
And I press "Submit assignment" in the app
190+
And I press "OK" in the app
191+
Then I should see "This Assignment has offline data to be synchronised."
192+
And I switch offline mode to "false"
193+
And I press the back button in the app
194+
And I press "assignment1" in the app
195+
Then I should not see "This Assignment has offline data to be synchronised."
196+
And I should see "Submitted for grading"
197+
And I should see "Submission test edited offline"
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
@mod @mod_chat @app @javascript
2+
Feature: Test basic usage of chat in app
3+
As a student
4+
I need basic chat functionality to work
5+
6+
Background:
7+
Given the following "courses" exist:
8+
| fullname | shortname |
9+
| Course 1 | C1 |
10+
And the following "users" exist:
11+
| username | firstname | lastname |
12+
| student1 | david | student |
13+
| student2 | pau | student2 |
14+
| teacher1 | juan | teacher |
15+
And the following "course enrolments" exist:
16+
| user | course | role |
17+
| student1 | C1 | student |
18+
| student2 | C1 | student |
19+
| teacher1 | C1 | editingteacher |
20+
And the following "activities" exist:
21+
| activity | name | intro | course | idnumber | groupmode |
22+
| chat | Test chat name | Test chat | C1 | chat | 0 |
23+
24+
@app @3.8.0 @OK
25+
Scenario: Receive and send messages, see connected users, beep and talk to
26+
When I enter the app
27+
And I log in as "student1"
28+
And I press "Course 1" near "Course overview" in the app
29+
And I press "Test chat name" in the app
30+
Then I should see "Click here to enter the chat now"
31+
And I should see "View past chat sessions"
32+
And I press "Click here to enter the chat now" in the app
33+
And I set the field "New message" to "Hi!"
34+
And I press "Send" in the app
35+
And I set the field "New message" to "I am David"
36+
And I press "Send" in the app
37+
When I enter the app
38+
And I log in as "student2"
39+
And I press "Course 1" near "Course overview" in the app
40+
And I press "Test chat name" in the app
41+
And I press "Click here to enter the chat now" in the app
42+
Then I should see "Hi!"
43+
And I should see "I am David"
44+
And I press "people" in the app
45+
Then I should see "david student"
46+
And I press "Beep" in the app
47+
Then I should see "You beeped david student"
48+
And I set the field "New message" to "Hi David, I am Pau."
49+
And I press "Send" in the app
50+
51+
@app @3.8.0 @OK
52+
Scenario: Past sessions shown for >=3.5
53+
When I enter the app
54+
And I log in as "student1"
55+
And I press "Course 1" near "Course overview" in the app
56+
And I press "Test chat name" in the app
57+
Then I should see "Click here to enter the chat now"
58+
And I should see "View past chat sessions"
59+
And I press "Click here to enter the chat now" in the app
60+
And I set the field "New message" to "Hi!"
61+
And I press "Send" in the app
62+
And I set the field "New message" to "I am David"
63+
And I press "Send" in the app
64+
When I enter the app
65+
And I log in as "student2"
66+
And I press "Course 1" near "Course overview" in the app
67+
And I press "Test chat name" in the app
68+
Then I should see "Click here to enter the chat now"
69+
And I should see "View past chat sessions"
70+
And I press "View past chat sessions" in the app
71+
And I press "Show incomplete sessions" in the app
72+
And I press "david student (2)" in the app
73+
Then I should see "Hi!"
74+
And I should see "I am David"

0 commit comments

Comments
 (0)