Skip to content

Commit

Permalink
MDL-68674 behat: make content bank steps more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze authored and HuongNV13 committed Feb 29, 2024
1 parent 2909651 commit 3406032
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions contentbank/tests/behat/edit_content.feature
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Feature: Content bank use editor feature
And I switch to "h5p-editor-iframe" class iframe
And I switch to the main frame
And I click on "Cancel" "button"
And I should see "filltheblanks.h5p" in the "h2" "css_element"
And "filltheblanks.h5p" "heading" should exist

Scenario: Users can create new content if they have the required permission
Given I navigate to "H5P > Manage H5P content types" in site administration
Expand Down Expand Up @@ -116,7 +116,7 @@ Feature: Content bank use editor feature
And I set the field "Title" to "New title"
And I switch to the main frame
When I click on "Save" "button"
And I should see "filltheblanks.h5p" in the "h2" "css_element"
And "filltheblanks.h5p" "heading" should exist
And I click on "Edit" "link"
And I switch to "h5p-editor-iframe" class iframe
Then the field "Title" matches value "New title"
Expand Down
10 changes: 5 additions & 5 deletions contentbank/tests/behat/visibility.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Feature: Make content public or unlisted
And I click on "Content bank" "link" in the "Navigation" "block"
And I click on "filltheblanks.h5p" "link"
And I wait until the page is ready
And I should not see "filltheblanks.h5p (Unlisted)" in the "h2" "css_element"
And "filltheblanks.h5p (Unlisted)" "heading" should not exist
And I click on "More" "button"
And I should see "Make unlisted"
And I click on "Make unlisted" "link"
And I wait until the page is ready
Then I should see "filltheblanks.h5p (Unlisted)" in the "h2" "css_element"
Then "filltheblanks.h5p (Unlisted)" "heading" should exist
And I click on "More" "button"
And I should see "Make public"

Expand Down Expand Up @@ -131,7 +131,7 @@ Feature: Make content public or unlisted
And I click on "Upload" "link"
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Upload content" filemanager
And I click on "Save changes" "button"
Then I should see "filltheblanks.h5p (Unlisted)" in the "h2" "css_element"
Then "filltheblanks.h5p (Unlisted)" "heading" should exist

@_file_upload
Scenario: User preference concerning content visibility overrides site-wide default content visibility
Expand All @@ -149,5 +149,5 @@ Feature: Make content public or unlisted
And I click on "Upload" "link"
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Upload content" filemanager
And I click on "Save changes" "button"
Then I should see "filltheblanks.h5p" in the "h2" "css_element"
And I should not see "filltheblanks.h5p (Unlisted)" in the "h2" "css_element"
Then "filltheblanks.h5p" "heading" should exist
And "filltheblanks.h5p (Unlisted)" "heading" should not exist

0 comments on commit 3406032

Please sign in to comment.