MDL-78455 Behat: Behat cleanup and optimisation for blog/tests/behat

This commit is contained in:
Angelia Dela Cruz
2023-06-16 09:12:37 +08:00
parent 6165917109
commit 01b8a0b596
2 changed files with 5 additions and 12 deletions
+2 -4
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
+3 -8
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"