forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-35982 behat: delete blog entry coverage
- Loading branch information
1 parent
366f05f
commit 3e0f566
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@core @core_blog | ||
Feature: Delete a blog entry | ||
In order to manage my blog entries | ||
As a user | ||
I need to be able to delete entries I no longer wish to appear | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| testuser | Test | User | moodle@example.com | | ||
And I log in as "testuser" | ||
And I expand "Site pages" node | ||
And I follow "Site blogs" | ||
And I follow "Add a new entry" | ||
And I set the following fields to these values: | ||
| Entry title | Blog post one | | ||
| Blog entry body | User 1 blog post content | | ||
And I press "Save changes" | ||
And I follow "Add a new entry" | ||
And I set the following fields to these values: | ||
| Entry title | Blog post two | | ||
| Blog entry body | User 1 blog post content | | ||
And I press "Save changes" | ||
And I am on site homepage | ||
And I expand "Site pages" node | ||
And I follow "Site blogs" | ||
|
||
Scenario: Delete blog post results in post deleted | ||
Given I follow "Blog post one" | ||
And I follow "Delete" | ||
And I should see "Delete the blog entry 'Blog post one'?" | ||
When I press "Continue" | ||
Then I should not see "Blog post one" | ||
And I should see "Blog post two" | ||
|
||
Scenario: Delete confirmation screen works and allows cancel | ||
Given I follow "Blog post one" | ||
When I follow "Delete" | ||
Then I should see "Delete the blog entry 'Blog post one'?" | ||
And I press "Cancel" | ||
And I should see "Blog post one" | ||
And I should see "Blog post two" | ||
|