MOBILE-3295 behat: Behat basic test for forum

main
David Castellón 2020-02-10 09:49:39 +01:00
parent f71454504e
commit 298dc89c06
1 changed files with 32 additions and 0 deletions

View File

@ -214,6 +214,38 @@ Feature: Test basic usage of forum activity in app
And I press "OK" in the app And I press "OK" in the app
And I should not see "Edit" And I should not see "Edit"
@app @3.8.0 @OK
Scenario: Delete a forum post (only online)
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
Then I should see "Auto-test"
And I press the back button in the app
And I press "Display options" in the app
And I press "Show download options" in the app
And I press "cloud download" near "Test forum name" in the app
And I press "Test forum name" in the app
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
And I press "Display options" near "Reply" in the app
Then I should see "Delete"
And I press "Delete" in the app
And I press "Cancel" in the app
And I switch offline mode to "true"
And I press "Display options" near "Reply" in the app
Then I should see "There was a problem connecting to the site. Please check your connection and try again."
And I press "OK" in the app
And I should not see "Delete"
And I switch offline mode to "false"
And I press "Display options" near "Reply" in the app
And I press "Delete" in the app
And I press "Delete" in the app
Then I should not see "Auto-test"
@app @3.8.0 @mobile @OK @app @3.8.0 @mobile @OK
Scenario: Add/view ratings (mobile) Scenario: Add/view ratings (mobile)
When I enter the app When I enter the app