Merge pull request #3958 from NoelDeMartin/MOBILE-4470
MOBILE-4470 course: Fix behat tests
This commit is contained in:
		
						commit
						1c93299467
					
				@ -11,8 +11,8 @@ Feature: Test basic usage of one course in app
 | 
				
			|||||||
      | student1 | Student | student | student1@example.com |
 | 
					      | student1 | Student | student | student1@example.com |
 | 
				
			||||||
      | student2 | Student2 | student2 | student2@example.com |
 | 
					      | student2 | Student2 | student2 | student2@example.com |
 | 
				
			||||||
    And the following "courses" exist:
 | 
					    And the following "courses" exist:
 | 
				
			||||||
      | fullname | shortname | category |
 | 
					      | fullname | shortname | category | initsections |
 | 
				
			||||||
      | Course 1 | C1 | 0 |
 | 
					      | Course 1 | C1        | 0        | 1            |
 | 
				
			||||||
    And the following "course enrolments" exist:
 | 
					    And the following "course enrolments" exist:
 | 
				
			||||||
      | user | course | role |
 | 
					      | user | course | role |
 | 
				
			||||||
      | teacher1 | C1 | editingteacher |
 | 
					      | teacher1 | C1 | editingteacher |
 | 
				
			||||||
@ -212,7 +212,7 @@ Feature: Test basic usage of one course in app
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    When I press the back button in the app
 | 
					    When I press the back button in the app
 | 
				
			||||||
    And I press "Course index" in the app
 | 
					    And I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 1" in the app
 | 
					    And I press "Section 1" in the app
 | 
				
			||||||
    Then I should find "Choice course 1" in the app
 | 
					    Then I should find "Choice course 1" in the app
 | 
				
			||||||
    And I should find "assignment" in the app
 | 
					    And I should find "assignment" in the app
 | 
				
			||||||
    And I should find "Test external name" in the app
 | 
					    And I should find "Test external name" in the app
 | 
				
			||||||
@ -245,7 +245,7 @@ Feature: Test basic usage of one course in app
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    When I press the back button in the app
 | 
					    When I press the back button in the app
 | 
				
			||||||
    And I press "Course index" in the app
 | 
					    And I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 2" in the app
 | 
					    And I press "Section 2" in the app
 | 
				
			||||||
    Then I should find "Quiz 1" in the app
 | 
					    Then I should find "Quiz 1" in the app
 | 
				
			||||||
    And I should find "Test chat name" in the app
 | 
					    And I should find "Test chat name" in the app
 | 
				
			||||||
    And I should find "Test scorm name" in the app
 | 
					    And I should find "Test scorm name" in the app
 | 
				
			||||||
@ -274,7 +274,7 @@ Feature: Test basic usage of one course in app
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    When I press the back button in the app
 | 
					    When I press the back button in the app
 | 
				
			||||||
    And I press "Course index" in the app
 | 
					    And I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 3" in the app
 | 
					    And I press "Section 3" in the app
 | 
				
			||||||
    Then I should find "Test feedback name" in the app
 | 
					    Then I should find "Test feedback name" in the app
 | 
				
			||||||
    And I should find "Test lesson name" in the app
 | 
					    And I should find "Test lesson name" in the app
 | 
				
			||||||
    And I should find "Test workshop name" in the app
 | 
					    And I should find "Test workshop name" in the app
 | 
				
			||||||
@ -304,7 +304,7 @@ Feature: Test basic usage of one course in app
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    When I press the back button in the app
 | 
					    When I press the back button in the app
 | 
				
			||||||
    And I press "Course index" in the app
 | 
					    And I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 4" in the app
 | 
					    And I press "Section 4" in the app
 | 
				
			||||||
    Then I should find "Web links" in the app
 | 
					    Then I should find "Web links" in the app
 | 
				
			||||||
    But I should not find "Choice course 1" in the app
 | 
					    But I should not find "Choice course 1" in the app
 | 
				
			||||||
    And I should not find "assignment" in the app
 | 
					    And I should not find "assignment" in the app
 | 
				
			||||||
@ -325,7 +325,7 @@ Feature: Test basic usage of one course in app
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    When I press the back button in the app
 | 
					    When I press the back button in the app
 | 
				
			||||||
    And I press "Course index" in the app
 | 
					    And I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 5" in the app
 | 
					    And I press "Section 5" in the app
 | 
				
			||||||
    Then I should find "Test glossary" in the app
 | 
					    Then I should find "Test glossary" in the app
 | 
				
			||||||
    But I should not find "Choice course 1" in the app
 | 
					    But I should not find "Choice course 1" in the app
 | 
				
			||||||
    And I should not find "assignment" in the app
 | 
					    And I should not find "assignment" in the app
 | 
				
			||||||
