MOBILE-3295 MOBILE-3296 behat: Behat basic test for forum and choice

main
David Castellón 2020-01-02 10:06:02 +01:00
parent d571a9a32e
commit 57cddebb3e
2 changed files with 88 additions and 15 deletions

View File

@ -85,7 +85,7 @@ Feature: Test basic usage in app
And I close the browser tab opened by the app
And I press the back button in the app
@app @mobile @3.8.0
@app @3.8.0
Scenario: Student star a discussion
When I enter the app
And I log in as "student1"
@ -117,7 +117,7 @@ Feature: Test basic usage in app
And I pause
@app @mobile @3.8.0
@app @3.8.0
Scenario: Teacher star and pin a discussion
When I enter the app
And I log in as "teacher1"
@ -163,7 +163,7 @@ Feature: Test basic usage in app
And I should see "Auto-test pin"
And I pause
@app @mobile @3.6 @OK
@app @3.6 @OK
Scenario: Teacher checks pin and star in 3.6
When I enter the app
And I log in as "teacher1"
@ -180,7 +180,7 @@ Feature: Test basic usage in app
And I should not see "Pin this discussion"
@app @mobile @3.8.0
@app @3.8.0
Scenario: Edit a forum post (only online)
When I enter the app
And I log in as "student1"
@ -199,13 +199,13 @@ Feature: Test basic usage in app
And I press "Auto-test" in the app
And I wait "2" seconds
And I pause
And I press "More" in the app
And I press "" in the app
And I should see "Edit"
And I pause
And I switch offline mode to "true"
And I pause
@app @mobile @3.8.0
@app @3.8.0
Scenario: Add/view ratings
When I enter the app
And I log in as "student1"
@ -367,7 +367,7 @@ Feature: Test basic usage in app
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
@app @3.8.0 @tablet @OK
Scenario: Prefetch tablet
When I enter the app
And I change viewport size to "1280x1080"
@ -392,15 +392,18 @@ Feature: Test basic usage in app
And I should see "DiscussionSubject 2"
And I press "arrow back" in the app
And I switch offline mode to "true"
And I press "Test forum name" in the app
And I pause
And I press "DiscussionSubject 2" in the app
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 "arrow back" 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."
@app @3.8.0
Scenario: Student sorts a forum discussion
When I enter the app

View File

@ -20,8 +20,8 @@ Feature: Test basic usage in app
| activity | name | intro | course | idnumber | groupmode |
| survey | Test survey name | Test survey | C1 | survey | 0 |
@Mobile @3.8.0 @OK
Scenario: Student answer a survey and see results
@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
@ -74,13 +74,83 @@ Feature: Test basic usage in app
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"
@Tablet @3.8.0
Scenario: Student answer a survey and see results tablet
@app @3.8.0 @tablet
Scenario: Student answer 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 pause
@app @3.8.0
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"
And I pause
@app @3.8.0 @OK
Scenario: 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
And I switch offline mode to "false"
And I press "arrow back" in the app
And I press "Test survey critical incidents" in the app
And I press "Information" in the app
And I press "Refresh" in the app
Then I should see "Results"
@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 "Information" 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 "arrow back" 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."
@app @3.8.0
Scenario: Student answers a survey offline
When I enter the app
And I log in as "student1"
And I pause