forked from EVOgeek/Vmeda.Online
		
	MOBILE-3295 MOBILE-3296 MOBILE-3297 behat: Improvements on forum, survey and choice
This commit is contained in:
		
							parent
							
								
									6ae980be6a
								
							
						
					
					
						commit
						78619e1689
					
				| @ -1,5 +1,5 @@ | |||||||
| @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 | ||||||
| @ -20,7 +20,7 @@ Feature: Test basic usage in app | |||||||
|       | activity | name        | intro                   | course | idnumber | option | |       | activity | name        | intro                   | course | idnumber | option | | ||||||
|       | choice   | Choice name | Test choice description | C1     | choice1  | Option 1, Option 2, Option 3 |  |       | choice   | Choice name | Test choice description | C1     | choice1  | Option 1, Option 2, Option 3 |  | ||||||
| 
 | 
 | ||||||
|   @3.8.0 @OK |   @app @3.8.0 @OK | ||||||
|   Scenario: Student sends their single choice and views results. |   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 | | ||||||
| @ -44,7 +44,7 @@ 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" | ||||||
| 
 | 
 | ||||||
|     @3.8.0 @OK |     @app @3.8.0 @OK | ||||||
|     Scenario: Student sends, changes and removes the multi choice |     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 | | ||||||
| @ -72,7 +72,7 @@ Feature: Test basic usage in 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" | ||||||
| 
 | 
 | ||||||
|   @3.8.0 @OK |   @app @3.8.0 @OK | ||||||
|   Scenario: Student answers, changes answer offline and sync |   Scenario: Student answers, changes answer offline and sync | ||||||
|     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 | | ||||||
| @ -85,19 +85,25 @@ Feature: Test basic usage in app | |||||||
|     And I switch offline mode to "true" |     And I switch offline mode to "true" | ||||||
|     And I press "Option 2" in the app |     And I press "Option 2" in the app | ||||||
|     And I press "Save my choice" in the app |     And I press "Save my choice" in the app | ||||||
|     And I should see "Are you sure" |     Then I should see "Are you sure" | ||||||
|     And I press "OK" in the app |     And I press "OK" in the app | ||||||
|     And I press "arrow back" in the app |     And I press "arrow back" in the app | ||||||
|     And I press "Test single choice name" 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 switch offline mode to "false" | ||||||
|     And I press "arrow back" in the app |     And I press "arrow back" in the app | ||||||
|     And I press "Test single choice name" in the app |     And I press "Test single choice name" in the app | ||||||
|  |     And I press "Information" in the app | ||||||
|  |     And I press "Refresh" in the app | ||||||
|     Then I should see "Option 1: 0" |     Then I should see "Option 1: 0" | ||||||
|     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 "This Choice has offline data to be synchronised." | ||||||
| 
 | 
 | ||||||
|   @3.8.0 @OK |   @app @3.8.0 @OK | ||||||
|   Scenario: Student answers, changes answer offline and auto-sync |   Scenario: Student answers, changes answer offline and auto-sync | ||||||
|     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 | | ||||||
| @ -113,13 +119,17 @@ Feature: Test basic usage in app | |||||||
|     And I should see "Are you sure" |     And I should see "Are you sure" | ||||||
|     And I press "OK" in the app |     And I press "OK" in the app | ||||||
|     And I switch offline mode to "false" |     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 |     And I wait "600" seconds | ||||||
|     Then I should see "Option 1: 0" |     Then I should see "Option 1: 0" | ||||||
|     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 "This Choice has offline data to be synchronised." | ||||||
| 
 | 
 | ||||||
|   @3.8.0 @OK |   @app @3.8.0 @OK | ||||||
|   Scenario: Prefetch |   Scenario: Prefetch | ||||||
|     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 | | ||||||
| @ -143,15 +153,19 @@ Feature: Test basic usage in app | |||||||
|     And I press "OK" in the app |     And I press "OK" in the app | ||||||
|     And I press "arrow back" in the app |     And I press "arrow back" in the app | ||||||
|     And I press "Test single choice name" 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 switch offline mode to "false" | ||||||
|     And I press "arrow back" in the app |     And I press "arrow back" in the app | ||||||
|     And I press "Test single choice name" in the app |     And I press "Test single choice name" in the app | ||||||
|     Then I should see "Option 1: 0" |     Then I should see "Option 1: 0" | ||||||
|     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 "This Choice has offline data to be synchronised." | ||||||
| 
 | 
 | ||||||
