Merge remote-tracking branch 'davidcc99/MOBILE-3294' into master

main
Noel De Martin 2020-06-10 11:20:20 +02:00
commit 92d9aea3de
12 changed files with 4233 additions and 45 deletions

View File

@ -0,0 +1,197 @@
@mod @mod_assign @app @javascript
Feature: Test basic usage of assignment activity in app
In order to participate in the assignment while using the mobile app
I need basic assignment functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | duedate | attemptreopenmethod |
| assign | C1 | assign1 | assignment1 | Test assignment description1 | 1 | 1 | manual |
@app @3.8.0 @OK
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)
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I should see "Test assignment description1"
And I should see "Due date"
And I should see "Thursday, 1 January 1970, 1:00 AM"
And I press "Add submission" in the app
And I set the field "Online text submissions" to "Submission test" in the app
And I press "Save" in the app
Then I should see "Draft (not submitted)"
And I should see "Not graded"
And I press "Edit submission" in the app
And I set the field "Online text submissions" to "Submission test edited" in the app
And I press "Save" in the app
And I press "OK" in the app
And I press "Submit assignment" in the app
And I press "OK" in the app
Then I should see "Submitted for grading"
And I should see "Not graded"
And I should see "Submission test edited"
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I press "Submitted" in the app
Then I should see "Student student"
And I should see "Not graded"
And I press "Student student" near "assignment1" in the app
Then I should see "Online text submission"
And I should see "Submission test edited"
@app @3.8.0 @OK
Scenario: Add new attempt from previous submission
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I should see "Test assignment description1"
And I should see "Due date"
And I should see "Thursday, 1 January 1970, 1:00 AM"
And I press "Add submission" in the app
And I set the field "Online text submissions" to "Submission test" in the app
And I press "Save" in the app
And I press "Submit assignment" in the app
And I press "OK" in the app
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I press "Participants" in the app
Then I should see "Student student"
And I should see "Not graded"
And I press "Student student" near "assignment1" in the app
Then I should see "Online text submission"
And I should see "Submission test"
And I press "Grade" in the app
And I press "Allow another attempt" in the app
And I press "Done"
Then I should see "Reopened"
And I should see "Not graded"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "assignment1" in the app
And I should see "Reopened"
And I should see "2 out of Unlimited"
And I should see "Add a new attempt based on previous submission"
And I should see "Add a new attempt"
And I press "Add a new attempt based on previous submission" in the app
And I press "OK" in the app
Then I should see "Submission test"
And I set the field "Online text submissions" to "Submission test 2 attempt" in the app
And I press "Save" in the app
And I press "OK" in the app
And I press "Submit assignment" in the app
And I press "OK" in the app
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I press "Participants" in the app
Then I should see "Student student"
And I should see "Not graded"
And I press "Student student" near "assignment1" in the app
Then I should see "Online text submission"
And I should see "Submission test 2 attempt"
@app @3.8.0 @OK
Scenario: Add submission offline (online text), submit for grading offline and sync submissions
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I should see "Test assignment description1"
And I should see "Due date"
And I should see "Thursday, 1 January 1970, 1:00 AM"
And I press "Add submission" in the app
And I switch offline mode to "true"
And I set the field "Online text submissions" to "Submission test" in the app
And I press "Save" in the app
And I press "Submit assignment" in the app
And I press "OK" in the app
Then I should see "This Assignment has offline data to be synchronised."
And I switch offline mode to "false"
And I press the back button in the app
And I press "assignment1" in the app
And I press "Display options" in the app
And I press "Refresh" in the app
Then I should not see "This Assignment has offline data to be synchronised."
And I should see "Submitted for grading"
@app @3.8.0 @OK
Scenario: Edit an offline submission before synchronizing it
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I should see "Test assignment description1"
And I should see "Due date"
And I should see "Thursday, 1 January 1970, 1:00 AM"
And I press "Add submission" in the app
And I switch offline mode to "true"
And I set the field "Online text submissions" to "Submission test1" in the app
And I press "Save" in the app
Then I should see "This Assignment has offline data to be synchronised."
And I should see "Submission test1"
And I press "Edit submission" in the app
And I set the field "Online text submissions" to "Submission test edited offline" in the app
And I press "Save" in the app
Then I should see "This Assignment has offline data to be synchronised."
And I should not see "Submission test1"
And I should see "Submission test edited offline"
And I press "Submit assignment" in the app
And I press "OK" in the app
Then I should see "This Assignment has offline data to be synchronised."
And I switch offline mode to "false"
And I press the back button in the app
And I press "assignment1" in the app
Then I should not see "This Assignment has offline data to be synchronised."
And I should see "Submitted for grading"
And I should see "Submission test edited offline"

View File

@ -0,0 +1,74 @@
@mod @mod_chat @app @javascript
Feature: Test basic usage of chat in app
As a student
I need basic chat functionality to work
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist:
| username | firstname | lastname |
| student1 | david | student |
| student2 | pau | student2 |
| teacher1 | juan | teacher |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode |
| chat | Test chat name | Test chat | C1 | chat | 0 |
@app @3.8.0 @OK
Scenario: Receive and send messages, see connected users, beep and talk to
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test chat name" in the app
Then I should see "Click here to enter the chat now"
And I should see "View past chat sessions"
And I press "Click here to enter the chat now" in the app
And I set the field "New message" to "Hi!"
And I press "Send" in the app
And I set the field "New message" to "I am David"
And I press "Send" in the app
When I enter the app
And I log in as "student2"
And I press "Course 1" near "Course overview" in the app
And I press "Test chat name" in the app
And I press "Click here to enter the chat now" in the app
Then I should see "Hi!"
And I should see "I am David"
And I press "people" in the app
Then I should see "david student"
And I press "Beep" in the app
Then I should see "You beeped david student"
And I set the field "New message" to "Hi David, I am Pau."
And I press "Send" in the app
@app @3.8.0 @OK
Scenario: Past sessions shown for >=3.5
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test chat name" in the app
Then I should see "Click here to enter the chat now"
And I should see "View past chat sessions"
And I press "Click here to enter the chat now" in the app
And I set the field "New message" to "Hi!"
And I press "Send" in the app
And I set the field "New message" to "I am David"
And I press "Send" in the app
When I enter the app
And I log in as "student2"
And I press "Course 1" near "Course overview" in the app
And I press "Test chat name" in the app
Then I should see "Click here to enter the chat now"
And I should see "View past chat sessions"
And I press "View past chat sessions" in the app
And I press "Show incomplete sessions" in the app
And I press "david student (2)" in the app
Then I should see "Hi!"
And I should see "I am David"

View File

@ -1,23 +1,27 @@
@mod @mod_choice @app @javascript @mod @mod_choice @app @javascript
Feature: Test basic usage in app Feature: Test basic usage of choice activity in app
In order to participate in the choice while using the mobile app In order to participate in the choice while using the mobile app
As a student As a student
I need basic choice functionality to work I need basic choice functionality to work
Background: Background:
Given the following "courses" exist: Given the following "users" exist:
| fullname | shortname | | username | firstname | lastname | email |
| Course 1 | C1 | | teacher1 | Teacher | teacher | teacher1@example.com |
And the following "users" exist: | student1 | Student | student | student1@example.com |
| username | And the following "courses" exist:
| teacher1 | | fullname | shortname | category |
| student1 | | Course 1 | C1 | 0 |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | option |
| choice | Choice name | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 |
Scenario: Student sends their single choice @app @3.8.0 @OK
Scenario: Student sends their single choice and views results.
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | option | allowmultiple | allowupdate | showresults | | activity | name | intro | course | idnumber | option | allowmultiple | allowupdate | showresults |
| choice | Test single choice name | Test single choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 0 | 0 | 1 | | choice | Test single choice name | Test single choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 0 | 0 | 1 |
@ -34,8 +38,14 @@ Feature: Test basic usage in app
And I should see "Option 2: 1" And I should see "Option 2: 1"
And I should see "Option 3: 0" And I should see "Option 3: 0"
And I should not see "Remove my choice" And I should not see "Remove my choice"
And I press the back button in the app
And I press "Test single choice name" in the app
And I should see "Option 1: 0"
And I should see "Option 2: 1"
And I should see "Option 3: 0"
Scenario: Student sends, changes and remove their multi choice @app @3.8.0 @OK
Scenario: Student sends, changes and removes the multi choice
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | option | allowmultiple | allowupdate | showresults | | activity | name | intro | course | idnumber | option | allowmultiple | allowupdate | showresults |
| choice | Test multi choice name | Test multi choice description | C1 | choice2 | Option 1, Option 2, Option 3 | 1 | 1 | 1 | | choice | Test multi choice name | Test multi choice description | C1 | choice2 | Option 1, Option 2, Option 3 | 1 | 1 | 1 |
@ -61,3 +71,120 @@ Feature: Test basic usage in app
And I press "Delete" in the app And I press "Delete" in the app
And I should not see "Remove my choice" And I should not see "Remove my choice"
And I should see "The results are not currently viewable" And I should see "The results are not currently viewable"
@app @3.8.0 @OK
Scenario: Student answers, changes answer offline and sync
Given the following "activities" exist:
| activity | name | intro | course | idnumber | option | allowmultiple | allowupdate | showresults |
| choice | Test single choice name | Test single choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 0 | 0 | 1 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test single choice name" in the app
And I press "Option 1" in the app
And I switch offline mode to "true"
And I press "Option 2" in the app
And I press "Save my choice" in the app
Then I should see "Are you sure"
And I press "OK" in the app
And I press the back button in the app
And I press "Test single choice name" in the app
Then I should not see "Option 1: 0"
And I should not see "Option 2: 1"
And I should not see "Option 3: 0"
And I should see "This Choice has offline data to be synchronised."
And I switch offline mode to "false"
And I press the back button in the app
And I press "Test single choice name" in the app
And I press "Display options" in the app
And I press "Refresh" in the app
Then I should see "Option 1: 0"
And I should see "Option 2: 1"
And I should see "Option 3: 0"
And I should not see "This Choice has offline data to be synchronised."
@app @3.8.0 @OK
Scenario: Student answers, changes answer offline and auto-sync
Given the following "activities" exist:
| activity | name | intro | course | idnumber | option | allowmultiple | allowupdate | showresults |
| choice | Test single choice name | Test single choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 0 | 0 | 1 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test single choice name" in the app
And I press "Option 1" in the app
And I switch offline mode to "true"
And I press "Option 2" in the app
And I press "Save my choice" in the app
And I should see "Are you sure"
And I press "OK" in the app
And I switch offline mode to "false"
Then I should not see "Option 1: 0"
And I should not see "Option 2: 1"
And I should not see "Option 3: 0"
And I should see "This Choice has offline data to be synchronised."
And I wait "600" seconds
Then I should see "Option 1: 0"
And I should see "Option 2: 1"
And I should see "Option 3: 0"
And I should not see "This Choice has offline data to be synchronised."
@app @3.8.0 @OK
Scenario: Prefetch
Given the following "activities" exist:
| activity | name | intro | course | idnumber | option | allowmultiple | allowupdate | showresults |
| choice | Test single choice name | Test single choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 0 | 0 | 1 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test single choice name" in the app
And I switch offline mode to "true"
And I press "Choice name" in the app
And I should see "There was a problem connecting to the site. Please check your connection and try again."
And I press "OK" in the app
And I press the back button in the app
And I press "Test single choice name" in the app
And I press "Option 1" in the app
And I press "Option 2" in the app
And I press "Save my choice" in the app
And I should see "Are you sure"
And I press "OK" in the app
And I press the back button in the app
And I press "Test single choice name" in the app
And I should not see "Option 1: 0"
And I should not see "Option 2: 1"
And I should not see "Option 3: 0"
And I should see "This Choice has offline data to be synchronised."
And I switch offline mode to "false"
And I press the back button in the app
And I press "Test single choice name" in the app
Then I should see "Option 1: 0"
And I should see "Option 2: 1"
And I should see "Option 3: 0"
And I should not see "This Choice has offline data to be synchronised."
@app @3.8.0 @OK
Scenario: Download students choice in text format
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Choice name" in the app
And I press "Option 1" in the app
And I press "Option 2" in the app
And I press "Save my choice" in the app
And I should see "Are you sure"
And I press "OK" in the app
When I enter the app
And I log in as "teacher1"
And I press "Course 1" near "Course overview" in the app
And I press "Choice name" in the app
And I press "Display options" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I press "Actions menu"
And I follow "View 1 responses"
And I press "Download in text format"
And I close the browser tab opened by the app

View File

