Skip to content

Commit

Permalink
MDL-65630 mod_quiz: Move logging in to the start of tests
Browse files Browse the repository at this point in the history
The background is for set up, the scenario is for the test. Logging in
to start the test is the start of the test and the end of the background
itself.
  • Loading branch information
rezaies committed May 20, 2019
1 parent a866c5c commit 2e68255
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mod/quiz/tests/behat/attempt_redo_questions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Feature: Allow students to redo questions in a practice quiz, without starting a
| question | page | maxmark |
| TF1 | 1 | 2 |
| TF2 | 1 | 1 |
And I log in as "student"
And I am on "Course 1" course homepage

@javascript
Scenario: After completing a question, there is a redo question button that restarts the question
Given I log in as "student"
And I am on "Course 1" course homepage
When I follow "Quiz 1"
And I press "Attempt quiz now"
And I click on "False" "radio" in the "First question" "question"
Expand All @@ -45,6 +45,8 @@ Feature: Allow students to redo questions in a practice quiz, without starting a

@javascript
Scenario: The redo question button is visible but disabled for teachers
Given I log in as "student"
And I am on "Course 1" course homepage
When I follow "Quiz 1"
And I press "Attempt quiz now"
And I click on "False" "radio" in the "First question" "question"
Expand All @@ -59,6 +61,8 @@ Feature: Allow students to redo questions in a practice quiz, without starting a

@javascript
Scenario: The redo question buttons are no longer visible after the attempt is submitted.
Given I log in as "student"
And I am on "Course 1" course homepage
When I follow "Quiz 1"
And I press "Attempt quiz now"
And I click on "False" "radio" in the "First question" "question"
Expand All @@ -70,6 +74,8 @@ Feature: Allow students to redo questions in a practice quiz, without starting a

@javascript @_switch_window
Scenario: Teachers reviewing can see all the qestions attempted in a slot
Given I log in as "student"
And I am on "Course 1" course homepage
When I follow "Quiz 1"
And I press "Attempt quiz now"
And I click on "False" "radio" in the "First question" "question"
Expand Down Expand Up @@ -100,6 +106,8 @@ Feature: Allow students to redo questions in a practice quiz, without starting a

@javascript
Scenario: Redoing question 1 should save any changes to question 2 on the same page
Given I log in as "student"
And I am on "Course 1" course homepage
When I follow "Quiz 1"
And I press "Attempt quiz now"
And I click on "False" "radio" in the "First question" "question"
Expand Down

0 comments on commit 2e68255

Please sign in to comment.