Skip to content

Commit

Permalink
MDL-60858 feedback: update behat tests for lang string change
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwyllie committed Dec 13, 2017
1 parent 85ce9b5 commit e236dc1
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 40 deletions.
24 changes: 12 additions & 12 deletions mod/feedback/tests/behat/anonymous.feature
Expand Up @@ -40,7 +40,7 @@ Feature: Anonymous feedback

Scenario: Guests can see anonymous feedback on front page but can not complete
When I follow "Site feedback"
Then I should not see "Answer the questions..."
Then I should not see "Answer the questions"
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
Expand All @@ -52,7 +52,7 @@ Feature: Anonymous feedback
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like our site?"
And I set the following fields to these values:
| Yes | 1 |
Expand All @@ -73,7 +73,7 @@ Feature: Anonymous feedback
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like our site?"
And I set the following fields to these values:
| Yes | 1 |
Expand All @@ -85,7 +85,7 @@ Feature: Anonymous feedback
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| No | 1 |
And I press "Submit your answers"
Expand Down Expand Up @@ -118,7 +118,7 @@ Feature: Anonymous feedback
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like our site?"
And I set the following fields to these values:
| Yes | 1 |
Expand All @@ -139,7 +139,7 @@ Feature: Anonymous feedback
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like our site?"
And I set the following fields to these values:
| Yes | 1 |
Expand All @@ -150,7 +150,7 @@ Feature: Anonymous feedback
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like our site?"
And I set the following fields to these values:
| No | 1 |
Expand Down Expand Up @@ -192,7 +192,7 @@ Feature: Anonymous feedback
And I follow "Preview"
Then I should see "Do you like this course?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like this course?"
And I set the following fields to these values:
| Yes | 1 |
Expand All @@ -204,7 +204,7 @@ Feature: Anonymous feedback
And I follow "Preview"
And I should see "Do you like this course?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like this course?"
And I set the following fields to these values:
| No | 1 |
Expand All @@ -224,7 +224,7 @@ Feature: Anonymous feedback
And I follow "Preview"
And I should see "Do you like this course?"
And I press "Continue"
And I should not see "Answer the questions..."
And I should not see "Answer the questions"
And I navigate to "Show responses" in current page administration
And I should not see "Username"
And I should see "Anonymous entries (2)"
Expand Down Expand Up @@ -262,7 +262,7 @@ Feature: Anonymous feedback
When I log in as "user1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| this is a short text answer | anontext |
And I press "Submit your answers"
Expand All @@ -280,7 +280,7 @@ Feature: Anonymous feedback
When I log in as "user1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| this is a short text answer | usertext |
And I press "Submit your answers"
Expand Down
18 changes: 9 additions & 9 deletions mod/feedback/tests/behat/coursemapping.feature
Expand Up @@ -74,7 +74,7 @@ Feature: Mapping courses in a feedback
And I log in as "user1"
And I am on site homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Acceptance test site" in the ".feedback_form" "css_element"
And I set the following fields to these values:
| option a | 1 |
Expand All @@ -83,7 +83,7 @@ Feature: Mapping courses in a feedback
And I press "Continue"
And I am on "Course 1" course homepage
And I click on "Course feedback" "link" in the "Feedback" "block"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should not see "Acceptance test site" in the ".feedback_form" "css_element"
And I should see "C1" in the ".feedback_form" "css_element"
And I set the following fields to these values:
Expand All @@ -92,12 +92,12 @@ Feature: Mapping courses in a feedback
And I press "Submit your answers"
And I press "Continue"
And I click on "Course feedback" "link" in the "Feedback" "block"
And I should not see "Answer the questions..."
And I should not see "Answer the questions"
And I log out
And I log in as "user2"
And I am on "Course 1" course homepage
And I click on "Course feedback" "link" in the "Feedback" "block"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should not see "Acceptance test site" in the ".feedback_form" "css_element"
And I should see "C1" in the ".feedback_form" "css_element"
And I set the following fields to these values:
Expand Down Expand Up @@ -150,15 +150,15 @@ Feature: Mapping courses in a feedback
And I am on site homepage
And I follow "Course feedback"
And I should see "You can only access this feedback from a course"
And I should not see "Answer the questions..."
And I should not see "Answer the questions"

And I am on "Course 1" course homepage
And "Feedback" "block" should not exist
And I should not see "Course feedback"

