mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-42278 behat: block context can be returned to original state
Automate MDLQA-1547 - The context of a block can always be returned to it's original state.
This commit is contained in:
parent
f8eff10319
commit
e6bcdc5ece
1 changed files with 49 additions and 0 deletions
49
blocks/tests/behat/return_block_original_state.feature
Normal file
49
blocks/tests/behat/return_block_original_state.feature
Normal file
|
@ -0,0 +1,49 @@
|
|||
@core @core_block
|
||||
Feature: The context of a block can always be returned to it's original state.
|
||||
In order to revert actions when configuring blocks
|
||||
As an admin
|
||||
I need to be able to return the block to original state
|
||||
|
||||
@javascript
|
||||
Scenario: Add and configure a block to display on every page and revert back
|
||||
Given the following "courses" exists:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And I log in as "admin"
|
||||
When I follow "Course 1"
|
||||
And I follow "Turn editing on"
|
||||
And I add the "Tags" block
|
||||
Then I should see "Tags" in the "Tags" "block"
|
||||
And I click on "Participants" "link" in the "//li[p/span[contains(normalize-space(string(.)), 'Current course')]]" "xpath_element"
|
||||
And I follow "Configure Tags block"
|
||||
And I fill the moodle form with:
|
||||
| Display on page types | Any page |
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Assignment1 |
|
||||
| Description | Description |
|
||||
And I follow "Assignment1"
|
||||
And I follow "Configure Tags block"
|
||||
And I fill the moodle form with:
|
||||
| Display on page types | Any assignment module page |
|
||||
And I press "Save changes"
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
And I follow "Course 1"
|
||||
And "Tags" "block" should not exists
|
||||
And I click on "Participants" "link" in the "//li[p/span[contains(normalize-space(string(.)), 'Current course')]]" "xpath_element"
|
||||
And "Tags" "block" should not exists
|
||||
And I follow "Course 1"
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Assignment2 |
|
||||
| Description | Description |
|
||||
And I follow "Assignment2"
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
And I follow "Configure Tags block"
|
||||
And I fill the moodle form with:
|
||||
| Display on page types | Any page |
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
And I click on "Participants" "link" in the "//li[p/span[contains(normalize-space(string(.)), 'Current course')]]" "xpath_element"
|
||||
And I should see "Tags" in the "Tags" "block"
|
Loading…
Add table
Add a link
Reference in a new issue