forked from EVOgeek/Vmeda.Online
		
	MOBILE-3307 MOBILE-3319 behat: Behat basic test for messages and an improvement on course
This commit is contained in:
		
							parent
							
								
									ab223d6a0a
								
							
						
					
					
						commit
						57f52a8c60
					
				| @ -2,7 +2,7 @@ | |||||||
| Feature: Test basic usage of one course in app | Feature: Test basic usage of one course in app | ||||||
|   In order to participate in one course while using the mobile app |   In order to participate in one course while using the mobile app | ||||||
|   As a student |   As a student | ||||||
|   I need basic courses functionality to work |   I need basic course functionality to work | ||||||
| 
 | 
 | ||||||
|   Background: |   Background: | ||||||
|     Given the following "users" exist: |     Given the following "users" exist: | ||||||
| @ -406,9 +406,7 @@ Feature: Test basic usage of one course in app | |||||||
|   And I follow "More..." |   And I follow "More..." | ||||||
|   And I follow "Users" |   And I follow "Users" | ||||||
|   And I follow "Enrolment methods" |   And I follow "Enrolment methods" | ||||||
|   And I follow "Delete" |   And I click on "Enable" "icon" in the "Self enrolment (Student)" "table_row" | ||||||
|   And I press "Continue" |  | ||||||
|   And I follow "Enable" |  | ||||||
|   And I close the browser tab opened by the app |   And I close the browser tab opened by the app | ||||||
|   When I enter the app |   When I enter the app | ||||||
|   And I log in as "student2" |   And I log in as "student2" | ||||||
| @ -434,7 +432,7 @@ Feature: Test basic usage of one course in app | |||||||
|   And I should see "Test lesson name" |   And I should see "Test lesson name" | ||||||
|   And I should see "Test scorm name" |   And I should see "Test scorm name" | ||||||
|   And I should see "Test workshop name" |   And I should see "Test workshop name" | ||||||
|    | 
 | ||||||
|   @app @3.8.0 @OK |   @app @3.8.0 @OK | ||||||
|   Scenario: Guest access |   Scenario: Guest access | ||||||
|   When I enter the app |   When I enter the app | ||||||
| @ -451,7 +449,7 @@ Feature: Test basic usage of one course in app | |||||||
|   And I follow "More..." |   And I follow "More..." | ||||||
|   And I follow "Users" |   And I follow "Users" | ||||||
|   And I follow "Enrolment methods" |   And I follow "Enrolment methods" | ||||||
|   And I follow "Enable" |   And I click on "Enable" "icon" in the "Guest access" "table_row" | ||||||
|   And I close the browser tab opened by the app |   And I close the browser tab opened by the app | ||||||
|   When I enter the app |   When I enter the app | ||||||
|   And I log in as "student2" |   And I log in as "student2" | ||||||
|  | |||||||
							
								
								
									
										95
									
								
								mod/messages/tests/behat/app_basic_usage.feature
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										95
									
								
								mod/messages/tests/behat/app_basic_usage.feature
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,95 @@ | |||||||
|  | @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 messages 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 "Information" 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" | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user