MOBILE-4219 blog: Create acceptance testing
parent
ed8223d761
commit
5d7c520de4
|
@ -86,6 +86,7 @@ jobs:
|
|||
"@addon_mod_survey"
|
||||
"@addon_mod_workshop"
|
||||
"@addon_notifications"
|
||||
"@addon_blog"
|
||||
"@core"
|
||||
"@core_comments"
|
||||
"@core_course"
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
@addon_blog @core_blog @app @javascript @lms_from4.4
|
||||
Feature: Edit blog entries
|
||||
In order to add or edit blog entries as User
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| testuser | Test | User | moodle@example.com |
|
||||
| testuser2 | Test | User2 | moodle@example.com |
|
||||
And the following "core_blog > entries" exist:
|
||||
| subject | body | user |
|
||||
| Blog post one | User 1 blog post content | testuser |
|
||||
| Blog post two | User 1 blog post content | testuser |
|
||||
|
||||
Scenario: Edit blog entry
|
||||
Given I entered the app as "testuser"
|
||||
When I press the user menu button in the app
|
||||
And I press "Blog entries" in the app
|
||||
Then I should find "Blog post one" in the app
|
||||
And I press "Display options" in the app
|
||||
And I press "Edit" in the app
|
||||
|
||||
Then I should find "Blog post one" in the app
|
||||
And I set the field "Entry title" to "Blog post one (updated)" in the app
|
||||
And I set the field "Blog entry body" to "User 1 blog post content (updated)" in the app
|
||||
And I press "Publish to" in the app
|
||||
And I press "Yourself (draft)" in the app
|
||||
And I press "Save" in the app
|
||||
|
||||
Then I should find "Blog post one (updated)" in the app
|
||||
And I should find "User 1 blog post content (updated)" in the app
|
||||
And I should find "Yourself (draft)" near "User 1 blog post content (updated)" in the app
|
||||
|
||||
Scenario: Add a blog entry
|
||||
Given I entered the app as "testuser"
|
||||
When I press the user menu button in the app
|
||||
And I press "Blog entries" in the app
|
||||
And I press "Add a new entry" in the app
|
||||
|
||||
And I set the field "Entry title" to "New blog entry" in the app
|
||||
And I set the field "Blog entry body" to "This is a new blog entry." in the app
|
||||
And I press "Publish to" in the app
|
||||
And I press "Anyone on this site" in the app
|
||||
And I press "Add a new entry" "button" in the app
|
||||
|
||||
Then I should find "Blog entries" in the app
|
||||
And I should find "New blog entry" in the app
|
||||
|
||||
Scenario: Add a blog entry with attachments
|
||||
Given I entered the app as "testuser"
|
||||
When I press the user menu button in the app
|
||||
And I press "Blog entries" in the app
|
||||
And I press "Add a new entry" in the app
|
||||
|
||||
And I set the field "Entry title" to "Entry with attachments" in the app
|
||||
And I set the field "Blog entry body" to "This is a new blog entry with attachments." in the app
|
||||
|
||||
And I press "Add file" in the app
|
||||
And I upload "stub6.txt" to "File" ".action-sheet-button" in the app
|
||||
And I press "Add file" in the app
|
||||
And I upload "stub7.txt" to "File" ".action-sheet-button" in the app
|
||||
|
||||
And I press "Add a new entry" "button" in the app
|
||||
|
||||
Then I should find "Blog entries" in the app
|
||||
And I should find "Entry with attachments" in the app
|
||||
And I should find "stub6.txt" in the app
|
||||
And I should find "stub7.txt" in the app
|
|
@ -0,0 +1,30 @@
|
|||
@addon_blog @core_blog @app @javascript @lms_from4.4
|
||||
Feature: Blog entries
|
||||
In order to modify or delete a blog entry
|
||||
As a user
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| testuser | Test | User | moodle@example.com |
|
||||
And the following "core_blog > entries" exist:
|
||||
| subject | body | user |
|
||||
| Blog post one | User 1 blog post content | testuser |
|
||||
| Blog post two | User 1 blog post content | testuser |
|
||||
|
||||
Scenario: List every blog entry
|
||||
Given I entered the app as "testuser"
|
||||
When I press the user menu button in the app
|
||||
And I press "Blog entries" in the app
|
||||
Then I should find "Blog post one" in the app
|
||||
And I should find "Blog post two" in the app
|
||||
|
||||
Scenario: Delete blog entry
|
||||
Given I entered the app as "testuser"
|
||||
When I press the user menu button in the app
|
||||
And I press "Blog entries" in the app
|
||||
Then I should find "Blog post one" in the app
|
||||
When I press "Display options" near "Blog post one" in the app
|
||||
And I press "Delete" in the app
|
||||
And I pull to refresh in the app
|
||||
And I should not find "Blog post one" in the app
|
|
@ -0,0 +1 @@
|
|||
This is the stub file 6 created at 13/03/2025.
|
|
@ -0,0 +1 @@
|
|||
This is the stub file 7 created at 13/03/2025.
|
Loading…
Reference in New Issue