@ -0,0 +1,497 @@
@mod @mod_comments @app @javascript
Feature: Test basic usage of comments in app
In order to participate in the comments while using the mobile app
As a student
I need basic comments functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | mainglossary | allowcomments | assessed | scale |
| glossary | Test glossary | glossary description | C1 | gloss1 | 1 | 1 | 1 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | comments |
| data | Data | Data info | C1 | data1 | 1 |
@app @3.8.0 @OK
Scenario: Add comments and delete comments (database)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Data" in the app
And I press "Display options" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I add a "Text input" field to "Data" database and I fill the form with:
| Field name | Test field name |
| Field description | Test field description |
And I press "Save"
And I close the browser tab opened by the app
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Data" in the app
And I press "add" in the app
And I set the field "Test field name" to "Test" in the app
And I press "Save" in the app
And I press "More" in the app
And I press "Comments (0)" in the app
And I press "close" in the app
And I set the field "Add a comment..." to "comment test" in the app
And I press "Save comment" in the app
Then I should see "Comment created"
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Data" in the app
And I press "More" in the app
And I press "Comments (1)" in the app
And I press "close" in the app
And I set the field "Add a comment..." to "comment test student" in the app
And I press "Save comment" in the app
Then I should see "Comment created"
And I should see "comment test"
And I should see "comment test student"
And I press the back button in the app
And I should see "Comments (2)"
And I press "Comments (2)" in the app
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" near "Cancel" in the app
Then I should see "Comment deleted"
And I should see "comment test"
And I should not see "comment test student"
And I press the back button in the app
And I should see "Comments (1)"
@app @3.8.0 @OK
Scenario: Add comments offline, delete comments offline and sync (database)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Data" in the app
And I press "Display options" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I add a "Text input" field to "Data" database and I fill the form with:
| Field name | Test field name |
| Field description | Test field description |
And I press "Save"
And I close the browser tab opened by the app
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Data" in the app
And I press "add" in the app
And I set the field "Test field name" to "Test" in the app
And I press "Save" in the app
And I press "More" in the app
And I press "Comments (0)" in the app
And I switch offline mode to "true"
And I press "close" in the app
And I set the field "Add a comment..." to "comment test" in the app
And I press "Save comment" in the app
Then I should see "Data stored in the device because it couldn't be sent. It will be sent automatically later."
And I should see "There are offline comments to be synchronised."
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
And I press "Comments (0)" in the app
And I switch offline mode to "false"
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should not see "There are offline comments to be synchronised."
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I switch offline mode to "true"
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" near "Cancel" in the app
Then I should see "Comment deleted"
And I should see "There are offline comments to be synchronised."
And I should see "Deleted offline"
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I switch offline mode to "false"
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should not see "There are offline comments to be synchronised."
And I should not see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
@app @3.8.0 @OK
Scenario: Add comments and delete comments (glossary)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "potato" in the app
And I press "Comments (0)" in the app
And I press "close" in the app
And I set the field "Add a comment..." to "comment test" in the app
And I press "Save comment" in the app
Then I should see "Comment created"
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Test glossary" in the app
And I press "potato" in the app
And I press "Comments (1)" in the app
And I press "close" in the app
And I set the field "Add a comment..." to "comment test student" in the app
And I press "Save comment" in the app
Then I should see "Comment created"
And I should see "comment test"
And I should see "comment test student"
And I press the back button in the app
And I should see "Comments (2)"
And I press "Comments (2)" in the app
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" near "Cancel" in the app
Then I should see "Comment deleted"
And I should see "comment test"
And I should not see "comment test student"
And I press the back button in the app
And I should see "Comments (1)"
@app @3.8.0 @OK
Scenario: Add comments offline, delete comments offline and sync (glossary)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "potato" in the app
And I press "Comments (0)" in the app
And I switch offline mode to "true"
And I press "close" in the app
And I set the field "Add a comment..." to "comment test" in the app
And I press "Save comment" in the app
Then I should see "Data stored in the device because it couldn't be sent. It will be sent automatically later."
And I should see "There are offline comments to be synchronised."
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
And I press "Comments (0)" in the app
And I switch offline mode to "false"
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should not see "There are offline comments to be synchronised."
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I switch offline mode to "true"
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" near "Cancel" in the app
Then I should see "Comment deleted"
And I should see "There are offline comments to be synchronised."
And I should see "Deleted offline"
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I switch offline mode to "false"
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should not see "There are offline comments to be synchronised."
And I should not see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
@app @3.8.0 @mobile @OK
Scenario: Add comments and delete comments mobile (blogs)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "menu" in the app
And I press "Website" in the app
And I switch to the browser tab opened by the app
And I follow "Log in"
And I log in as "teacher1"
And I click on "Side panel" "button"
And I follow "C1"
And I press "Actions menu"
And I follow "Turn editing on"
And I click on "Side panel" "button"
And I follow "Add a block"
And I follow "Blog menu"
And I follow "Add an entry about this course"
And I set the field "Entry title" to "Blog test"
And I set the field "Blog entry body" to "Blog body"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "menu" in the app
And I press "Site blog" in the app
Then I should see "Blog test"
And I should see "Blog body"
And I should see "Comments (0)"
And I press "Comments (0)" in the app
And I press "close" in the app
And I set the field "Add a comment..." to "comment test" in the app
And I press "Save comment" in the app
Then I should see "Comment created"
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" near "Cancel" in the app
Then I should see "Comment deleted"
And I should not see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
@app @3.8.0 @tablet @OK
Scenario: Add comments and delete comments tablet (blogs)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "menu" in the app
And I press "Website" in the app
And I switch to the browser tab opened by the app
And I follow "Log in"
And I log in as "teacher1"
And I follow "C1"
And I press "Actions menu"
And I follow "Turn editing on"
And I follow "Add a block"
And I follow "Blog menu"
And I follow "Add an entry about this course"
And I set the field "Entry title" to "Blog test"
And I set the field "Blog entry body" to "Blog body"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Site blog" in the app
Then I should see "Blog test"
And I should see "Blog body"
And I should see "Comments (0)"
And I press "Comments (0)" in the app
And I press "close" in the app
And I set the field "Add a comment..." to "comment test" in the app
And I press "Save comment" in the app
Then I should see "Comment created"
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" near "Cancel" in the app
Then I should see "Comment deleted"
And I should not see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
@app @3.8.0 @mobile @OK
Scenario: Add comments offline, delete comments offline and sync mobile (blogs)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "menu" in the app
And I press "Website" in the app
And I switch to the browser tab opened by the app
And I follow "Log in"
And I log in as "teacher1"
And I click on "Side panel" "button"
And I follow "C1"
And I press "Actions menu"
And I follow "Turn editing on"
And I click on "Side panel" "button"
And I follow "Add a block"
And I follow "Blog menu"
And I follow "Add an entry about this course"
And I set the field "Entry title" to "Blog test"
And I set the field "Blog entry body" to "Blog body"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "menu" in the app
And I press "Site blog" in the app
Then I should see "Blog test"
And I should see "Blog body"
And I should see "Comments (0)"
And I press "Comments (0)" in the app
And I switch offline mode to "true"
And I press "close" in the app
And I set the field "Add a comment..." to "comment test" in the app
And I press "Save comment" in the app
Then I should see "Data stored in the device because it couldn't be sent. It will be sent automatically later."
And I should see "There are offline comments to be synchronised."
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
And I press "Comments (0)" in the app
And I switch offline mode to "false"
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should not see "There are offline comments to be synchronised."
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I switch offline mode to "true"
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" near "Cancel" in the app
Then I should see "Comment deleted"
And I should see "There are offline comments to be synchronised."
And I should see "Deleted offline"
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I switch offline mode to "false"
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should not see "There are offline comments to be synchronised."
And I should not see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
@app @3.8.0 @tablet @OK
Scenario: Add comments offline, delete comments offline and sync tablet (blogs)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "menu" in the app
And I press "Website" in the app
And I switch to the browser tab opened by the app
And I follow "Log in"
And I log in as "teacher1"
And I follow "C1"
And I press "Actions menu"
And I follow "Turn editing on"
And I follow "Add a block"
And I follow "Blog menu"
And I follow "Add an entry about this course"
And I set the field "Entry title" to "Blog test"
And I set the field "Blog entry body" to "Blog body"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Site blog" in the app
Then I should see "Blog test"
And I should see "Blog body"
And I should see "Comments (0)"
And I press "Comments (0)" in the app
And I switch offline mode to "true"
And I press "close" in the app
And I set the field "Add a comment..." to "comment test" in the app
And I press "Save comment" in the app
Then I should see "Data stored in the device because it couldn't be sent. It will be sent automatically later."
And I should see "There are offline comments to be synchronised."
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (0)"
And I press "Comments (0)" in the app
And I switch offline mode to "false"
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should not see "There are offline comments to be synchronised."
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I switch offline mode to "true"
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" near "Cancel" in the app
Then I should see "Comment deleted"
And I should see "There are offline comments to be synchronised."
And I should see "Deleted offline"
And I should see "comment test"
And I press the back button in the app
And I should see "Comments (1)"
And I press "Comments (1)" in the app
And I switch offline mode to "false"
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should not see "There are offline comments to be synchronised."
And I should not see "comment test"
And I press the back button in the app
And I should see "Comments (0)"

View File

