Skip to content

Commit

Permalink
MDL-76230 block_tag_flickr: Extra Behat test for a specific tag
Browse files Browse the repository at this point in the history
  • Loading branch information
HuongNV13 committed Nov 14, 2022
1 parent 7c3188b commit 40c641e
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions blocks/tag_flickr/tests/behat/configuring_tag_flickr_block.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,36 @@ Feature: Adding and configuring Flickr block
As a admin
I need to add the Flickr block to the tags site page

@javascript
Scenario: Adding Flickr block to the tags site page
Given I log in as "admin"
Background:
# We need to create a user to use tag here because the tags site page only shows the tag that currently being used.
Given the following "users" exist:
| username | interests |
| student1 | Cats |
And I log in as "admin"
And I turn editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| tag_flickr | System | 1 | tag-search | side-post |
| tag_flickr | System | 1 | tag-index | side-post |
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I click on "Site pages" "list_item" in the "Navigation" "block"
And I click on "Tags" "link" in the "Navigation" "block"
And I add the "Flickr" block
And I configure the "Flickr" block

@javascript
Scenario: Adding Flickr block to the tags site page
Given "block_tag_flickr" "block" should exist
When I configure the "Flickr" block
Then I should see "Flickr block title"
And I set the field "Flickr block title" to "The Flickr block header"
And I press "Save changes"
And "block_tag_flickr" "block" should exist
Then "The Flickr block header" "block" should exist
And "The Flickr block header" "block" should exist

@javascript
Scenario: Adding Flickr block to a specific tag page
Given I click on "Cats" "link"
Then "block_tag_flickr" "block" should exist
And ".flickr-photos" "css_element" should exist in the "block_tag_flickr" "block"

0 comments on commit 40c641e

Please sign in to comment.