tidy up tests a little.
authorDan Marsden <dan@danmarsden.com>
Thu, 9 Mar 2017 01:20:46 +0000 (14:20 +1300)
committerDan Marsden <dan@danmarsden.com>
Thu, 9 Mar 2017 01:20:46 +0000 (14:20 +1300)
tests/behat/attendance_mod.feature
tests/behat/calendar_features.feature
tests/behat/defaultstatus.feature
tests/behat/report.feature

index 1204a8e..e36eaf3 100644 (file)
@@ -25,7 +25,7 @@ Feature: Teachers and Students can record session attendance
             | C1     | student1 | student        | ##yesterday## |
             | C1     | teacher1 | editingteacher | ##yesterday## |
 
-        When I log in as "teacher1"
+        And I log in as "teacher1"
         And I follow "Course 1"
         And I turn editing mode on
         And I follow "Add a block"
@@ -35,11 +35,11 @@ Feature: Teachers and Students can record session attendance
         And I log out
         And I log in as "student1"
         And I follow "Course 1"
-        Then I should see "Attendance"
+        And I should see "Attendance"
         And I log out
 
     Scenario: Students can mark their own attendance
-        When I log in as "teacher1"
+        Given I log in as "teacher1"
         And I follow "Course 1"
         And I follow "Attendance"
         And I follow "Add"
@@ -49,13 +49,13 @@ Feature: Teachers and Students can record session attendance
             | id_sestime_endhour   | 23 |
         And I click on "id_submitbutton" "button"
         And I log out
-        When I log in as "student1"
+        And I log in as "student1"
         And I follow "Course 1"
         And I follow "Attendance"
         And I follow "Submit attendance"
         And I set the field "Present" to "1"
         And I press "Save changes"
-        Then I should see "Self-recorded"
+        And I should see "Self-recorded"
         And I log out
         When I log in as "teacher1"
         And I follow "Course 1"
@@ -65,7 +65,7 @@ Feature: Teachers and Students can record session attendance
         Then "Attendance taken by student" "link" should exist
 
     Scenario: Teachers can view low grade report and send a message
-        When I log in as "teacher1"
+        Given I log in as "teacher1"
         And I follow "Course 1"
         And I follow "Attendance"
         And I follow "Add"
@@ -77,7 +77,7 @@ Feature: Teachers and Students can record session attendance
         And I follow "Low grade"
         And I set the field "cb_selector" to "1"
         And I click on "Send a message" "button"
-        Then I should see "Message body"
+        And I should see "Message body"
         And I should see "student1@asd.com"
         And I follow "Course 1"
         And I expand "Reports" node
@@ -86,7 +86,7 @@ Feature: Teachers and Students can record session attendance
         Then "Attendance report viewed" "link" should exist
 
     Scenario: Export report includes id number, department and institution
-        When I log in as "teacher1"
+        Given I log in as "teacher1"
         And I follow "Course 1"
         And I follow "Attendance"
         And I follow "Add"
index 8be1af4..e0dd02d 100644 (file)
@@ -23,7 +23,7 @@ Feature: Test the calendar related features in the attendance module
     And I log out
 
   Scenario: Calendar events can be created automatically with sessions creation
-    When I log in as "teacher1"
+    Given I log in as "teacher1"
     And I follow "Course 1"
     And I follow "Test attendance"
     And I follow "Add session"
@@ -33,7 +33,7 @@ Feature: Test the calendar related features in the attendance module
     And I click on "id_submitbutton" "button"
     And I follow "Course 1"
     And I follow "Go to calendar"
-    Then I should see "Test attendance"
+    And I should see "Test attendance"
     And I log out
     And I log in as "student1"
     And I follow "Go to calendar"
index 34a0665..77bd88f 100644 (file)
@@ -21,7 +21,7 @@ Feature: Admin can set default status set for use in new attendance
 
   @javascript
   Scenario: Modified default status set added to new attendance
-    When I log in as "teacher1"
+    Given I log in as "teacher1"
     And I follow "Course 1"
     And I turn editing mode on
     And I add a "Attendance" to section "1" and I fill the form with:
index 2663f8b..2bc035d 100644 (file)
@@ -32,7 +32,7 @@ Feature: Visiting reports
          And I log out
 
     Scenario: Teacher takes attendance
-        When I log in as "teacher1"
+        Given I log in as "teacher1"
          And I follow "Course 1"
          And I follow "Attendance"
          And I follow "Edit settings"
@@ -66,7 +66,7 @@ Feature: Visiting reports
          And I log out
 
     Scenario: Teacher changes the maximum points in the attendance settings
-        When I log in as "teacher1"
+        Given I log in as "teacher1"
          And I follow "Course 1"
          And I follow "Attendance"
          And I follow "Edit settings"
@@ -148,7 +148,7 @@ Feature: Visiting reports
          And I log out
 
     Scenario: Teacher visit summary report
-        When I log in as "teacher1"
+        Given I log in as "teacher1"
          And I follow "Course 1"
          And I follow "Attendance"
          And I follow "Edit settings"
@@ -192,7 +192,7 @@ Feature: Visiting reports
          And I log out
 
     Scenario: Student visit user report
-        When I log in as "teacher1"
+        Given I log in as "teacher1"
          And I follow "Course 1"
          And I follow "Attendance"
          And I follow "Edit settings"