Merge branch 'MDL-78455-master' of https://github.com/andelacruz/moodle

This commit is contained in:
Sara Arjona 2023-07-12 17:37:00 +02:00
commit 675569572d
No known key found for this signature in database
3 changed files with 37 additions and 12 deletions

View File

@ -0,0 +1,32 @@
@core @core_blog @_file_upload @javascript
Feature: Blog entries can be added, modified and deleted
In order to modify or delete a blog entry
As a user
I need to be able to add a blog entry
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| testuser | Test | User | moodle@example.com |
And I am on the "testuser" "user > profile" page logged in as testuser
And I follow "Blog entries"
And I follow "Add a new entry"
And I should see "Blogs: Add a new entry"
And I set the following fields to these values:
| Entry title | Entry 1 |
| Blog entry body | Entry 1 content |
| Attachment | lib/tests/fixtures/gd-logo.png |
And I press "Save changes"
Scenario: Modify a blog entry
When I click on "Edit" "link"
And I set the following fields to these values:
| Entry title | Blog entry 1 |
And I press "Save changes"
Then I should see "Blog entry 1"
Scenario: Delete a blog entry
When I click on "Delete" "link"
And I press "Continue"
Then I should not see "Entry 1"
And I should see "Add a new entry"

View File

@ -22,13 +22,11 @@ Feature: Blogs can be set to be only visible by the author.
And I set the following fields to these values:
| Blog visibility | Users can only see their own blog |
And I press "Save changes"
And I log out
Scenario: A student can not see another student's blog entries.
Given I log in as "testuser"
And I am on "Course 1" course homepage
Given I am on the "Course 1" course page logged in as testuser
And I navigate to course participants
And I follow "Test2 User2"
When I follow "Test2 User2"
And I should see "Miscellaneous"
Then I should not see "Blog entries"
And I follow "Profile" in the user menu

View File

@ -1,4 +1,4 @@
@core @core_blog
@core @core_blog @javascript
Feature: Comment on a blog entry
In order to respond to a blog post
As a user
@ -25,10 +25,8 @@ Feature: Comment on a blog entry
And I press "Save changes"
And I log out
@javascript
Scenario: Commenting on my own blog entry
Given I am on site homepage
And I log in as "testuser"
Given I log in as "testuser"
And I click on "Site pages" "list_item" in the "Navigation" "block"
And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Blog post from user 1"
@ -41,10 +39,8 @@ Feature: Comment on a blog entry
And I follow "Save comment"
And I should see "Comments (2)" in the ".comment-link" "css_element"
@javascript
Scenario: Deleting my own comment
Given I am on site homepage
And I log in as "testuser"
Given I log in as "testuser"
And I click on "Site pages" "list_item" in the "Navigation" "block"
And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Blog post from user 1"
@ -61,7 +57,6 @@ Feature: Comment on a blog entry
And I should not see "$My own >nasty< \"string\"!"
And I should see "Comments (0)" in the ".comment-link" "css_element"
@javascript
Scenario: Commenting on someone's blog post
Given I am on site homepage
And I log in as "testuser2"