1 |
efrain |
1 |
@core @core_blog @_file_upload @javascript
|
|
|
2 |
Feature: Blog entries can be added, modified and deleted
|
|
|
3 |
In order to modify or delete a blog entry
|
|
|
4 |
As a user
|
|
|
5 |
I need to be able to add a blog entry
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| testuser | Test | User | moodle@example.com |
|
|
|
11 |
And I am on the "testuser" "user > profile" page logged in as testuser
|
|
|
12 |
And I follow "Blog entries"
|
|
|
13 |
And I follow "Add a new entry"
|
|
|
14 |
And I should see "Blogs: Add a new entry"
|
|
|
15 |
And I set the following fields to these values:
|
|
|
16 |
| Entry title | Entry 1 |
|
|
|
17 |
| Blog entry body | Entry 1 content |
|
|
|
18 |
| Attachment | lib/tests/fixtures/gd-logo.png |
|
|
|
19 |
And I press "Save changes"
|
|
|
20 |
|
|
|
21 |
Scenario: Modify a blog entry
|
|
|
22 |
When I click on "Edit" "link"
|
|
|
23 |
And I set the following fields to these values:
|
|
|
24 |
| Entry title | Blog entry 1 |
|
|
|
25 |
And I press "Save changes"
|
|
|
26 |
Then I should see "Blog entry 1"
|
|
|
27 |
|
|
|
28 |
Scenario: Delete a blog entry
|
|
|
29 |
When I click on "Delete" "link"
|
|
|
30 |
And I press "Continue"
|
|
|
31 |
Then I should not see "Entry 1"
|
|
|
32 |
And I should see "Add a new entry"
|