@ -0,0 +1,576 @@
@mod @mod_course @app @javascript
Feature: Test basic usage of one course in app
In order to participate in one course while using the mobile app
As a student
I need basic course functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
| student2 | Student2 | student2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | option | section |
| choice | Choice course 1 | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 1 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | section |
| assign | C1 | assign1 | assignment | Test assignment description | 1 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | assessed | scale[modgrade_type] |
| forum | Test forum name | Test forum | C1 | forum | 0 | 5 | Point |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| chat | Test chat name | Test chat | C1 | chat | 0 | 2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| data | Web links | Useful links | C1 | data1 | 4 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| lti | Test external name | Test external | C1 | external | 0 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| feedback | Test feedback name | Test feedback | C1 | feedback | 0 | 3 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| glossary | Test glossary | glossary description | C1 | gloss1 | 5 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 2 |
And the following "question categories" exist:
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | Text of the first question |
| Test questions | truefalse | TF2 | Text of the second question |
And quiz "Quiz 1" contains the following questions:
| question | page |
| TF1 | 1 |
| TF2 | 2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| survey | Test survey name | Test survey | C1 | survey | 0 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode |
| wiki | Test wiki name | Test wiki | C1 | wiki | 0 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| lesson | Test lesson name | Test lesson | C1 | lesson | 0 | 3 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| scorm | Test scorm name | Test scorm | C1 | scorm | 0 | 2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | section |
| workshop | Test workshop name | Test workshop | C1 | workshop | 0 | 3 |
@app @3.8.0 @OK
Scenario: Student views course contents
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I should see "Choice course 1"
And I should see "assignment"
And I should see "Test forum name"
And I should see "Test chat name"
And I should see "Web links"
And I should see "Test external name"
And I should see "Test feedback name"
And I should see "Test glossary"
And I should see "Quiz 1"
And I should see "Test survey name"
And I should see "Test wiki name"
And I should see "Test lesson name"
And I should see "Test scorm name"
And I should see "Test workshop name"
And I press "Choice course 1" in the app
Then the header should be "Choice course 1" in the app
And I press the back button in the app
And I press "assignment" in the app
Then the header should be "assignment" in the app
And I press the back button in the app
And I press "Test forum name" in the app
Then the header should be "Test forum name" in the app
And I press the back button in the app
And I press "Test chat name" in the app
Then the header should be "Test chat name" in the app
And I press the back button in the app
And I press "Web links" in the app
Then the header should be "Web links" in the app
And I press the back button in the app
And I press "Test external name" in the app
Then the header should be "Test external name" in the app
And I press the back button in the app
And I press "Test feedback name" in the app
And I press "OK" in the app
Then the header should be "Test feedback name" in the app
And I press the back button in the app
And I press "Test glossary" in the app
Then the header should be "Test glossary" in the app
And I press the back button in the app
And I press "Quiz 1" in the app
Then the header should be "Quiz 1" in the app
And I press the back button in the app
And I press "Test survey name" in the app
Then the header should be "Test survey name" in the app
And I press the back button in the app
And I press "Test wiki name" in the app
And I press "OK" in the app
Then the header should be "Test wiki name" in the app
And I press the back button in the app
And I press "Test lesson name" in the app
Then the header should be "Test lesson name" in the app
And I press the back button in the app
And I press "Test scorm name" in the app
Then the header should be "Test scorm name" in the app
And I press the back button in the app
And I press "Test workshop name" in the app
Then the header should be "Test workshop name" in the app
And I press the back button in the app
@app @3.8.0 @OK
Scenario: Student views section contents
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I should see "Choice course 1"
And I should see "assignment"
And I should see "Test forum name"
And I should see "Test chat name"
And I should see "Web links"
And I should see "Test external name"
And I should see "Test feedback name"
And I should see "Test glossary"
And I should see "Quiz 1"
And I should see "Test survey name"
And I should see "Test wiki name"
And I should see "Test lesson name"
And I should see "Test scorm name"
And I should see "Test workshop name"
And I press "arrow dropdown" in the app
And I press "General" near "Sections" in the app
Then I should not see "Choice course 1"
And I should not see "assignment"
And I should see "Test forum name"
And I should not see "Test chat name"
And I should not see "Web links"
And I should not see "Test external name"
And I should not see "Test feedback name"
And I should not see "Test glossary"
And I should not see "Quiz 1"
And I should not see "Test survey name"
And I should see "Test wiki name"
And I should not see "Test lesson name"
And I should not see "Test scorm name"
And I should not see "Test workshop name"
And I press "Test forum name" in the app
Then the header should be "Test forum name" in the app
And I press the back button in the app
And I press "Test wiki name" in the app
And I press "OK" in the app
Then the header should be "Test wiki name" in the app
And I press the back button in the app
And I press "arrow dropdown" in the app
And I press "Topic 1" near "Sections" in the app
Then I should see "Choice course 1"
And I should see "assignment"
And I should not see "Test forum name"
And I should not see "Test chat name"
And I should not see "Web links"
And I should see "Test external name"
And I should not see "Test feedback name"
And I should not see "Test glossary"
And I should not see "Quiz 1"
And I should see "Test survey name"
And I should not see "Test wiki name"
And I should not see "Test lesson name"
And I should not see "Test scorm name"
And I should not see "Test workshop name"
And I press "Choice course 1" in the app
Then the header should be "Choice course 1" in the app
And I press the back button in the app
And I press "assignment" in the app
Then the header should be "assignment" in the app
And I press the back button in the app
And I press "Test external name" in the app
Then the header should be "Test external name" in the app
And I press the back button in the app
And I press "Test survey name" in the app
Then the header should be "Test survey name" in the app
And I press the back button in the app
And I press "arrow dropdown" in the app
And I press "Topic 2" near "Sections" in the app
Then I should not see "Choice course 1"
And I should not see "assignment"
And I should not see "Test forum name"
And I should see "Test chat name"
And I should not see "Web links"
And I should not see "Test external name"
And I should not see "Test feedback name"
And I should not see "Test glossary"
And I should see "Quiz 1"
And I should not see "Test survey name"
And I should not see "Test wiki name"
And I should not see "Test lesson name"
And I should see "Test scorm name"
And I should not see "Test workshop name"
And I press "Test chat name" in the app
Then the header should be "Test chat name" in the app
And I press the back button in the app
And I press "Quiz 1" in the app
Then the header should be "Quiz 1" in the app
And I press the back button in the app
And I press "Test scorm name" in the app
Then the header should be "Test scorm name" in the app
And I press the back button in the app
And I press "arrow dropdown" in the app
And I press "Topic 3" near "Sections" in the app
Then I should not see "Choice course 1"
And I should not see "assignment"
And I should not see "Test forum name"
And I should not see "Test chat name"
And I should not see "Web links"
And I should not see "Test external name"
And I should see "Test feedback name"
And I should not see "Test glossary"
And I should not see "Quiz 1"
And I should not see "Test survey name"
And I should not see "Test wiki name"
And I should see "Test lesson name"
And I should not see "Test scorm name"
And I should see "Test workshop name"
And I press "Test feedback name" in the app
And I press "OK" in the app
Then the header should be "Test feedback name" in the app
And I press the back button in the app
And I press "Test lesson name" in the app
Then the header should be "Test lesson name" in the app
And I press the back button in the app
And I press "Test workshop name" in the app
Then the header should be "Test workshop name" in the app
And I press the back button in the app
And I press "arrow dropdown" in the app
And I press "Topic 4" near "Sections" in the app
Then I should not see "Choice course 1"
And I should not see "assignment"
And I should not see "Test forum name"
And I should not see "Test chat name"
And I should see "Web links"
And I should not see "Test external name"
And I should not see "Test feedback name"
And I should not see "Test glossary"
And I should not see "Quiz 1"
And I should not see "Test survey name"
And I should not see "Test wiki name"
And I should not see "Test lesson name"
And I should not see "Test scorm name"
And I should not see "Test workshop name"
And I press "Web links" in the app
Then the header should be "Web links" in the app
And I press the back button in the app
And I press "arrow dropdown" in the app
And I press "Topic 5" near "Sections" in the app
Then I should not see "Choice course 1"
And I should not see "assignment"
And I should not see "Test forum name"
And I should not see "Test chat name"
And I should not see "Web links"
And I should not see "Test external name"
And I should not see "Test feedback name"
And I should see "Test glossary"
And I should not see "Quiz 1"
And I should not see "Test survey name"
And I should not see "Test wiki name"
And I should not see "Test lesson name"
And I should not see "Test scorm name"
And I should not see "Test workshop name"
And I press "Test glossary" in the app
Then the header should be "Test glossary" in the app
And I press the back button in the app
@app @3.8.0 @OK
Scenario: Navigation between sections using the bottom arrows
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I should see "Choice course 1"
And I should see "assignment"
And I should see "Test forum name"
And I should see "Test chat name"
And I should see "Web links"
And I should see "Test external name"
And I should see "Test feedback name"
And I should see "Test glossary"
And I should see "Quiz 1"
And I should see "Test survey name"
And I should see "Test wiki name"
And I should see "Test lesson name"
And I should see "Test scorm name"
And I should see "Test workshop name"
And I press "arrow dropdown" in the app
And I press "General" near "Sections" in the app
Then I should see "General"
And I should not see "Topic 1"
And I should not see "Topic 2"
And I should not see "Topic 3"
And I should not see "Topic 4"
And I should not see "Topic 5"
And I press "arrow forward" near "Test wiki name" in the app
Then I should not see "General"
And I should see "Topic 1"
And I should not see "Topic 2"
And I should not see "Topic 3"
And I should not see "Topic 4"
And I should not see "Topic 5"
And I press "arrow forward" near "Test survey name" in the app
Then I should not see "General"
And I should not see "Topic 1"
And I should see "Topic 2"
And I should not see "Topic 3"
And I should not see "Topic 4"
And I should not see "Topic 5"
And I press "arrow forward" near "Test scorm name" in the app
Then I should not see "General"
And I should not see "Topic 1"
And I should not see "Topic 2"
And I should see "Topic 3"
And I should not see "Topic 4"
And I should not see "Topic 5"
And I press "arrow forward" near "Test workshop name" in the app
Then I should not see "General"
And I should not see "Topic 1"
And I should not see "Topic 2"
And I should not see "Topic 3"
And I should see "Topic 4"
And I should not see "Topic 5"
And I press "arrow forward" near "Web links" in the app
Then I should not see "General"
And I should not see "Topic 1"
And I should not see "Topic 2"
And I should not see "Topic 3"
And I should not see "Topic 4"
And I should see "Topic 5"
And I press "arrow back" near "Test glossary" in the app
Then I should not see "General"
And I should not see "Topic 1"
And I should not see "Topic 2"
And I should not see "Topic 3"
And I should see "Topic 4"
And I should not see "Topic 5"
@app @3.8.0 @OK
Scenario: Self enrol
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I press "Actions menu"
And I follow "More..."
And I follow "Users"
And I follow "Enrolment methods"
And I click on "Enable" "icon" in the "Self enrolment (Student)" "table_row"
And I close the browser tab opened by the app
When I enter the app
And I log in as "student2"
Then the header should be "Acceptance test site" in the app
And I press "Site home" in the app
And I press "Available courses" in the app
And I press "Course 1" in the app
And I press "Enrol me" in the app
And I press "OK" in the app
And I press "Contents" in the app
Then the header should be "Course 1" in the app
And I should see "Choice course 1"
And I should see "assignment"
And I should see "Test forum name"
And I should see "Test chat name"
And I should see "Web links"
And I should see "Test external name"
And I should see "Test feedback name"
And I should see "Test glossary"
And I should see "Quiz 1"
And I should see "Test survey name"
And I should see "Test wiki name"
And I should see "Test lesson name"
And I should see "Test scorm name"
And I should see "Test workshop name"
@app @3.8.0 @OK
Scenario: Guest access
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I press "Actions menu"
And I follow "More..."
And I follow "Users"
And I follow "Enrolment methods"
And I click on "Enable" "icon" in the "Guest access" "table_row"
And I close the browser tab opened by the app
When I enter the app
And I log in as "student2"
Then the header should be "Acceptance test site" in the app
And I press "Site home" in the app
And I press "Available courses" in the app
And I press "Course 1" in the app
Then I should see "Download course"
And I should see "Contents"
And I press "Contents" in the app
Then the header should be "Course 1" in the app
And I should see "Choice course 1"
And I should see "assignment"
And I should see "Test forum name"
And I should see "Test chat name"
And I should see "Web links"
And I should see "Test feedback name"
And I should see "Test glossary"
And I should see "Quiz 1"
And I should see "Test survey name"
And I should see "Test wiki name"
And I should see "Test lesson name"
And I should see "Test scorm name"
And I should see "Test workshop name"
@app @3.8.0 @mobile @OK
Scenario: View blocks bellow/beside contents also when All sections selected (mobile)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I press "Actions menu"
And I follow "Turn editing on"
And I click on "Side panel" "button"
And I follow "Add a block"
And I follow "HTML"
And I click on "Side panel" "button"
And I follow "Add a block"
And I follow "Activities"
And I click on "Actions menu" "icon" in the "#action-menu-toggle-0" "css_element"
And I follow "Configure (new HTML block) block"
And I set the field "HTML block title" to "HTML title test"
And I set the field "Content" to "body test"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I should see "Choice course 1"
And I should see "assignment"
And I should see "Test forum name"
And I should see "Test chat name"
And I should see "Web links"
And I should see "Test external name"
And I should see "Test feedback name"
And I should see "Test glossary"
And I should see "Quiz 1"
And I should see "Test survey name"
And I should see "Test wiki name"
And I should see "Test lesson name"
And I should see "Test scorm name"
And I should see "Test workshop name"
Then I should see "HTML title test"
And I should see "body test"
And I should see "Activities"
@app @3.8.0 @tablet @OK
Scenario: View blocks bellow/beside contents also when All sections selected (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Display options" in the app
And I press "Course summary" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I press "Actions menu"
And I follow "Turn editing on"
And I follow "Add a block"
And I follow "HTML"
And I follow "Add a block"
And I follow "Activities"
And I click on "Actions menu" "icon" in the "#action-menu-toggle-0" "css_element"
And I follow "Configure (new HTML block) block"
And I set the field "HTML block title" to "HTML title test"
And I set the field "Content" to "body test"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I should see "Choice course 1"
And I should see "assignment"
And I should see "Test forum name"
And I should see "Test chat name"
And I should see "Web links"
And I should see "Test external name"
And I should see "Test feedback name"
And I should see "Test glossary"
And I should see "Quiz 1"
And I should see "Test survey name"
And I should see "Test wiki name"
And I should see "Test lesson name"
And I should see "Test scorm name"
And I should see "Test workshop name"
Then I should see "HTML title test"
And I should see "body test"
And I should see "Activities"

View File

@ -0,0 +1,162 @@
@mod @mod_courses @app @javascript
Feature: Test basic usage of courses in app
In order to participate in the courses while using the mobile app
As a student
I need basic courses functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student | student | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | 0 |
| Course 3 | C3 | 0 |
| Course 4 | C4 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
| teacher1 | C3 | editingteacher |
| teacher1 | C4 | editingteacher |
| student1 | C1 | student |
| student1 | C2 | student |
| student1 | C3 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | option |
| choice | Choice course 1 | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 2 | Test choice description | C2 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 3 | Test choice description | C3 | choice1 | Option 1, Option 2, Option 3 |
| choice | Choice course 4 | Test choice description | C4 | choice1 | Option 1, Option 2, Option 3 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled |
| assign | C1 | assign1 | assignment | Test assignment description | 1 |
@app @3.8.0 @OK
Scenario: Dashboard tab displayed in >= 3.3 sites
When I enter the app
And I log in as "student1"
Then I should see "Dashboard"
And the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I press "Site home" in the app
Then I should see "Dashboard"
And the header should be "Acceptance test site" in the app
And I press "Dashboard" in the app
Then I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
@app @3.8.0 @OK
Scenario: See my courses
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I press "Course 1" near "Recently accessed courses" in the app
Then I should see "Choice course 1"
And the header should be "Course 1" in the app
And I press "Choice course 1" in the app
Then I should see "Test choice description"
And the header should be "Choice course 1" in the app
And I press the back button in the app
And I press the back button in the app
And I press "Course 2" near "Recently accessed courses" in the app
Then I should see "Choice course 2"
And the header should be "Course 2" in the app
And I press the back button in the app
And I press "Course 3" near "Recently accessed courses" in the app
Then I should see "Choice course 3"
And the header should be "Course 3" in the app
@app @3.8.0 @OK
Scenario: Search for a course
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I press "Search courses" in the app
And I set the field "Search" to "Course 4" in the app
And I press "Search" in the app
Then I should see "Course 4"
And the header should be "Search courses" in the app
And I press "Course 4" in the app
Then I should see "Course 4"
And the header should be "Course 4" in the app
And I press the back button in the app
And I set the field "Search" to "Course" in the app
And I press "Search" in the app
Then I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I should see "Course 4"
@app @3.8.0 @OK
Scenario: Links to actions in Timeline work for teachers/students
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I should see "Timeline"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "assignment" in the app
And I press "Display options" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I press "Actions menu"
And I follow "Edit settings"
And I press "Expand all"
And I click on "duedate[enabled]" "checkbox"
And I click on "gradingduedate[enabled]" "checkbox"
And I press "Save and return to course"
And I close the browser tab opened by the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I should see "Timeline"
And I press "Add submission" in the app
Then the header should be "assignment" in the app
And I should see "Test assignment description"
And I should see "No attempt"
And I should see "Due date"
And I press "Add submission" in the app
And I set the field "Online text submissions" to "test" in the app
And I press "Save" in the app
And I press "Submit assignment" in the app
And I press "OK" in the app
Then the header should be "assignment" in the app
And I should see "Test assignment description"
And I should see "Submitted for grading"
And I should see "Due date"
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I should see "Timeline"
And I press "Grade" in the app
Then the header should be "assignment" in the app
And I should see "Test assignment description"
And I should see "Time remaining"
And I press "Needs grading" in the app
Then I should see "Student student"
And I should see "Not graded"

View File

@ -1,5 +1,5 @@
@mod @mod_forum @app @javascript @mod @mod_forum @app @javascript
Feature: Test basic usage in app Feature: Test basic usage of forum activity in app
In order to participate in the forum while using the mobile app In order to participate in the forum while using the mobile app
As a student As a student
I need basic forum functionality to work I need basic forum functionality to work
@ -11,14 +11,21 @@ Feature: Test basic usage in app
And the following "users" exist: And the following "users" exist:
| username | | username |
| student1 | | student1 |
| student2 |
| teacher1 |
| teacher2 |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | intro | course | idnumber | groupmode | assessed | scale |
| forum | Test forum name | Test forum | C1 | forum | 0 | | forum | Test forum name | Test forum | C1 | forum | 0 | 1 | 1 |
Scenario: Student starts a discussion @app @3.8.0 @OK
Scenario: Student starts a discussion
When I enter the app When I enter the app
And I log in as "student1" And I log in as "student1"
And I press "Course 1" near "Course overview" in the app And I press "Course 1" near "Course overview" in the app
@ -28,26 +35,11 @@ Feature: Test basic usage in app
And I set the field "Message" to "An awesome message" in the app And I set the field "Message" to "An awesome message" in the app
And I press "Post to forum" in the app And I press "Post to forum" in the app
Then I should see "My happy subject" Then I should see "My happy subject"
And I press "My happy subject" in the app
And I should see "An awesome message"
@app_upto3.6.1 @app_from3.7
Scenario: Student posts a reply Scenario: Student posts a reply
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject" in the app
And I set the field "Message" to "DiscussionMessage" in the app
And I press "Post to forum" in the app
And I press "DiscussionSubject" in the app
And I press "Reply" in the app
And I set the field "Message" to "ReplyMessage" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionMessage"
And I should see "ReplyMessage"
@app_from3.7
Scenario: Student posts a reply
When I enter the app When I enter the app
And I log in as "student1" And I log in as "student1"
And I press "Course 1" near "Course overview" in the app And I press "Course 1" near "Course overview" in the app
@ -63,17 +55,524 @@ Feature: Test basic usage in app
Then I should see "DiscussionMessage" Then I should see "DiscussionMessage"
And I should see "ReplyMessage" And I should see "ReplyMessage"
Scenario: Test that 'open in browser' works for forum @app @3.8.0 @mobile @OK
Scenario: Student stars a discussion (mobile)
When I enter the app When I enter the app
And I change viewport size to "360x640"
And I log in as "student1" And I log in as "student1"
And I press "Course 1" near "Course overview" in the app And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app And I press "Test forum name" in the app
And I press the page menu button in the app And I press "close" in the app
And I press "Open in browser" in the app And I set the field "Subject" to "Auto-test star" in the app
And I switch to the browser tab opened by the app And I set the field "Message" to "Auto-test star message" in the app
And I log in as "student1" And I press "Post to forum" in the app
Then I should see "Test forum name" And I wait "60" seconds
And I should see "Add a new discussion topic" And I press "close" in the app
And I close the browser tab opened by the app And I set the field "Subject" to "Auto-test star" in the app
And I set the field "Message" to "Auto-test no star message" in the app
And I press "Post to forum" in the app
And I press "Auto-test star" near "Last post a minute ago" in the app
Then I should see "Auto-test star message"
And I press the back button in the app And I press the back button in the app
And I press "Display options" near "Last post a minute ago" in the app
And I press "Star this discussion" in the app
And I press "Auto-test star" near "Last post a minute ago" in the app
Then I should see "Auto-test star message"
And I press the back button in the app
And I press "Auto-test star" near "Last post a few seconds ago" in the app
Then I should see "Auto-test no star message"
And I press the back button in the app
And I press "Display options" near "Last post a minute ago" in the app
And I press "Unstar this discussion" in the app
And I press "Auto-test star" near "Last post a few seconds ago" in the app
Then I should see "Auto-test no star message"
And I press the back button in the app
And I press "Auto-test star" near "Last post a minute ago" in the app
Then I should see "Auto-test star message"
@app @3.8.0 @tablet @OK
Scenario: Student stars a discussion (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test star" in the app
And I set the field "Message" to "Auto-test star message" in the app
And I press "Post to forum" in the app
And I wait "60" seconds
And I press "close" in the app
And I set the field "Subject" to "Auto-test star" in the app
And I set the field "Message" to "Auto-test no star message" in the app
And I press "Post to forum" in the app
And I press "Auto-test star" near "Last post a minute ago" in the app
Then I should see "Auto-test star message"
And I press "Display options" near "Last post a minute ago" in the app
And I press "Star this discussion" in the app
And I press "Auto-test star" near "Last post a minute ago" in the app
Then I should see "Auto-test star message"
And I press "Auto-test star" near "Last post a few seconds ago" in the app
Then I should see "Auto-test no star message"
And I press "Display options" near "Last post a minute ago" in the app
And I press "Unstar this discussion" in the app
And I press "Auto-test star" near "Last post a few seconds ago" in the app
Then I should see "Auto-test no star message"
And I press "Auto-test star" near "Last post a minute ago" in the app
Then I should see "Auto-test star message"
@app @3.8.0 @OK
Scenario: Teacher star and pin a discussion
When I enter the app
And I log in as "teacher1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test star" in the app
And I set the field "Message" to "Auto-test star message" in the app
And I press "Post to forum" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test pin" in the app
And I set the field "Message" to "Auto-test pin message" in the app
And I press "Post to forum" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
And I press "Display options" near "Auto-test star" in the app
And I press "Star this discussion" in the app
And I press "Display options" near "Auto-test pin" in the app
And I press "Pin this discussion" in the app
And I should see "Auto-test pin"
And I should see "Auto-test star"
And I should see "Auto-test"
And I press "Display options" near "Auto-test pin" in the app
And I press "Unpin this discussion" in the app
And I press "Display options" near "Auto-test star" in the app
And I press "Unstar this discussion" in the app
Then I should see "Auto-test star"
And I should see "Auto-test pin"
@app_upto3.6.0 @OK
Scenario: Teacher checks pin and star in 3.6
When I enter the app
And I log in as "teacher1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
And I press "Auto-test" in the app
And I press "Information" in the app
Then I should not see "Star this discussion"
And I should not see "Pin this discussion"
@app @3.8.0 @mobile @OK
Scenario: Edit a not sent reply offline (mobile)
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
And I switch offline mode to "true"
And I press "Reply" in the app
And I set the field "Write your reply..." to "not sent reply" in the app
And I press "Post to forum" in the app
And I press "Display options" near "not sent reply" in the app
Then I should see "Edit"
And I press "Edit" in the app
And I set the field "Write your reply..." to "not sent reply edited" in the app
And I press "Post to forum" in the app
Then I should see "Not sent"
And I should see "This Discussion has offline data to be synchronised"
And I switch offline mode to "false"
And I press the back button in the app
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
Then I should not see "Not sent"
And I should not see "This Discussion has offline data to be synchronised"
@app @3.8.0 @tablet @OK
Scenario: Edit a not sent reply offline (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
And I switch offline mode to "true"
And I press "Reply" in the app
And I set the field "Write your reply..." to "not sent reply" in the app
And I press "Post to forum" in the app
And I press "Display options" near "not sent reply" in the app
Then I should see "Edit"
And I press "Edit" in the app
And I set the field "Write your reply..." to "not sent reply edited" in the app
And I press "Post to forum" in the app
Then I should see "Not sent"
And I should see "This Discussion has offline data to be synchronised"
And I switch offline mode to "false"
And I press the back button in the app
And I press "Test forum name" in the app
Then I should not see "Not sent"
And I should not see "This Discussion has offline data to be synchronised"
@app @3.8.0 @OK
Scenario: Edit a not sent new discussion offline
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I switch offline mode to "true"
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
And I press "Auto-test" in the app
And I set the field "Message" to "Auto-test message edited" in the app
And I press "Post to forum" in the app
Then I should see "This Forum has offline data to be synchronised."
And I switch offline mode to "false"
And I press "Auto-test" in the app
And I press "Post to forum" in the app
Then I should not see "This Forum has offline data to be synchronised."
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
And I should see "Auto-test message edited"
@app @3.8.0 @OK
Scenario: Edit a forum post (only online)
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
Then I should see "Auto-test"
And I press the back button in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test forum name" in the app
And I press "Test forum name" in the app
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
And I press "Display options" near "Reply" in the app
Then I should see "Edit"
And I press "Edit" in the app
And I set the field "Write your reply..." to "Auto-test message edited" in the app
And I press "Save changes" in the app
And I switch offline mode to "true"
And I press "Display options" near "Reply" in the app
Then I should see "There was a problem connecting to the site. Please check your connection and try again."
And I press "OK" in the app
And I should not see "Edit"
@app @3.8.0 @OK
Scenario: Delete a forum post (only online)
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
Then I should see "Auto-test"
And I press the back button in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test forum name" in the app
And I press "Test forum name" in the app
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
And I press "Display options" near "Reply" in the app
Then I should see "Delete"
And I press "Delete" in the app
And I press "Cancel" in the app
And I switch offline mode to "true"
And I press "Display options" near "Reply" in the app
Then I should see "There was a problem connecting to the site. Please check your connection and try again."
And I press "OK" in the app
And I should not see "Delete"
And I switch offline mode to "false"
And I press "Display options" near "Reply" in the app
And I press "Delete" in the app
And I press "Delete" in the app
Then I should not see "Auto-test"
@app @3.8.0 @mobile @OK
Scenario: Add/view ratings (mobile)
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
And I press "Auto-test" in the app
And I press "Reply" in the app
And I set the field "Write your reply..." to "test2" in the app
And I press "Post to forum" in the app
When I enter the app
And I log in as "teacher1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Auto-test" in the app
And I press "None" near "Auto-test message" in the app
And I press "1" near "Cancel" in the app
And I switch offline mode to "true"
And I press "None" near "test2" in the app
And I press "0" near "Cancel" in the app
Then I should see "Data stored in the device because it couldn't be sent. It will be sent automatically later."
And I should see "Average of ratings: -"
And I should see "Average of ratings: 1"
And I switch offline mode to "false"
And I press the back button in the app
Then I should see "This Forum has offline data to be synchronised."
And I press "Display options" near "Test forum name" in the app
And I press "Synchronise now" in the app
And I should not see "This Forum has offline data to be synchronised."
And I press "Auto-test" in the app
Then I should see "Average of ratings: 1"
And I should see "Average of ratings: 0"
And I should not see "Average of ratings: -"
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Auto-test" in the app
Then I should see "Average of ratings: 1"
And I should see "Average of ratings: 0"
And I should not see "Average of ratings: -"
@app @3.8.0 @tablet @OK
Scenario: Add/view ratings (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "close" in the app
And I set the field "Subject" to "Auto-test" in the app
And I set the field "Message" to "Auto-test message" in the app
And I press "Post to forum" in the app
And I press "Reply" in the app
And I set the field "Write your reply..." to "test2" in the app
And I press "Post to forum" in the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "None" near "Auto-test message" in the app
And I press "1" near "Cancel" in the app
And I switch offline mode to "true"
And I press "None" near "test2" in the app
And I press "0" near "Cancel" in the app
Then I should see "Data stored in the device because it couldn't be sent. It will be sent automatically later."
And I should see "Average of ratings: -"
And I should see "Average of ratings: 1"
And I switch offline mode to "false"
Then I should see "This Forum has offline data to be synchronised."
And I press "Display options" near "Test forum name" in the app
And I press "Synchronise now" in the app
And I should not see "This Forum has offline data to be synchronised."
Then I should see "Average of ratings: 1"
And I should see "Average of ratings: 0"
And I should not see "Average of ratings: -"
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
Then I should see "Average of ratings: 1"
And I should see "Average of ratings: 0"
And I should not see "Average of ratings: -"
@app @3.8.0 @mobile @OK
Scenario: Student replies a post offline mobile
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject" in the app
And I set the field "Message" to "DiscussionMessage" in the app
And I press "Post to forum" in the app
And I press the back button in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test forum name" in the app
And I press "Test forum name" in the app
And I press "DiscussionSubject" in the app
And I switch offline mode to "true"
And I press "Reply" in the app
And I set the field "Write your reply" to "ReplyMessage" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionMessage"
And I should see "ReplyMessage"
And I should see "Not sent"
And I press the back button in the app
And I switch offline mode to "false"
And I press "DiscussionSubject" in the app
Then I should see "DiscussionMessage"
And I should see "ReplyMessage"
And I should not see "Not sent"
@app @3.8.0 @tablet @OK
Scenario: Student replies a post offline tablet
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject" in the app
And I set the field "Message" to "DiscussionMessage" in the app
And I press "Post to forum" in the app
And I press the back button in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test forum name" in the app
And I press "Test forum name" in the app
And I press "DiscussionSubject" near "Sort by last post creation date in descending order" in the app
And I switch offline mode to "true"
And I press "Reply" in the app
And I set the field "Write your reply" to "ReplyMessage" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionMessage"
And I should see "ReplyMessage"
And I should see "Not sent"
And I press the back button in the app
And I switch offline mode to "false"
And I press "Test forum name" in the app
And I press "DiscussionSubject" near "Sort by last post creation date in descending order" in the app
Then I should see "DiscussionMessage"
And I should see "ReplyMessage"
And I should not see "Not sent"
@app @3.8.0 @OK
Scenario: Student creates a new discussion offline and sync forum
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I switch offline mode to "true"
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject" in the app
And I set the field "Message" to "DiscussionMessage" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionSubject"
And I should see "Not sent"
And I should see "This Forum has offline data to be synchronised."
And I switch offline mode to "false"
And I press the back button in the app
And I press "Test forum name" in the app
And I press "Display options" near "Test forum name" in the app
And I press "Refresh discussions" in the app
And I press "DiscussionSubject" near "Sort by last post creation date in descending order" in the app
Then I should see "DiscussionSubject"
And I should see "DiscussionMessage"
And I should not see "Not sent"
And I should not see "This Forum has offline data to be synchronised."
@app @3.8.0 @OK
Scenario: Student creates a new discussion offline and auto-sync forum
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I switch offline mode to "true"
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject" in the app
And I set the field "Message" to "DiscussionMessage" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionSubject"
And I should see "Not sent"
And I should see "This Forum has offline data to be synchronised."
And I switch offline mode to "false"
And I wait "600" seconds
And I should not see "Not sent"
And I press "DiscussionSubject" near "Sort by last post creation date in descending order" in the app
Then I should see "DiscussionSubject"
And I should see "DiscussionMessage"
And I should not see "Not sent"
And I should not see "This Forum has offline data to be synchronised."
@app @3.8.0 @mobile @OK
Scenario: Prefetch mobile
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject" in the app
And I set the field "Message" to "DiscussionMessage" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionSubject"
And I press the back button in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test forum name" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject 2" in the app
And I set the field "Message" to "DiscussionMessage 2" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionSubject"
And I should see "DiscussionSubject 2"
And I press the back button in the app
And I switch offline mode to "true"
And I press "Test forum name" in the app
And I press "DiscussionSubject 2" in the app
Then I should see "There was a problem connecting to the site. Please check your connection and try again."
And I press "OK" in the app
And I press the back button in the app
And I press "DiscussionSubject" in the app
Then I should see "DiscussionSubject"
And I should see "DiscussionMessage"
And I should not see "There was a problem connecting to the site. Please check your connection and try again."
@app @3.8.0 @tablet @OK
Scenario: Prefetch tablet
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject" in the app
And I set the field "Message" to "DiscussionMessage" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionSubject"
And I press the back button in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test forum name" in the app
And I press "Test forum name" in the app
And I press "Add a new discussion topic" in the app
And I set the field "Subject" to "DiscussionSubject 2" in the app
And I set the field "Message" to "DiscussionMessage 2" in the app
And I press "Post to forum" in the app
Then I should see "DiscussionSubject"
And I should see "DiscussionSubject 2"
And I press the back button in the app
And I switch offline mode to "true"
And I press "refresh" near "Test forum name" in the app
Then I should see "There was a problem connecting to the site. Please check your connection and try again."
And I press "OK" in the app
And I press "Test forum name" in the app
And I press "DiscussionSubject" in the app
Then I should see "DiscussionSubject"
And I should see "DiscussionMessage"
And I press the back button in the app
And I switch offline mode to "false"
And I press "refresh" near "Test forum name" in the app
Then I should not see "There was a problem connecting to the site. Please check your connection and try again."

View File

@ -0,0 +1,458 @@
@mod @mod_glossary @app @javascript
Feature: Test basic usage of glossary in app
In order to participate in the glossaries while using the mobile app
As a student
I need basic glossary functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| teacher2 | Teacher2 | teacher2 | teacher2@example.com |
| student1 | Student | student | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | mainglossary | allowcomments | assessed | scale |
| glossary | Test glossary | glossary description | C1 | gloss1 | 1 | 1 | 1 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode |
| forum | Test forum name | Test forum | C1 | forum | 0 |
@app @3.8.0 @OK
Scenario: View a glossary and its terms
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I press "car" in the app
Then I should see "car"
And I should see "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods."
@app @3.8.0 @mobile @OK
Scenario: Change filters (include search) (mobile)
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I press "Search" in the app
And I set the field "Search query" to "something" in the app
And I press "search" near "No entries were found." in the app
Then I should see "No entries were found."
And I set the field "Search query" to "potato" in the app
And I press "search" near "No entries were found." in the app
And I set the field "Search query" to " " in the app
And I press "Display options" in the app
And I press "Refresh" in the app
And I press "potato" in the app
Then I should see "potato"
And I should see "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae."
@app @3.8.0 @tablet @OK
Scenario: Change filters (include search) (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I press "Search" in the app
And I set the field "Search query" to "something" in the app
And I press "search" near "No entries were found." in the app
Then I should see "No entries were found."
And I set the field "Search query" to "potato" in the app
And I press "search" near "No entries were found." in the app
Then I should see "potato"
And I should see "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae."
@app @3.8.0 @OK
Scenario: Navigate to glossary terms by link (auto-linking)
And the "glossary" filter is "on"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "This entry should be automatically linked" in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "This entry should be automatically linked" in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "This entry should be automatically linked" in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I press the back button in the app
And I press "Test forum name" in the app
And I press "add" in the app
And I set the field "Subject" to "Testing auto-link glossary"
And I set the field "Message" to "Glossary terms auto-linked: potato car mountain" in the app
And I press "Post to forum" in the app
And I press "Testing auto-link glossary" near "Last post a few seconds ago" in the app
And I press "car" in the app
Then the header should be "car" in the app
And I should see "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods."
And I press the back button in the app
And I press "mountain" in the app
Then the header should be "mountain" in the app
And I should see "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak."
@app @3.8.0 @OK
Scenario: See comments
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I press "mountain" in the app
Then I should see "Comments (0)"
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "mountain" in the app
Then I should see "Comments (0)"
And I press "Comments" in the app
And I should see "No comments"
And I press "close" in the app
And I set the field "Add a comment..." to "teacherComment" in the app
And I press "Save comment" in the app
Then I should see "teacherComment"
And I press "close" in the app
And I set the field "Add a comment..." to "teacherComment2" in the app
And I press "Save comment" in the app
Then I should see "teacherComment"
And I should see "teacherComment2"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "mountain" in the app
Then I should see "Comments (2)"
And I press "Comments" in the app
And I should see "teacherComment"
And I should see "teacherComment2"
@app @3.8.0 @OK
Scenario: Prefetch
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I press "Display options" in the app
And I press "Download" in the app
And I press the back button in the app
And I press the back button in the app
And I press "Course 1" near "Recently accessed courses" in the app
And I switch offline mode to "true"
And I press "Test glossary" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I press "mountain" in the app
Then I should see "mountain"
And I should see "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak."
And I should not see "Comments cannot be retrieved"
And I should see "Comments (0)"
@app @3.8.0 @OK
Scenario: Sync
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I switch offline mode to "true"
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I should see "Entries to be synced"
And I should see "This Glossary has offline data to be synchronised."
And I switch offline mode to "false"
And I press "close" in the app
And I set the field "Concept" to "testSync" in the app
And I set the field "Definition" to "testSync" in the app
And I press "Save" in the app
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
And I should see "testSync"
And I should not see "Entries to be synced"
And I should not see "This Glossary has offline data to be synchronised."
@app @3.8.0 @mobile @OK
Scenario: Add/view ratings (mobile)
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "mountain" in the app
Then I should see "Average of ratings: -"
And I press "None" in the app
And I press "1" in the app
Then I should see "Average of ratings: 1"
When I enter the app
And I log in as "teacher2"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "mountain" in the app
And I switch offline mode to "true"
And I press "None" in the app
And I press "0" in the app
Then I should see "Data stored in the device because it couldn't be sent. It will be sent automatically later."
And I should see "Average of ratings: 1"
And I switch offline mode to "false"
And I press the back button in the app
Then I should see "This Glossary has offline data to be synchronised."
And I press "Display options" in the app
And I press "Synchronise now" in the app
And I press "mountain" in the app
Then I should see "Average of ratings: 0.5"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "mountain" in the app
Then the header should be "mountain" in the app
And I should not see "Average of ratings: 0.5"
@app @3.8.0 @tablet @OK
Scenario: Add/view ratings (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "close" in the app
And I set the field "Concept" to "potato" in the app
And I set the field "Definition" to "The potato is a root vegetable native to the Americas, a starchy tuber of the plant Solanum tuberosum, and the plant itself, a perennial in the family Solanaceae." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "car" in the app
And I set the field "Definition" to "A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of cars say that they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods." in the app
And I press "Save" in the app
And I press "close" in the app
And I set the field "Concept" to "mountain" in the app
And I set the field "Definition" to "A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak." in the app
And I press "Save" in the app
Then the header should be "Test glossary" in the app
And I should see "car"
And I should see "mountain"
And I should see "potato"
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "mountain" in the app
Then I should see "Average of ratings: -"
And I press "None" in the app
And I press "1" in the app
Then I should see "Average of ratings: 1"
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher2"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "mountain" in the app
And I switch offline mode to "true"
And I press "None" in the app
And I press "0" in the app
Then I should see "Data stored in the device because it couldn't be sent. It will be sent automatically later."
And I should see "Average of ratings: 1"
And I switch offline mode to "false"
Then I should see "This Glossary has offline data to be synchronised."
And I press "Display options" in the app
And I press "Synchronise now" in the app
Then I should see "Average of ratings: 0.5"
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
Then the header should be "Course 1" in the app
And I press "Test glossary" in the app
And I press "mountain" in the app
Then I should not see "Average of ratings: 0.5"

View File

@ -0,0 +1,108 @@
@mod @mod_login @app @javascript
Feature: Test basic usage of login in app
I need basic login functionality to work
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist:
| username | firstname | lastname |
| student1 | david | student |
| student2 | pau | student2 |
| teacher1 | juan | teacher |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| teacher1 | C1 | editingteacher |
@app @3.8.0 @OK
Scenario: Add a non existing site
When I enter the app
And I log in as "student1"
And I press "menu" in the app
And I press "Change site" in the app
And I press "add" in the app
And I set the field "Site address" to "Wrong Site Address" in the app
And I press "Connect!" in the app
Then I should see "Error"
And I should see "Double check you've entered the address correctly and try again."
@app @3.8.0 @OK
Scenario: Delete a site
When I enter the app
And I log in as "student1"
And I press "menu" in the app
And I press "Change site" in the app
Then I should see "Acceptance test site"
And I press "Delete" in the app
And I press "trash" in the app
And I press "Delete" in the app
Then I should not see "Acceptance test site"
And I should see "Connect to Moodle"
@app @3.8.0 @mobile @OK
Scenario: Require minium version of the app for a site and site name in displayed when adding a new site (mobile)
When I enter the app
Then I should see "Acceptance test site"
And I log in as "teacher1"
And I press "menu" in the app
And I press "Website" in the app
And I switch to the browser tab opened by the app
And I follow "Log in"
And I log in as "admin"
And I press "Side panel"
And I follow "Site administration"
And I follow "Mobile authentication"
And I set the field "Minimum app version required" to "3.8.1"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I log in as "teacher1"
And I press "menu" in the app
And I press "Website" in the app
And I switch to the browser tab opened by the app
And I follow "Log in"
And I log in as "admin"
And I press "Side panel"
And I follow "Site administration"
And I follow "Mobile authentication"
And I set the field "Minimum app version required" to "3.8.2"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
Then I should see "App update required"
@app @3.8.0 @tablet @OK
Scenario: Require minium version of the app for a site and site name in displayed when adding a new site (tablet)
When I enter the app
And I change viewport size to "1280x1080"
Then I should see "Acceptance test site"
And I log in as "teacher1"
And I press "menu" in the app
And I press "Website" in the app
And I switch to the browser tab opened by the app
And I follow "Log in"
And I log in as "admin"
And I follow "Site administration"
And I follow "Mobile authentication"
And I set the field "Minimum app version required" to "3.8.1"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
And I press "menu" in the app
And I press "Website" in the app
And I switch to the browser tab opened by the app
And I follow "Log in"
And I log in as "admin"
And I follow "Site administration"
And I follow "Mobile authentication"
And I set the field "Minimum app version required" to "3.8.2"
And I press "Save changes"
And I close the browser tab opened by the app
When I enter the app
And I change viewport size to "1280x1080"
Then I should see "App update required"

View File

@ -0,0 +1,732 @@
@mod @mod_messages @app @javascript
Feature: Test basic usage of messages in app
In order to participate with messages while using the mobile app
As a student
I need basic message functionality to work
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | teacher | teacher1@example.com |
| student1 | Student1 | student1 | student1@example.com |
| student2 | Student2 | student2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
@app @3.8.0 @mobile @OK
Scenario: View recent conversations and contacts (mobile)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "heeey student" in the app
And I press "Send" in the app
And I press "Conversation actions menu" in the app
And I press "Add to contacts" in the app
And I press "Add" in the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
And I press "Requests" in the app
And I press "Teacher teacher" in the app
And I press "Accept and add to contacts" in the app
And I press the back button in the app
And I press "Contacts" near "Requests" in the app
Then the header should be "Contacts" in the app
And I should see "Teacher teacher"
And I press the back button in the app
And I press "Teacher teacher" in the app
Then the header should be "Teacher teacher" in the app
And I should see "heeey student"
@app @3.8.0 @tablet @OK
Scenario: View recent conversations and contacts (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "heeey student" in the app
And I press "Send" in the app
And I press "Display options" in the app
And I press "Add to contacts" in the app
And I press "Add" in the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
And I press "Requests" in the app
And I press "Teacher teacher" in the app
And I press "Accept and add to contacts" in the app
And I press "Contacts" near "Requests" in the app
Then the header should be "Contacts" in the app
And I should see "Teacher teacher"
And I press the back button in the app
And I press "Teacher teacher" in the app
And I should see "heeey student"
@app @3.8.0 @OK
Scenario: Search users
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "addon.messages.search" in the app
And I set the field "Search" to "student2" in the app
And I press "search" in the app
Then I should see "Student2 student2"
And I set the field "Search" to "Teacher" in the app
And I press "search" in the app
Then I should see "Teacher teacher"
@app @3.8.0 @OK
Scenario: Send/receive messages in existing conversations
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "heeey student" in the app
And I press "Send" in the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "teacher" in the app
And I press "search" in the app
And I press "Teacher teacher" in the app
Then I should see "heeey student"
And I set the field "New message" to "hi" in the app
And I press "Send" in the app
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
Then I should see "heeey student"
And I should see "hi"
And I set the field "New message" to "byee" in the app
And I press "Send" in the app
Then I should see "heeey student"
And I should see "hi"
And I should see "byee"
@app @3.8.0 @mobile @OK
Scenario: User profile, send message, add/remove contact (mobile)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "heeey student" in the app
And I press "Send" in the app
And I press "Conversation actions menu" in the app
And I press "Add to contacts" in the app
And I press "Add" in the app
Then I should see "Contact request sent"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
And I press "Requests" in the app
And I press "Teacher teacher" in the app
Then I should see "Teacher teacher would like to contact you"
And I press "Accept and add to contacts" in the app
And I should not see "Teacher teacher would like to contact you"
And I press "Teacher teacher" in the app
And I press "Message" in the app
And I set the field "New message" to "hi" in the app
And I press "Send" in the app
Then I should see "heeey student"
And I should see "hi"
And I press the back button in the app
And I press "Remove from contacts" in the app
And I press "Remove" in the app
Then I should see "Add to contacts"
And I press the back button in the app
And I press "Conversation actions menu" in the app
Then I should see "Add to contacts"
And I press "Delete conversation" in the app
And I press "Delete" in the app
And I should not see "heeey student"
And I should not see "hi"
@app @3.8.0 @tablet @OK
Scenario: User profile, send message, add/remove contact (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "heeey student" in the app
And I press "Send" in the app
And I press "Display options" in the app
And I press "Add to contacts" in the app
And I press "Add" in the app
Then I should see "Contact request sent"
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
And I press "Requests" in the app
And I press "Teacher teacher" in the app
Then I should see "Teacher teacher would like to contact you"
And I press "Accept and add to contacts" in the app
And I should not see "Teacher teacher would like to contact you"
And I set the field "New message" to "hi" in the app
And I press "Send" in the app
Then I should see "heeey student"
And I should see "hi"
And I press "Display options" in the app
And I press "Remove from contacts" in the app
And I press "Remove" in the app
And I press "Display options" in the app
Then I should see "Add to contacts"
And I press "Delete conversation" in the app
And I press "Delete" in the app
And I should not see "heeey student"
And I should not see "hi"
@app @3.8.0 @mobile @OK
Scenario: Send message offline (mobile)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I switch offline mode to "true"
And I set the field "New message" to "heeey student" in the app
And I press "Send" in the app
And I set the field "New message" to "byee" in the app
And I press "Send" in the app
And I switch offline mode to "false"
And I press the back button in the app
And I press "Student1 student1" in the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Teacher teacher" in the app
Then I should see "heeey student"
And I should see "byee"
@app @3.8.0 @tablet @OK
Scenario: Send message offline (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I switch offline mode to "true"
And I set the field "New message" to "heeey student" in the app
And I press "Send" in the app
And I set the field "New message" to "byee" in the app
And I press "Send" in the app
And I switch offline mode to "false"
And I press "Student1 student1" in the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Teacher teacher" in the app
Then I should see "heeey student"
And I should see "byee"
@app @3.8.0 @OK
Scenario: Auto-sync messages
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Contacts" in the app
Then I should see "No contacts"
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I switch offline mode to "true"
And I set the field "New message" to "heeey student" in the app
And I press "Send" in the app
And I set the field "New message" to "byee" in the app
And I press "Send" in the app
And I switch offline mode to "false"
And I wait "600" seconds
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "Teacher teacher" in the app
Then I should see "heeey student"
And I should see "byee"
@app @3.8.0 @OK
Scenario: Search for messages
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "test message" in the app
And I press "Send" in the app
And I set the field "New message" to "search this message" in the app
And I press "Send" in the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "addon.messages.search" in the app
And I set the field "Search" to "search this message" in the app
And I press "search" in the app
Then I should see "Messages"
And I should see "search this message"
And I press "search this message" near "Teacher teacher" in the app
Then I should see "test message"
And I should see "search this message"
@app @3.8.0 @mobile @OK
Scenario: Star/Unstar (mobile)
When I enter the app
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "star message" in the app
And I press "Send" in the app
When I enter the app
And I log in as "student2"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "test message student2" in the app
And I press "Send" in the app
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
Then I should see "Private (2)"
And I should see "Starred (1)"
And I press "star message" in the app
And I press "Conversation actions menu" in the app
And I press "Star conversation" in the app
And I press the back button in the app
Then I should see "Private (1)"
And I should see "Starred (2)"
And I press "Starred (2)" in the app
Then I should see "Teacher teacher"
And I should see "Student1 student1"
@app @3.8.0 @tablet @OK
Scenario: Star/Unstar (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "teacher1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "star message" in the app
And I press "Send" in the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student2"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
And I press "addon.messages.search" in the app
And I set the field "Search" to "student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "test message student2" in the app
And I press "Send" in the app
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
Then I should see "Private (2)"
And I should see "Starred (1)"
And I press "star message" in the app
And I press "Display options" in the app
And I press "Star conversation" in the app
Then I should see "Private (1)"
And I should see "Starred (2)"
And I press "Starred (2)" in the app
Then I should see "Teacher teacher"
And I should see "Student1 student1"
@app @3.8.0 @mobile @OK
Scenario: User blocking feature (mobile)
When I enter the app
And I log in as "student2"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
And I press "Student1 student1" in the app
Then I should see "Block user"
And I press "Block user" in the app
And I should see "Are you sure you want to block Student1 student1?"
And I press "Cancel" in the app
And I should see "Block user"
And I press "Block user" in the app
And I press "Block user" near "Cancel" in the app
Then I should not see "Block user"
And I should see "Unblock user"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
And I press "Student2 student2" in the app
And I press "Message" in the app
Then I should see "You are unable to message this user"
When I enter the app
And I log in as "student2"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
And I press "Student1 student1" in the app
Then I should see "Unblock user"
And I should not see "Block user"
And I press "Unblock user" in the app
And I press "Cancel" in the app
Then I should see "Unblock user"
And I should not see "Block user"
And I press "Unblock user" in the app
And I press "Unblock user" near "Cancel" in the app
Then I should see "Block user"
And I should not see "Unblock user"
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
And I press "Student2 student2" in the app
And I press "Message" in the app
And I set the field "New message" to "test message" in the app
And I press "Send" in the app
Then I should see "test message"
And I should not see "You are unable to message this user"
@app @3.8.0 @tablet @OK
Scenario: User blocking feature (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student2"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
Then I should see "Block user"
And I press "Block user" in the app
And I should see "Are you sure you want to block Student1 student1?"
And I press "Cancel" in the app
And I should see "Block user"
And I press "Block user" in the app
And I press "Block user" near "Cancel" in the app
Then I should not see "Block user"
And I should see "Unblock user"
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
And I press "Student2 student2" in the app
And I press "Message" in the app
Then I should see "You are unable to message this user"
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student2"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
Then I should see "Unblock user"
And I should not see "Block user"
And I press "Unblock user" in the app
And I press "Cancel" in the app
Then I should see "Unblock user"
And I should not see "Block user"
And I press "Unblock user" in the app
And I press "Unblock user" near "Cancel" in the app
Then I should see "Block user"
And I should not see "Unblock user"
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
And I press "Student2 student2" in the app
And I press "Message" in the app
And I set the field "New message" to "test message" in the app
And I press "Send" in the app
Then I should see "test message"
And I should not see "You are unable to message this user"
@app @3.8.0 @mobile @OK
Scenario: Mute Unmute conversations (mobile)
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
And I press "Student2 student2" in the app
And I press "Message" in the app
And I set the field "New message" to "test message" in the app
And I press "Send" in the app
And I press "Conversation actions menu" in the app
And I press "Mute" in the app
And I press "Muted conversation" in the app
And I press "Conversation actions menu" in the app
Then I should see "Unmute"
And I should not see "Mute"
And I press "Unmute" in the app
And I press "Conversation actions menu" in the app
Then I should not see "Unmute"
And I should see "Mute"
And I press "Mute" in the app
And I press "Messages" in the app
And I press "Private (1)" in the app
And I press "Student2 student2" in the app
And I press "Conversation actions menu" in the app
Then I should see "Unmute"
And I should not see "Mute"
@app @3.8.0 @tablet @OK
Scenario: Mute Unmute conversations (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "Participants" in the app
And I press "Student2 student2" in the app
And I press "Message" in the app
And I set the field "New message" to "test message" in the app
And I press "Send" in the app
And I press "Conversation actions menu" in the app
And I press "Mute" in the app
And I press "Muted conversation" in the app
And I press "Conversation actions menu" in the app
Then I should see "Unmute"
And I should not see "Mute"
And I press "Unmute" in the app
And I press "Conversation actions menu" in the app
Then I should not see "Unmute"
And I should see "Mute"
And I press "Mute" in the app
And I press "Messages" in the app
And I press "Private (1)" in the app
And I press "Student2 student2" in the app
And I press "Display options" in the app
Then I should see "Unmute"
And I should not see "Mute"
@app @3.8.0 @mobile @OK
Scenario: Self conversations (mobile)
When I enter the app
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
Then I should see "Starred (1)"
And I press "Student1 student1" in the app
And I set the field "New message" to "self conversation" in the app
And I press "Send" in the app
And I switch offline mode to "true"
And I set the field "New message" to "self conversation offline" in the app
And I press "Send" in the app
And I switch offline mode to "false"
And I press the back button in the app
And I press "Student1 student1" in the app
And I press "Conversation actions menu" in the app
Then I should see "Unstar conversation"
And I should see "Show delete messages"
And I should see "Delete conversation"
And I press "Unstar conversation" in the app
And I press "Conversation actions menu" in the app
Then I should see "Star conversation"
And I should see "Show delete messages"
And I should see "Delete conversation"
And I press "Show delete messages" in the app
And I should see "self conversation"
And I should see "self conversation offline"
And I press "Delete message" near "self conversation offline" in the app
And I press "OK" in the app
Then I should see "self conversation"
And I should not see "self conversation offline"
And I press "Conversation actions menu" in the app
And I press "Delete conversation" in the app
And I press "Delete" in the app
Then I should not see "self conversation"
And I should not see "self conversation offline"
And I press the back button in the app
And I press "addon.messages.search" in the app
And I set the field "Search" to "Student1 student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "auto search test" in the app
And I press "Send" in the app
And I press the back button in the app
And I press the back button in the app
And I press "Private" in the app
And I press "Student1 student1" in the app
Then I should see "auto search test"
@app @3.8.0 @tablet @OK
Scenario: Self conversations (tablet)
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
Then the header should be "Acceptance test site" in the app
And I should see "Course 1"
And I press "Messages" in the app
Then I should see "Starred (1)"
And I press "Student1 student1" in the app
And I set the field "New message" to "self conversation" in the app
And I press "Send" in the app
And I switch offline mode to "true"
And I set the field "New message" to "self conversation offline" in the app
And I press "Send" in the app
And I switch offline mode to "false"
And I press "Student1 student1" in the app
And I press "Display options" in the app
Then I should see "Unstar conversation"
And I should see "Show delete messages"
And I should see "Delete conversation"
And I press "Unstar conversation" in the app
And I press "Display options" in the app
Then I should see "Star conversation"
And I should see "Show delete messages"
And I should see "Delete conversation"
And I press "Show delete messages" in the app
And I should see "self conversation"
And I should see "self conversation offline"
And I press "Delete message" near "self conversation offline" in the app
And I press "OK" in the app
Then I should see "self conversation"
And I should not see "self conversation offline"
And I press "Display options" in the app
And I press "Delete conversation" in the app
And I press "Delete" in the app
Then I should not see "self conversation"
And I should not see "self conversation offline"
And I press "addon.messages.search" in the app
And I set the field "Search" to "Student1 student1" in the app
And I press "search" in the app
And I press "Student1 student1" in the app
And I set the field "New message" to "auto search test" in the app
And I press "Send" in the app
And I press the back button in the app
And I press "Private" in the app
And I press "Student1 student1" in the app
Then I should see "auto search test"

View File

@ -0,0 +1,163 @@
@mod @mod_quiz @app @javascript
Feature: Attempt a quiz in app
As a student
In order to demonstrate what I know
I need to be able to attempt quizzes
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist:
| username |
| student1 |
| teacher1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "question categories" exist:
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | Text of the first question |
| Test questions | truefalse | TF2 | Text of the second question |
And quiz "Quiz 1" contains the following questions:
| question | page |
| TF1 | 1 |
| TF2 | 2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| quiz | Quiz 2 | Quiz 2 description | C1 | quiz2 |
And the following "question categories" exist:
| contextlevel | reference | name |
| Course | C1 | Test questions 2|
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | multichoice | TF3 | Text of the first question |
| Test questions | shortanswer | TF4 | Text of the second question |
| Test questions | numerical | TF5 | Text of the third question |
| Test questions | essay | TF6 | Text of the fourth question |
| Test questions | ddwtos | TF7 | Text of the fifth question |
| Test questions | truefalse | TF8 | Text of the sixth question |
| Test questions | match | TF9 | Text of the seventh question |
And quiz "Quiz 2" contains the following questions:
| question | page |
| TF3 | 1 |
| TF4 | 2 |
| TF5 | 3 |
| TF6 | 4 |
| TF7 | 5 |
| TF8 | 6 |
| TF9 | 7 |
@app @3.8.0 @OK
Scenario: View a quiz entry page (attempts, status, etc.)
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Quiz 1" in the app
And I press "Attempt quiz now" in the app
Then I should see "Text of the first question"
And I should not see "Text of the second question"
And I press "Next" near "Question 1" in the app
And I should see "Text of the second question"
And I should not see "Text of the first question"
And I press "Previous" near "Question 2" in the app
And I should not see "Text of the second question"
And I should see "Text of the first question"
And I press "Next" near "Quiz 1" in the app
And I should see "Text of the second question"
And I should not see "Text of the first question"
And I press "Previous" near "Quiz 1" in the app
And I should not see "Text of the second question"
And I should see "Text of the first question"
And I press "Next" near "Question 1" in the app
And I press "Next" near "Quiz 1" in the app
And I should see "Summary of attempt"
And I press "Return to attempt" in the app
And I should see "Text of the second question"
And I should not see "Text of the first question"
And I press "Next" in the app
And I press "Submit all and finish" in the app
Then I should see "Once you submit"
And I press "Cancel" near "Once you submit" in the app
And I should see "Summary of attempt"
And I press "Submit all and finish" in the app
And I press "OK" near "Once you submit" in the app
Then I should see "Review of attempt 1"
And I should see "Started on"
And I should see "State"
And I should see "Completed on"
And I should see "Time taken"
And I should see "Marks"
And I should see "Grade"
And I should see "Question 1"
And I should see "Question 2"
@app @3.8.0 @OK
Scenario: Attempt a quiz (all question types)
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Quiz 2" in the app
And I press "Attempt quiz now" in the app
And I press "Four" in the app
And I press "Three" in the app
And I press "Next" near "Question 1" in the app
And I set the field "Answer" to "testing" in the app
And I press "Next" near "Question 2" in the app
And I set the field "Answer" to "5" in the app
And I press "Next" near "Question 3" in the app
And I set the field "Answer" to "Testing an essay" in the app
And I press "Next" near "Question 4" in the app
And I press "lazy" in the app
And I press "Next" near "Question 5" in the app
And I press "True" in the app
And I press "Next" near "Question 6" in the app
And I press "Choose..." near "frog" in the app
And I press "amphibian" in the app
And I press "Choose..." near "newt" in the app
And I press "insect" in the app
And I press "Choose..." near "cat" in the app
And I press "mammal" in the app
And I press "Next" near "Question 7" in the app
And I press "Submit all and finish" in the app
And I press "OK" in the app
Then I should see "Review of attempt 1"
And I should see "Finished"
And I should see "Not yet graded"
@app @3.8.0 @OK
Scenario: Submit a quiz and review a quiz attempt
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Quiz 1" in the app
And I press "Attempt quiz now" in the app
And I press "True" in the app
And I press "Next" near "Question 1" in the app
And I press "False" in the app
And I press "Next" near "Question 2" in the app
And I press "Submit all and finish" in the app
And I press "OK" in the app
Then I should see "Review of attempt 1"
When I enter the app
And I log in as "teacher1"
And I press "Course 1" near "Course overview" in the app
And I press "Quiz 1" in the app
And I press "Display options" in the app
And I press "Open in browser" in the app
And I switch to the browser tab opened by the app
And I log in as "teacher1"
And I follow "Attempts: 1"
And I follow "Review attempt"
Then I should see "Finished"
And I should see "1.00/2.00"
And I close the browser tab opened by the app

View File

@ -0,0 +1,595 @@
@mod @mod_survey @app @javascript
Feature: Test basic usage of survey activity in app
In order to participate in surveys while using the mobile app
As a student
I need basic survey functionality to work
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist:
| username |
| student1 |
| teacher1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode |
| survey | Test survey name | Test survey | C1 | survey | 0 |
@app @3.8.0 @mobile @OK
Scenario: Student answers a survey ATTLS and see results mobile
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey name" in the app
And I press "Choose" near "1. In evaluating what someone says, I focus on the quality of their argument, not on the person who's presenting it." in the app
And I press "Strongly agree" in the app
And I press "Choose" near "2. I like playing devil's advocate - arguing the opposite of what someone is saying." in the app
And I press "Strongly disagree" in the app
And I press "Choose" near "3. I like to understand where other people are 'coming from', what experiences have led them to feel the way they do." in the app
And I press "Somewhat agree" in the app
And I press "Choose" near "4. The most important part of my education has been learning to understand people who are very different to me." in the app
And I press "Somewhat disagree" in the app
And I press "Choose" near "5. I feel that the best way for me to achieve my own identity is to interact with a variety of other people." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "6. I enjoy hearing the opinions of people who come from backgrounds different to mine - it helps me to understand how the same things can be seen in such different ways." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "7. I find that I can strengthen my own position through arguing with someone who disagrees with me." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "8. I am always interested in knowing why people say and believe the things they do." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "9. I often find myself arguing with the authors of books that I read, trying to logically figure out why they're wrong." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "10. It's important for me to remain as objective as possible when I analyze something." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "11. I try to think with people instead of against them." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "12. I have certain criteria I use in evaluating arguments." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "13. I'm more likely to try to understand someone else's opinion than to try to evaluate it." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "14. I try to point out weaknesses in other people's thinking to help them clarify their arguments." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "15. I tend to put myself in other people's shoes when discussing controversial issues, to see why they think the way they do." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "16. One could call my way of analysing things 'putting them on trial' because I am careful to consider all the evidence." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "17. I value the use of logic and reason over the incorporation of my own concerns when solving problems." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "18. I can obtain insight into opinions that differ from mine through empathy." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "19. When I encounter people whose opinions seem alien to me, I make a deliberate effort to 'extend' myself into that person, to try to see how they could have those opinions." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Choose" near "20. I spend time figuring out what's 'wrong' with things. For example, I'll look for something in a literary interpretation that isn't argued well enough." in the app
And I press "Somewhat agree" near "Neither agree nor disagree" in the app
And I press "Submit" in the app
And I press "OK" in the app
And I press "open" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "You've completed this survey. The graph below shows a summary of your results compared to the class averages."
And I should see "1 people have completed this survey so far"
@app @3.8.0 @tablet @OK
Scenario: Student answers a survey ATTLS and see results tablet
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey name" in the app
And I press "1. In evaluating what someone says, I focus on the quality of their argument, not on the person who's presenting it." in the app
And I press "2. I like playing devil's advocate - arguing the opposite of what someone is saying." in the app
And I press "3. I like to understand where other people are 'coming from', what experiences have led them to feel the way they do." in the app
And I press "4. The most important part of my education has been learning to understand people who are very different to me." in the app
And I press "5. I feel that the best way for me to achieve my own identity is to interact with a variety of other people." in the app
And I press "6. I enjoy hearing the opinions of people who come from backgrounds different to mine - it helps me to understand how the same things can be seen in such different ways." in the app
And I press "7. I find that I can strengthen my own position through arguing with someone who disagrees with me." in the app
And I press "8. I am always interested in knowing why people say and believe the things they do." in the app
And I press "9. I often find myself arguing with the authors of books that I read, trying to logically figure out why they're wrong." in the app
And I press "10. It's important for me to remain as objective as possible when I analyze something." in the app
And I press "11. I try to think with people instead of against them." in the app
And I press "12. I have certain criteria I use in evaluating arguments." in the app
And I press "13. I'm more likely to try to understand someone else's opinion than to try to evaluate it." in the app
And I press "14. I try to point out weaknesses in other people's thinking to help them clarify their arguments." in the app
And I press "15. I tend to put myself in other people's shoes when discussing controversial issues, to see why they think the way they do." in the app
And I press "16. One could call my way of analysing things 'putting them on trial' because I am careful to consider all the evidence." in the app
And I press "17. I value the use of logic and reason over the incorporation of my own concerns when solving problems." in the app
And I press "18. I can obtain insight into opinions that differ from mine through empathy." in the app
And I press "19. When I encounter people whose opinions seem alien to me, I make a deliberate effort to 'extend' myself into that person, to try to see how they could have those opinions." in the app
And I press "20. I spend time figuring out what's 'wrong' with things. For example, I'll look for something in a literary interpretation that isn't argued well enough." in the app
And I press "Submit" in the app
And I press "OK" in the app
And I press "open" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "You've completed this survey. The graph below shows a summary of your results compared to the class averages."
And I should see "1 people have completed this survey so far"
@app @3.8.0 @OK
Scenario: Student answers a survey of critical incidents and see results
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey critical incidents | Test survey1 | 5 | C1 | survey1 | 0 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey critical incidents" in the app
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "Results"
And I press "Results" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "Test survey critical incidents"
@app @3.8.0 @mobile @OK
Scenario: Student answers a survey of Colles (actual) and see results mobile
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey Colles (actual) | Test survey1 | 1 | C1 | survey1 | 0 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey Colles (actual)" in the app
And I press "Choose" near "1. my learning focuses on issues that interest me." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "2. what I learn is important for my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "3. I learn how to improve my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "4. what I learn connects well with my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "5. I think critically about how I learn." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "6. I think critically about my own ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "7. I think critically about other students' ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "8. I think critically about ideas in the readings." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "9. I explain my ideas to other students." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "10. I ask other students to explain their ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "11. other students ask me to explain my ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "12. other students respond to my ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "13. the tutor stimulates my thinking." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "14. the tutor encourages me to participate." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "15. the tutor models good discourse." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "16. the tutor models critical self-reflection." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "17. other students encourage my participation." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "18. other students praise my contribution." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "19. other students value my contribution." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "20. other students empathise with my struggle to learn." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "21. I make good sense of other students' messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "22. other students make good sense of my messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "23. I make good sense of the tutor's messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "24. the tutor makes good sense of my messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "25. How long did this survey take you to complete?" in the app
And I press "under 1 min" in the app
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "You have completed this survey"
And I should see "Results"
And I press "Results" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "You've completed this survey. The graph below shows a summary of your results compared to the class averages."
And I should see "1 people have completed this survey so far"
@app @3.8.0 @tablet @OK
Scenario: Student answers a survey of Colles (actual) and see results tablet
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey Colles (actual) | Test survey1 | 1 | C1 | survey1 | 0 |
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey Colles (actual)" in the app
And I press "1. my learning focuses on issues that interest me." in the app
And I press "2. what I learn is important for my professional practice." in the app
And I press "3. I learn how to improve my professional practice." in the app
And I press "4. what I learn connects well with my professional practice." in the app
And I press "5. I think critically about how I learn." in the app
And I press "6. I think critically about my own ideas." in the app
And I press "7. I think critically about other students' ideas." in the app
And I press "8. I think critically about ideas in the readings." in the app
And I press "9. I explain my ideas to other students." in the app
And I press "10. I ask other students to explain their ideas." in the app
And I press "11. other students ask me to explain my ideas." in the app
And I press "12. other students respond to my ideas." in the app
And I press "13. the tutor stimulates my thinking." in the app
And I press "14. the tutor encourages me to participate." in the app
And I press "15. the tutor models good discourse." in the app
And I press "16. the tutor models critical self-reflection." in the app
And I press "17. other students encourage my participation." in the app
And I press "18. other students praise my contribution." in the app
And I press "19. other students value my contribution." in the app
And I press "20. other students empathise with my struggle to learn." in the app
And I press "21. I make good sense of other students' messages." in the app
And I press "22. other students make good sense of my messages." in the app
And I press "23. I make good sense of the tutor's messages." in the app
And I press "24. the tutor makes good sense of my messages." in the app
And I press "25. How long did this survey take you to complete?" in the app
And I press "under 1 min" in the app
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "You have completed this survey"
And I should see "Results"
And I press "Results" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "You've completed this survey. The graph below shows a summary of your results compared to the class averages."
And I should see "1 people have completed this survey so far"
@app @3.8.0 @mobile @OK
Scenario: Student answers a survey of Colles (preferred) and see results mobile
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey Colles (preferred) | Test survey1 | 2 | C1 | survey1 | 0 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey Colles (preferred)" in the app
And I press "Choose" near "1. my learning focuses on issues that interest me." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "2. what I learn is important for my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "3. I learn how to improve my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "4. what I learn connects well with my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "5. I think critically about how I learn." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "6. I think critically about my own ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "7. I think critically about other students' ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "8. I think critically about ideas in the readings." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "9. I explain my ideas to other students." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "10. I ask other students to explain their ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "11. other students ask me to explain my ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "12. other students respond to my ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "13. the tutor stimulates my thinking." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "14. the tutor encourages me to participate." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "15. the tutor models good discourse." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "16. the tutor models critical self-reflection." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "17. other students encourage my participation." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "18. other students praise my contribution." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "19. other students value my contribution." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "20. other students empathise with my struggle to learn." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "21. I make good sense of other students' messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "22. other students make good sense of my messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "23. I make good sense of the tutor's messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "24. the tutor makes good sense of my messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "25. How long did this survey take you to complete?" in the app
And I press "under 1 min" in the app
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "You have completed this survey"
And I should see "Results"
And I press "Results" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "You've completed this survey. The graph below shows a summary of your results compared to the class averages."
And I should see "1 people have completed this survey so far"
@app @3.8.0 @tablet @OK
Scenario: Student answers a survey of Colles (preferred) and see results tablet
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey Colles (preferred) | Test survey1 | 2 | C1 | survey1 | 0 |
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey Colles (preferred)" in the app
And I press "1. my learning focuses on issues that interest me." in the app
And I press "2. what I learn is important for my professional practice." in the app
And I press "3. I learn how to improve my professional practice." in the app
And I press "4. what I learn connects well with my professional practice." in the app
And I press "5. I think critically about how I learn." in the app
And I press "6. I think critically about my own ideas." in the app
And I press "7. I think critically about other students' ideas." in the app
And I press "8. I think critically about ideas in the readings." in the app
And I press "9. I explain my ideas to other students." in the app
And I press "10. I ask other students to explain their ideas." in the app
And I press "11. other students ask me to explain my ideas." in the app
And I press "12. other students respond to my ideas." in the app
And I press "13. the tutor stimulates my thinking." in the app
And I press "14. the tutor encourages me to participate." in the app
And I press "15. the tutor models good discourse." in the app
And I press "16. the tutor models critical self-reflection." in the app
And I press "17. other students encourage my participation." in the app
And I press "18. other students praise my contribution." in the app
And I press "19. other students value my contribution." in the app
And I press "20. other students empathise with my struggle to learn." in the app
And I press "21. I make good sense of other students' messages." in the app
And I press "22. other students make good sense of my messages." in the app
And I press "23. I make good sense of the tutor's messages." in the app
And I press "24. the tutor makes good sense of my messages." in the app
And I press "25. How long did this survey take you to complete?" in the app
And I press "under 1 min" in the app
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "You have completed this survey"
And I should see "Results"
And I press "Results" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "You've completed this survey. The graph below shows a summary of your results compared to the class averages."
And I should see "1 people have completed this survey so far"
@app @3.8.0 @mobile @OK
Scenario: Student answers a survey of Colles (preferred and actual) and see results mobile
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey Colles (preferred and actual) | Test survey1 | 3 | C1 | survey1 | 0 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey Colles (preferred and actual)" in the app
And I press "Choose" near "1. I prefer that my learning focuses on issues that interest me." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "2. I found that my learning focuses on issues that interest me." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "3. I prefer that what I learn is important for my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "4. I found that what I learn is important for my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "5. I prefer that I learn how to improve my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "6. I found that I learn how to improve my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "7. I prefer that what I learn connects well with my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "8. I found that what I learn connects well with my professional practice." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "9. I prefer that I think critically about how I learn." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "10. I found that I think critically about how I learn." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "11. I prefer that I think critically about my own ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "12. I found that I think critically about my own ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "13. I prefer that I think critically about other students' ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "14. I found that I think critically about other students' ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "15. I prefer that I think critically about ideas in the readings." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "16. I found that I think critically about ideas in the readings." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "17. I prefer that I explain my ideas to other students." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "18. I found that I explain my ideas to other students." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "19. I prefer that I ask other students to explain their ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "20. I found that I ask other students to explain their ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "21. I prefer that other students ask me to explain my ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "22. I found that other students ask me to explain my ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "23. I prefer that other students respond to my ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "24. I found that other students respond to my ideas." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "25. I prefer that the tutor stimulates my thinking." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "26. I found that the tutor stimulates my thinking." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "27. I prefer that the tutor encourages me to participate." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "28. I found that the tutor encourages me to participate." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "29. I prefer that the tutor models good discourse." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "30. I found that the tutor models good discourse." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "31. I prefer that the tutor models critical self-reflection." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "32. I found that the tutor models critical self-reflection." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "33. I prefer that other students encourage my participation." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "34. I found that other students encourage my participation." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "35. I prefer that other students praise my contribution." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "36. I found that other students praise my contribution." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "37. I prefer that other students value my contribution." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "38. I found that other students value my contribution." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "39. I prefer that other students empathise with my struggle to learn." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "40. I found that other students empathise with my struggle to learn." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "41. I prefer that I make good sense of other students' messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "42. I found that I make good sense of other students' messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "43. I prefer that other students make good sense of my messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "44. I found that other students make good sense of my messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "45. I prefer that I make good sense of the tutor's messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "46. I found that I make good sense of the tutor's messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "47. I prefer that the tutor makes good sense of my messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "48. I found that the tutor makes good sense of my messages." in the app
And I press "Sometimes" near "Often" in the app
And I press "Choose" near "49. How long did this survey take you to complete?" in the app
And I press "1-2 min" in the app
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "You have completed this survey"
And I should see "Results"
And I press "Results" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "You've completed this survey. The graph below shows a summary of your results compared to the class averages."
And I should see "1 people have completed this survey so far"
@app @3.8.0 @tablet @OK
Scenario: Student answers a survey of Colles (preferred and actual) and see results tablet
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey Colles (preferred and actual) | Test survey1 | 3 | C1 | survey1 | 0 |
When I enter the app
And I change viewport size to "1280x1080"
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey Colles (preferred and actual)" in the app
And I press "1. I prefer that my learning focuses on issues that interest me." in the app
And I press "2. I found that my learning focuses on issues that interest me." in the app
And I press "3. I prefer that what I learn is important for my professional practice." in the app
And I press "4. I found that what I learn is important for my professional practice." in the app
And I press "5. I prefer that I learn how to improve my professional practice." in the app
And I press "6. I found that I learn how to improve my professional practice." in the app
And I press "7. I prefer that what I learn connects well with my professional practice." in the app
And I press "8. I found that what I learn connects well with my professional practice." in the app
And I press "9. I prefer that I think critically about how I learn." in the app
And I press "10. I found that I think critically about how I learn." in the app
And I press "11. I prefer that I think critically about my own ideas." in the app
And I press "12. I found that I think critically about my own ideas." in the app
And I press "13. I prefer that I think critically about other students' ideas." in the app
And I press "14. I found that I think critically about other students' ideas." in the app
And I press "15. I prefer that I think critically about ideas in the readings." in the app
And I press "16. I found that I think critically about ideas in the readings." in the app
And I press "17. I prefer that I explain my ideas to other students." in the app
And I press "18. I found that I explain my ideas to other students." in the app
And I press "19. I prefer that I ask other students to explain their ideas." in the app
And I press "20. I found that I ask other students to explain their ideas." in the app
And I press "21. I prefer that other students ask me to explain my ideas." in the app
And I press "22. I found that other students ask me to explain my ideas." in the app
And I press "23. I prefer that other students respond to my ideas." in the app
And I press "24. I found that other students respond to my ideas." in the app
And I press "25. I prefer that the tutor stimulates my thinking." in the app
And I press "26. I found that the tutor stimulates my thinking." in the app
And I press "27. I prefer that the tutor encourages me to participate." in the app
And I press "28. I found that the tutor encourages me to participate." in the app
And I press "29. I prefer that the tutor models good discourse." in the app
And I press "30. I found that the tutor models good discourse." in the app
And I press "31. I prefer that the tutor models critical self-reflection." in the app
And I press "32. I found that the tutor models critical self-reflection." in the app
And I press "33. I prefer that other students encourage my participation." in the app
And I press "34. I found that other students encourage my participation." in the app
And I press "35. I prefer that other students praise my contribution." in the app
And I press "36. I found that other students praise my contribution." in the app
And I press "37. I prefer that other students value my contribution." in the app
And I press "38. I found that other students value my contribution." in the app
And I press "39. I prefer that other students empathise with my struggle to learn." in the app
And I press "40. I found that other students empathise with my struggle to learn." in the app
And I press "41. I prefer that I make good sense of other students' messages." in the app
And I press "42. I found that I make good sense of other students' messages." in the app
And I press "43. I prefer that other students make good sense of my messages." in the app
And I press "44. I found that other students make good sense of my messages." in the app
And I press "45. I prefer that I make good sense of the tutor's messages." in the app
And I press "46. I found that I make good sense of the tutor's messages." in the app
And I press "47. I prefer that the tutor makes good sense of my messages." in the app
And I press "48. I found that the tutor makes good sense of my messages." in the app
And I press "49. How long did this survey take you to complete?" in the app
And I press "1-2 min" in the app
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "You have completed this survey"
And I should see "Results"
And I press "Results" in the app
And I switch to the browser tab opened by the app
And I log in as "student1"
Then I should see "You've completed this survey. The graph below shows a summary of your results compared to the class averages."
And I should see "1 people have completed this survey so far"
@app @3.8.0 @OK
Scenario: Student answers a survey offline and sync survey
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey critical incidents | Test survey1 | 5 | C1 | survey1 | 0 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Test survey critical incidents" in the app
And I switch offline mode to "true"
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "This Survey has offline data to be synchronised."
And I switch offline mode to "false"
And I press the back button in the app
And I press "Test survey critical incidents" in the app
And I press "Display options" in the app
And I press "Refresh" in the app
Then I should see "Results"
And I should not see "This Survey has offline data to be synchronised."
And I should see "You have completed this survey."
@app @3.8.0 @OK
Scenario: Prefetch and auto-sync
Given the following "activities" exist:
| activity | name | intro | template |course | idnumber | groupmode |
| survey | Test survey critical incidents | Test survey1 | 5 | C1 | survey1 | 0 |
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Course overview" in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test survey critical incidents" in the app
And I switch offline mode to "true"
And I press "Test survey name" in the app
Then I should see "There was a problem connecting to the site. Please check your connection and try again."
And I press "OK" in the app
And I press the back button in the app
And I press "Test survey critical incidents" in the app
And I press "Submit" in the app
And I press "OK" in the app
Then I should see "This Survey has offline data to be synchronised."
And I switch offline mode to "false"
And I wait "600" seconds
Then I should not see "This Survey has offline data to be synchronised."
And I should see "You have completed this survey."