And I am on "Course 2" course homepage
And I click on "Course feedback" "link" in the "Feedback" "block"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should not see "Acceptance test site" in the ".feedback_form" "css_element"
And I should see "C2" in the ".feedback_form" "css_element"
And I set the following fields to these values:
Expand All @@ -167,12 +167,12 @@ Feature: Mapping courses in a feedback
And I press "Submit your answers"
And I press "Continue"
And I click on "Course feedback" "link" in the "Feedback" "block"
And I should not see "Answer the questions..."
And I should not see "Answer the questions"
And I log out
And I log in as "user2"
And I am on "Course 2" course homepage
And I click on "Course feedback" "link" in the "Feedback" "block"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should not see "Acceptance test site" in the ".feedback_form" "css_element"
And I should see "C2" in the ".feedback_form" "css_element"
And I set the following fields to these values:
Expand All @@ -184,7 +184,7 @@ Feature: Mapping courses in a feedback
And I log in as "user3"
And I am on "Course 3" course homepage
And I click on "Course feedback" "link" in the "Feedback" "block"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should not see "Acceptance test site" in the ".feedback_form" "css_element"
And I should see "C3" in the ".feedback_form" "css_element"
And I set the following fields to these values:
Expand Down
12 changes: 6 additions & 6 deletions mod/feedback/tests/behat/multichoice.feature
Expand Up @@ -59,7 +59,7 @@ Feature: Testing multichoice questions in feedback
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
# Examine the first page, select nothing, go to the next page
Then the following fields match these values:
| Not selected | 1 |
Expand Down Expand Up @@ -126,7 +126,7 @@ Feature: Testing multichoice questions in feedback
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the field "option a" to "1"
And I press "Next page"
And I set the field "option d" to "1"
Expand Down Expand Up @@ -203,7 +203,7 @@ Feature: Testing multichoice questions in feedback
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
# Examine the first page, select nothing, go to the next page
And I should not see "Not selected"
And the following fields match these values:
Expand Down Expand Up @@ -268,7 +268,7 @@ Feature: Testing multichoice questions in feedback
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the field "option a" to "1"
And I set the field "option b" to "1"
And I press "Next page"
Expand Down Expand Up @@ -345,7 +345,7 @@ Feature: Testing multichoice questions in feedback
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
# Examine the first page, select nothing, go to the next page
Then the following fields match these values:
| this is a multiple choice 1 | 0 |
Expand Down Expand Up @@ -393,7 +393,7 @@ Feature: Testing multichoice questions in feedback
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the field "this is a multiple choice 1" to "option a"
And I press "Next page"
And I set the field "this is a multiple choice 2" to "option d"
Expand Down
4 changes: 2 additions & 2 deletions mod/feedback/tests/behat/multipleattempt.feature
Expand Up @@ -41,7 +41,7 @@ Feature: Non anonymous feedback with multiple submissions
And I log in as "user1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| first | 111 |
And I press "Next"
Expand All @@ -52,7 +52,7 @@ Feature: Non anonymous feedback with multiple submissions
And I log in as "user1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
Then the field "first" matches value "111"
And I press "Next"
And the field "second" matches value "222"
Expand Down
14 changes: 7 additions & 7 deletions mod/feedback/tests/behat/non_anonymous.feature
Expand Up @@ -40,7 +40,7 @@ Feature: Non anonymous feedback

Scenario: Guests can see non anonymous feedback on front page but can not complete
When I follow "Site feedback"
Then I should not see "Answer the questions..."
Then I should not see "Answer the questions"
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
Expand All @@ -52,7 +52,7 @@ Feature: Non anonymous feedback
And I follow "Preview"
And I should see "Do you like our site?"
And I press "Continue"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like our site?"
And I set the following fields to these values:
| Yes of course | 1 |
Expand All @@ -70,7 +70,7 @@ Feature: Non anonymous feedback
And I log in as "user1"
And I am on site homepage
When I follow "Site feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like our site?"
And I set the following fields to these values:
| Yes of course | 1 |
Expand All @@ -79,7 +79,7 @@ Feature: Non anonymous feedback
And I log in as "user2"
And I am on site homepage
When I follow "Site feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| Not at all | 1 |
And I press "Submit your answers"
Expand Down Expand Up @@ -122,7 +122,7 @@ Feature: Non anonymous feedback
And I log in as "user1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like this course?"
And I set the following fields to these values:
| Yes of course | 1 |
Expand All @@ -131,7 +131,7 @@ Feature: Non anonymous feedback
And I log in as "user2"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I should see "Do you like this course?"
And I set the following fields to these values:
| Not at all | 1 |
Expand All @@ -151,7 +151,7 @@ Feature: Non anonymous feedback
And I follow "Preview"
And I should see "Do you like this course?"
And I press "Continue"
And I should not see "Answer the questions..."
And I should not see "Answer the questions"
And I navigate to "Show responses" in current page administration
And I should see "Non anonymous entries (2)"
And I should not see "Anonymous"
Expand Down
4 changes: 2 additions & 2 deletions mod/feedback/tests/behat/question_types.feature
Expand Up @@ -69,7 +69,7 @@ Feature: Test creating different types of feedback questions for anonymous feedb
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| this is a longer text answer | my long answer |
| option b | 1 |
Expand All @@ -84,7 +84,7 @@ Feature: Test creating different types of feedback questions for anonymous feedb
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| this is a longer text answer | lots of feedbacks |
| option a | 1 |
Expand Down
4 changes: 2 additions & 2 deletions mod/feedback/tests/behat/question_types_non_anon.feature
Expand Up @@ -73,7 +73,7 @@ Feature: Test creating different types of feedback questions for non-anonymous f
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| this is a longer text answer | my long answer |
| option b | 1 |
Expand All @@ -88,7 +88,7 @@ Feature: Test creating different types of feedback questions for non-anonymous f
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Learning experience"
And I follow "Answer the questions..."
And I follow "Answer the questions"
And I set the following fields to these values:
| this is a longer text answer | lots of feedbacks |
| option a | 1 |
Expand Down

0 comments on commit e236dc1

Please sign in to comment.