MOBILE-3295 behat: Behat basic test for forum
parent
a1bb5b879e
commit
2ea009c474
|
@ -11,9 +11,13 @@ Feature: Test basic usage in app
|
|||
And the following "users" exist:
|
||||
| username |
|
||||
| student1 |
|
||||
| teacher1 |
|
||||
| teacher2 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| teacher2 | C1 | editingteacher |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Test forum name | Test forum | C1 | forum | 0 |
|
||||
|
@ -78,3 +82,154 @@ Feature: Test basic usage in app
|
|||
And I should see "Add a new discussion topic"
|
||||
And I close the browser tab opened by the app
|
||||
And I press the back button in the app
|
||||
|
||||
@mobile @latest
|
||||
Scenario: Student star a discussion
|
||||
When I enter the app
|
||||
And I log in as "student1"
|
||||
And I press "Course 1" near "Course overview" in the app
|
||||
And I press "Test forum name" in the app
|
||||
And I press "close" in the app
|
||||
And I set the field "Subject" to "Auto-test star" in the app
|
||||
And I set the field "Message" to "Auto-test star message" in the app
|
||||
And I press "Post to forum" in the app
|
||||
And I press "close" in the app
|
||||
And I set the field "Subject" to "Auto-test" in the app
|
||||
And I set the field "Message" to "Auto-test message" in the app
|
||||
And I press "Post to forum" in the app
|
||||
And I press "Auto-test star" in the app
|
||||
And I wait "1" seconds
|
||||
And I press "Information" in the app
|
||||
And I press "Star this discussion" in the app
|
||||
And I press "arrow back" in the app
|
||||
And I should see "Auto-test star"
|
||||
And I should see "Auto-test"
|
||||
And I pause
|
||||
And I press "Auto-test star" in the app
|
||||
And I wait "1" seconds
|
||||
And I press "Information" in the app
|
||||
And I press "Unstar this discussion" in the app
|
||||
And I press "arrow back" in the app
|
||||
Then I should see "Auto-test star"
|
||||
And I should see "Auto-test"
|
||||
And I pause
|
||||
|
||||
|
||||
@mobile @latest
|
||||
Scenario: Teacher star and pin a discussion
|
||||
When I enter the app
|
||||
And I log in as "teacher1"
|
||||
And I press "Course 1" near "Course overview" in the app
|
||||
And I press "Test forum name" in the app
|
||||
And I press "close" in the app
|
||||
And I set the field "Subject" to "Auto-test star" in the app
|
||||
And I set the field "Message" to "Auto-test star message" in the app
|
||||
And I press "Post to forum" in the app
|
||||
And I press "close" in the app
|
||||
And I set the field "Subject" to "Auto-test pin" in the app
|
||||
And I set the field "Message" to "Auto-test pin message" in the app
|
||||
And I press "Post to forum" in the app
|
||||
And I press "close" in the app
|
||||
And I set the field "Subject" to "Auto-test" in the app
|
||||
And I set the field "Message" to "Auto-test message" in the app
|
||||
And I press "Post to forum" in the app
|
||||
And I press "Auto-test star" in the app
|
||||
And I wait "1" seconds
|
||||
And I press "Information" in the app
|
||||
And I press "Star this discussion" in the app
|
||||
And I press "arrow back" in the app
|
||||
And I press "Auto-test pin" in the app
|
||||
And I wait "1" seconds
|
||||
And I press "Information" in the app
|
||||
And I press "Pin this discussion" in the app
|
||||
And I press "arrow back" in the app
|
||||
And I should see "Auto-test pin"
|
||||
And I should see "Auto-test star"
|
||||
And I should see "Auto-test"
|
||||
And I pause
|
||||
And I press "Auto-test pin" in the app
|
||||
And I wait "1" seconds
|
||||
And I press "Information" in the app
|
||||
And I press "Unpin this discussion" in the app
|
||||
And I press "arrow back" in the app
|
||||
And I press "Auto-test star" in the app
|
||||
And I wait "1" seconds
|
||||
And I press "Information" in the app
|
||||
And I press "Unstar this discussion" in the app
|
||||
And I press "arrow back" in the app
|
||||
Then I should see "Auto-test star"
|
||||
And I should see "Auto-test pin"
|
||||
And I pause
|
||||
|
||||
@mobile @3.6 @OK
|
||||
Scenario: Teacher checks pin and star in 3.6
|
||||
When I enter the app
|
||||
And I log in as "teacher1"
|
||||
And I press "Course 1" near "Course overview" in the app
|
||||
And I press "Test forum name" in the app
|
||||
And I press "close" in the app
|
||||
And I set the field "Subject" to "Auto-test" in the app
|
||||
And I set the field "Message" to "Auto-test message" in the app
|
||||
And I press "Post to forum" in the app
|
||||
And I press "Auto-test" in the app
|
||||
And I wait "1" seconds
|
||||
And I press "Information" in the app
|
||||
Then I should not see "Star this discussion"
|
||||
And I should not see "Pin this discussion"
|
||||
|
||||
|
||||
@mobile
|
||||
Scenario: Edit a forum post (only online)
|
||||
When I enter the app
|
||||
And I log in as "teacher1"
|
||||
And I press "Course 1" near "Course overview" in the app
|
||||
And I press "Test forum name" in the app
|
||||
And I press "close" in the app
|
||||
And I set the field "Subject" to "Auto-test" in the app
|
||||
And I set the field "Message" to "Auto-test message" in the app
|
||||
And I press "Post to forum" in the app
|
||||
Then I should see "Auto-test"
|
||||
And I should see "Auto-test message"
|
||||
And I press "Auto-test" in the app
|
||||
And I press "Auto-test message" in the app
|
||||
And I press "Information" in the app
|
||||
And I pause
|
||||
And I pause
|
||||
And I press "Information" near "Test forum name" in the app
|
||||
And I switch to the browser tab opened by the app
|
||||
And I log in as "admin"
|
||||
And I press "Actions menu"
|
||||
And I follow "Edit settings"
|
||||
And I press "Ratings"
|
||||
|
||||
|
||||
@mobile @latest
|
||||
Scenario: Add/view ratings
|
||||
When I enter the app
|
||||
And I log in as "student1"
|
||||
And I press "Course 1" near "Course overview" in the app
|
||||
And I press "Test forum name" in the app
|
||||
And I press "close" in the app
|
||||
And I set the field "Subject" to "Auto-test" in the app
|
||||
And I set the field "Message" to "Auto-test message" in the app
|
||||
And I press "Post to forum" in the app
|
||||
And I pause
|
||||
And I press "Information" near "Test forum name" in the app
|
||||
And I press "Open in browser" in the app
|
||||
And I switch to the browser tab opened by the app
|
||||
And I log in as "admin"
|
||||
And I press "Actions menu"
|
||||
And I follow "Edit settings"
|
||||
And I press "Ratings"
|
||||
And I press "No ratings"
|
||||
And I press "Average of ratings"
|
||||
And I press "None"
|
||||
And I press "Point"
|
||||
And I press "Save and display"
|
||||
And I pause
|
||||
When I enter the app
|
||||
And I log in as "teacher1"
|
||||
And I press "Course 1" near "Course overview" in the app
|
||||
And I press "Test forum name" in the app
|
||||
And I press "Auto-test" in the app
|
||||
And I pause
|
||||
|
|
Loading…
Reference in New Issue