From 0ee109766cdf157423718c66b94d92b5c33030ce Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 9 Mar 2017 14:20:46 +1300 Subject: [PATCH] tidy up tests a little. --- tests/behat/attendance_mod.feature | 16 ++++++++-------- tests/behat/calendar_features.feature | 4 ++-- tests/behat/defaultstatus.feature | 2 +- tests/behat/report.feature | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/behat/attendance_mod.feature b/tests/behat/attendance_mod.feature index 1204a8e..e36eaf3 100644 --- a/tests/behat/attendance_mod.feature +++ b/tests/behat/attendance_mod.feature @@ -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" diff --git a/tests/behat/calendar_features.feature b/tests/behat/calendar_features.feature index 8be1af4..e0dd02d 100644 --- a/tests/behat/calendar_features.feature +++ b/tests/behat/calendar_features.feature @@ -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" diff --git a/tests/behat/defaultstatus.feature b/tests/behat/defaultstatus.feature index 34a0665..77bd88f 100644 --- a/tests/behat/defaultstatus.feature +++ b/tests/behat/defaultstatus.feature @@ -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: diff --git a/tests/behat/report.feature b/tests/behat/report.feature index 2663f8b..2bc035d 100644 --- a/tests/behat/report.feature +++ b/tests/behat/report.feature @@ -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"