|   @3.8.0 @OK |   @app @3.8.0 @OK | ||||||
|   Scenario: Download students choice in text format |   Scenario: Download students choice in text format | ||||||
|     When I enter the app |     When I enter the app | ||||||
|     And I log in as "student1" |     And I log in as "student1" | ||||||
|  | |||||||
| @ -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 | ||||||
| @ -24,6 +24,7 @@ Feature: Test basic usage in app | |||||||
|       | activity   | name            | intro       | course | idnumber | groupmode | assessed | scale[modgrade_type] | |       | activity   | name            | intro       | course | idnumber | groupmode | assessed | scale[modgrade_type] | | ||||||
|       | forum      | Test forum name | Test forum  | C1     | forum    | 0         | 5        | Point                | |       | forum      | Test forum name | Test forum  | C1     | forum    | 0         | 5        | Point                | | ||||||
| 
 | 
 | ||||||
|  |   @app @3.8.0 @OK | ||||||
|   Scenario: Student starts a discussion |   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" | ||||||
| @ -34,8 +35,10 @@ 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" |     And I should see "An awesome message" | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|   @app_upto3.6.1 |   @app_upto3.6.1 | ||||||
|   Scenario: Student posts a reply |   Scenario: Student posts a reply | ||||||
|     When I enter the app |     When I enter the app | ||||||
| @ -70,6 +73,7 @@ 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" | ||||||
| 
 | 
 | ||||||
|  |   @OK | ||||||
|   Scenario: Test that 'open in browser' works for forum |   Scenario: Test that 'open in browser' works for forum | ||||||
|     When I enter the app |     When I enter the app | ||||||
|     And I change viewport size to "360x640" |     And I change viewport size to "360x640" | ||||||
| @ -85,7 +89,7 @@ Feature: Test basic usage in app | |||||||
|     And I close the browser tab opened by the app |     And I close the browser tab opened by the app | ||||||
|     And I press the back button in the app |     And I press the back button in the app | ||||||
| 
 | 
 | ||||||
|   @app @3.8.0 |   @app @mobile @3.8.0 | ||||||
|   Scenario: Student star a discussion |   Scenario: Student star a discussion | ||||||
|     When I enter the app |     When I enter the app | ||||||
|     And I log in as "student1" |     And I log in as "student1" | ||||||
| @ -104,7 +108,7 @@ Feature: Test basic usage in app | |||||||
|     And I press "Information" in the app |     And I press "Information" in the app | ||||||
|     And I press "Star this discussion" in the app |     And I press "Star this discussion" in the app | ||||||
|     And I press "arrow back" in the app |     And I press "arrow back" in the app | ||||||
|     And I should see "Auto-test star" |     Then I should see "Auto-test star" | ||||||
|     And I should see "Auto-test" |     And I should see "Auto-test" | ||||||
|     And I pause  |     And I pause  | ||||||
|     And I press "Auto-test star" in the app |     And I press "Auto-test star" in the app | ||||||
| @ -117,7 +121,7 @@ Feature: Test basic usage in app | |||||||
|     And I pause |     And I pause | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     @app @3.8.0 |     @app @mobile @3.8.0 | ||||||
|     Scenario: Teacher star and pin a discussion |     Scenario: Teacher star and pin a discussion | ||||||
|     When I enter the app |     When I enter the app | ||||||
|     And I log in as "teacher1" |     And I log in as "teacher1" | ||||||
| @ -163,7 +167,7 @@ Feature: Test basic usage in app | |||||||
|     And I should see "Auto-test pin" |     And I should see "Auto-test pin" | ||||||
|     And I pause |     And I pause | ||||||
| 
 | 
 | ||||||
|     @app @3.6 @OK |     @app @mobile @3.6 @OK | ||||||
|     Scenario: Teacher checks pin and star in 3.6 |     Scenario: Teacher checks pin and star in 3.6 | ||||||
|     When I enter the app |     When I enter the app | ||||||
|     And I log in as "teacher1" |     And I log in as "teacher1" | ||||||
| @ -180,7 +184,7 @@ Feature: Test basic usage in app | |||||||
|     And I should not see "Pin this discussion" |     And I should not see "Pin this discussion" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     @app @3.8.0 |     @app @mobile @3.8.0 | ||||||
|     Scenario: Edit a forum post (only online) |     Scenario: Edit a forum post (only online) | ||||||
|     When I enter the app |     When I enter the app | ||||||
|     And I log in as "student1" |     And I log in as "student1" | ||||||
| @ -199,13 +203,14 @@ Feature: Test basic usage in app | |||||||
|     And I press "Auto-test" in the app |     And I press "Auto-test" in the app | ||||||
|     And I wait "2" seconds |     And I wait "2" seconds | ||||||
|     And I pause |     And I pause | ||||||
|     And I press "" in the app |     And I press "Auto-test" near "Information" in the app | ||||||
|  |     And I pause | ||||||
|     And I should see "Edit" |     And I should see "Edit" | ||||||
|     And I pause |     And I pause | ||||||
|     And I switch offline mode to "true" |     And I switch offline mode to "true" | ||||||
|     And I pause |     And I pause | ||||||
| 
 | 
 | ||||||