@ -365,61 +365,61 @@ Feature: Test basic usage of one course in app
 | 
				
			|||||||
    When I press "Course index" in the app
 | 
					    When I press "Course index" in the app
 | 
				
			||||||
    And I press "General" in the app
 | 
					    And I press "General" in the app
 | 
				
			||||||
    Then I should find "General" in the app
 | 
					    Then I should find "General" in the app
 | 
				
			||||||
    And I should find "Next: Topic 1" in the app
 | 
					    And I should find "Next: Section 1" in the app
 | 
				
			||||||
    But I should not find "Topic 2" in the app
 | 
					    But I should not find "Section 2" in the app
 | 
				
			||||||
    And I should not find "Topic 3" in the app
 | 
					    And I should not find "Section 3" in the app
 | 
				
			||||||
    And I should not find "Topic 4" in the app
 | 
					    And I should not find "Section 4" in the app
 | 
				
			||||||
    And I should not find "Topic 5" in the app
 | 
					    And I should not find "Section 5" in the app
 | 
				
			||||||
    And I should not find "Previous:" in the app
 | 
					    And I should not find "Previous:" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    When I press "Next:" in the app
 | 
					    When I press "Next:" in the app
 | 
				
			||||||
    Then I should find "Topic 1" in the app
 | 
					    Then I should find "Section 1" in the app
 | 
				
			||||||
    And I should find "Previous: General" in the app
 | 
					    And I should find "Previous: General" in the app
 | 
				
			||||||
    And I should find "Next: Topic 2" in the app
 | 
					    And I should find "Next: Section 2" in the app
 | 
				
			||||||
    But I should not find "Topic 3" in the app
 | 
					    But I should not find "Section 3" in the app
 | 
				
			||||||
    And I should not find "Topic 4" in the app
 | 
					    And I should not find "Section 4" in the app
 | 
				
			||||||
    And I should not find "Topic 5" in the app
 | 
					    And I should not find "Section 5" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    When I press "Next:" in the app
 | 
					    When I press "Next:" in the app
 | 
				
			||||||
    Then I should find "Topic 2" in the app
 | 
					    Then I should find "Section 2" in the app
 | 
				
			||||||
    And I should find "Previous: Topic 1" in the app
 | 
					    And I should find "Previous: Section 1" in the app
 | 
				
			||||||
    And I should find "Next: Topic 3" in the app
 | 
					    And I should find "Next: Section 3" in the app
 | 
				
			||||||
    But I should not find "General" in the app
 | 
					    But I should not find "General" in the app
 | 
				
			||||||
    And I should not find "Topic 4" in the app
 | 
					    And I should not find "Section 4" in the app
 | 
				
			||||||
    And I should not find "Topic 5" in the app
 | 
					    And I should not find "Section 5" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    When I press "Next:" in the app
 | 
					    When I press "Next:" in the app
 | 
				
			||||||
    Then I should find "Topic 3" in the app
 | 
					    Then I should find "Section 3" in the app
 | 
				
			||||||
    And I should find "Previous: Topic 2" in the app
 | 
					    And I should find "Previous: Section 2" in the app
 | 
				
			||||||
    And I should find "Next: Topic 4" in the app
 | 
					    And I should find "Next: Section 4" in the app
 | 
				
			||||||
    But I should not find "General" in the app
 | 
					    But I should not find "General" in the app
 | 
				
			||||||
    And I should not find "Topic 1" in the app
 | 
					    And I should not find "Section 1" in the app
 | 
				
			||||||
    And I should not find "Topic 5" in the app
 | 
					    And I should not find "Section 5" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    When I press "Next:" in the app
 | 
					    When I press "Next:" in the app
 | 
				
			||||||
    Then I should find "Topic 4" in the app
 | 
					    Then I should find "Section 4" in the app
 | 
				
			||||||
    And I should find "Previous: Topic 3" in the app
 | 
					    And I should find "Previous: Section 3" in the app
 | 
				
			||||||
    And I should find "Next: Topic 5" in the app
 | 
					    And I should find "Next: Section 5" in the app
 | 
				
			||||||
    But I should not find "General" in the app
 | 
					    But I should not find "General" in the app
 | 
				
			||||||
    And I should not find "Topic 1" in the app
 | 
					    And I should not find "Section 1" in the app
 | 
				
			||||||
    And I should not find "Topic 2" in the app
 | 
					    And I should not find "Section 2" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    When I press "Next:" in the app
 | 
					    When I press "Next:" in the app
 | 
				
			||||||
    Then I should find "Topic 5" in the app
 | 
					    Then I should find "Section 5" in the app
 | 
				
			||||||
    And I should find "Previous: Topic 4" in the app
 | 
					    And I should find "Previous: Section 4" in the app
 | 
				
			||||||
    But I should not find "General" in the app
 | 
					    But I should not find "General" in the app
 | 
				
			||||||
    And I should not find "Topic 1" in the app
 | 
					    And I should not find "Section 1" in the app
 | 
				
			||||||
    And I should not find "Topic 2" in the app
 | 
					    And I should not find "Section 2" in the app
 | 
				
			||||||
    And I should not find "Topic 3" in the app
 | 
					    And I should not find "Section 3" in the app
 | 
				
			||||||
    And I should not find "Next:" in the app
 | 
					    And I should not find "Next:" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    When I press "Previous:" in the app
 | 
					    When I press "Previous:" in the app
 | 
				
			||||||
    Then I should find "Topic 4" in the app
 | 
					    Then I should find "Section 4" in the app
 | 
				
			||||||
    And I should find "Previous: Topic 3" in the app
 | 
					    And I should find "Previous: Section 3" in the app
 | 
				
			||||||
    And I should find "Next: Topic 5" in the app
 | 
					    And I should find "Next: Section 5" in the app
 | 
				
			||||||
    But I should not find "General" in the app
 | 
					    But I should not find "General" in the app
 | 
				
			||||||
    And I should not find "Topic 1" in the app
 | 
					    And I should not find "Section 1" in the app
 | 
				
			||||||
    And I should not find "Topic 2" in the app
 | 
					    And I should not find "Section 2" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @lms_from4.0
 | 
					  @lms_from4.0
 | 
				
			||||||
  Scenario: Self enrol
 | 
					  Scenario: Self enrol
 | 
				
			||||||
 | 
				
			|||||||