|     @app @3.8.0 |     @app @mobile @3.8.0 | ||||||
|     Scenario: Add/view ratings |     Scenario: Add/view ratings | ||||||
|     When I enter the app |     When I enter the app | ||||||
|     And I log in as "student1" |     And I log in as "student1" | ||||||
| @ -220,7 +225,7 @@ Feature: Test basic usage in app | |||||||
|     And I set the field "Write your reply..." to "test" in the app |     And I set the field "Write your reply..." to "test" in the app | ||||||
|     And I press "Post to forum" in the app |     And I press "Post to forum" in the app | ||||||
|     When I enter the app |     When I enter the app | ||||||
|     And I log in as "teacher1" |     And I log in as "student2" | ||||||
|     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 "Auto-test" in the app |     And I press "Auto-test" in the app | ||||||
| @ -301,6 +306,7 @@ Feature: Test basic usage in app | |||||||
|     And I press "Post to forum" in the app |     And I press "Post to forum" in the app | ||||||
|     Then I should see "DiscussionSubject" |     Then I should see "DiscussionSubject" | ||||||
|     And I should see "Not sent" |     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 switch offline mode to "false" | ||||||
|     And I press "arrow back" in the app |     And I press "arrow back" in the app | ||||||
|     And I press "Test forum name" in the app |     And I press "Test forum name" in the app | ||||||
| @ -310,6 +316,7 @@ Feature: Test basic usage in app | |||||||
|     Then I should see "DiscussionSubject" |     Then I should see "DiscussionSubject" | ||||||
|     And I should see "DiscussionMessage" |     And I should see "DiscussionMessage" | ||||||
|     And I should not see "Not sent" |     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 |     @app @3.8.0 @OK | ||||||
|     Scenario: Student creates a new discussion offline and auto-sync forum |     Scenario: Student creates a new discussion offline and auto-sync forum | ||||||
| @ -324,6 +331,7 @@ Feature: Test basic usage in app | |||||||
|     And I press "Post to forum" in the app |     And I press "Post to forum" in the app | ||||||
|     Then I should see "DiscussionSubject" |     Then I should see "DiscussionSubject" | ||||||
|     And I should see "Not sent" |     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 switch offline mode to "false" | ||||||
|     And I wait "600" seconds |     And I wait "600" seconds | ||||||
|     And I should not see "Not sent" |     And I should not see "Not sent" | ||||||
| @ -331,6 +339,7 @@ Feature: Test basic usage in app | |||||||
|     Then I should see "DiscussionSubject" |     Then I should see "DiscussionSubject" | ||||||
|     And I should see "DiscussionMessage" |     And I should see "DiscussionMessage" | ||||||
|     And I should not see "Not sent" |     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 |     @app @3.8.0 @mobile @OK | ||||||
|     Scenario: Prefetch mobile |     Scenario: Prefetch mobile | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| @mod @mod_survey @app @javascript | @mod @mod_survey @app @javascript | ||||||
| Feature: Test basic usage in app | Feature: Test basic usage of survey activity in app | ||||||
|   In order to participate in surveys while using the mobile app |   In order to participate in surveys while using the mobile app | ||||||
|   As a student |   As a student | ||||||
|   I need basic survey functionality to work |   I need basic survey functionality to work | ||||||
| @ -562,13 +562,15 @@ Feature: Test basic usage in app | |||||||
|   And I switch offline mode to "true" |   And I switch offline mode to "true" | ||||||
|   And I press "Submit" in the app |   And I press "Submit" in the app | ||||||
|   And I press "OK" 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 switch offline mode to "false" | ||||||
|   And I press "arrow back" in the app |   And I press "arrow back" in the app | ||||||
|   And I press "Test survey critical incidents" in the app |   And I press "Test survey critical incidents" in the app | ||||||
|   And I press "Information" in the app |   And I press "Information" in the app | ||||||
|   And I press "Refresh" in the app |   And I press "Refresh" in the app | ||||||
|   Then I should see "Results" |   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 |   @app @3.8.0 @OK | ||||||
|   Scenario: Prefetch and auto-sync |   Scenario: Prefetch and auto-sync | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user