@ -9,8 +9,8 @@ Feature: Check relative dates feature.
 | 
				
			|||||||
      | student1 | Student   | 1        | student1@example.com |
 | 
					      | student1 | Student   | 1        | student1@example.com |
 | 
				
			||||||
      | teacher1 | Student   | 1        | student1@example.com |
 | 
					      | teacher1 | Student   | 1        | student1@example.com |
 | 
				
			||||||
    And the following "courses" exist:
 | 
					    And the following "courses" exist:
 | 
				
			||||||
      | fullname | shortname | category | startdate            | enddate              | relativedatesmode | showactivitydates |
 | 
					      | fullname | shortname | category | startdate            | enddate              | relativedatesmode | showactivitydates | initsections |
 | 
				
			||||||
      | Course 1 | C1        | 0        | ## 1 January 2022 ## | ## 1 January 2023 ## | 1                 | 1                 |
 | 
					      | Course 1 | C1        | 0        | ## 1 January 2022 ## | ## 1 January 2023 ## | 1                 | 1                 | 1            |
 | 
				
			||||||
    And the following "course enrolments" exist:
 | 
					    And the following "course enrolments" exist:
 | 
				
			||||||
      | user     | course | role           |
 | 
					      | user     | course | role           |
 | 
				
			||||||
      | student1 | C1     | student        |
 | 
					      | student1 | C1     | student        |
 | 
				
			||||||
@ -23,23 +23,23 @@ Feature: Check relative dates feature.
 | 
				
			|||||||
  Scenario: Relative dates (student)
 | 
					  Scenario: Relative dates (student)
 | 
				
			||||||
    Given I entered the course "Course 1" as "student1" in the app
 | 
					    Given I entered the course "Course 1" as "student1" in the app
 | 
				
			||||||
    When I press "Course index" in the app
 | 
					    When I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 1" in the app
 | 
					    And I press "Section 1" in the app
 | 
				
			||||||
    Then I should find "20 January 2022, 12:00 AM" near "Opened:" in the app
 | 
					    Then I should find "20 January 2022, 12:00 AM" near "Opened:" in the app
 | 
				
			||||||
    And I should find "31 July 2022, 12:00 AM" near "Due:" in the app
 | 
					    And I should find "31 July 2022, 12:00 AM" near "Due:" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    When I press "Course index" in the app
 | 
					    When I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 2" in the app
 | 
					    And I press "Section 2" in the app
 | 
				
			||||||
    And I should find "1 December 2021, 12:00 AM" near "Opened:" in the app
 | 
					    And I should find "1 December 2021, 12:00 AM" near "Opened:" in the app
 | 
				
			||||||
    And I should find "31 January 2023, 10:00 AM" near "Due:" in the app
 | 
					    And I should find "31 January 2023, 10:00 AM" near "Due:" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Scenario: Relative dates (teacher)
 | 
					  Scenario: Relative dates (teacher)
 | 
				
			||||||
    Given I entered the course "Course 1" as "teacher1" in the app
 | 
					    Given I entered the course "Course 1" as "teacher1" in the app
 | 
				
			||||||
    When I press "Course index" in the app
 | 
					    When I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 1" in the app
 | 
					    And I press "Section 1" in the app
 | 
				
			||||||
    Then I should find "19 days after course start" near "Opened:" in the app
 | 
					    Then I should find "19 days after course start" near "Opened:" in the app
 | 
				
			||||||
    And I should find "211 days after course start" near "Due:" in the app
 | 
					    And I should find "211 days after course start" near "Due:" in the app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    When I press "Course index" in the app
 | 
					    When I press "Course index" in the app
 | 
				
			||||||
    And I press "Topic 2" in the app
 | 
					    And I press "Section 2" in the app
 | 
				
			||||||
    And I should find "31 days before course start" near "Opened:" in the app
 | 
					    And I should find "31 days before course start" near "Opened:" in the app
 | 
				
			||||||
    And I should find "1 year 30 days 10 hours after course start" near "Due:" in the app
 | 
					    And I should find "1 year 30 days 10 hours after course start" near "Due:" in the app
 | 
				
			||||||
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 40 KiB  | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user