mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-74465 block_html: display config when adding
This commit is contained in:
parent
6b081d2e9f
commit
04c3cd2343
@ -88,4 +88,13 @@ class block_html_edit_form extends block_edit_form {
|
||||
$this->block->config->title = $title;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the configuration form when block is being added to the page
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function display_form_when_adding(): bool {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ Feature: Adding and configuring Text blocks
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I turn editing mode on
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I set the field "Content" to "Static text without a header"
|
||||
Then I should see "Text block title"
|
||||
And I press "Save changes"
|
||||
And I add the "Text" block to the default region with:
|
||||
| Text block title | |
|
||||
| Content | Static text without a header |
|
||||
Then I should not see "(new text block)"
|
||||
And I configure the "block_html" block
|
||||
And I set the field "Text block title" to "The Text block header"
|
||||
|
@ -64,10 +64,8 @@ Feature: Add and configure blocks throughout the site
|
||||
Given I log in as "admin"
|
||||
And I am on homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I set the following fields to these values:
|
||||
And I add the "Text" block to the default region with:
|
||||
| Text block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt=" |
|
||||
| Content | Example |
|
||||
When I press "Save changes"
|
||||
Then I should see "Example"
|
||||
Then I should see "Example" in the "block_html" "block"
|
||||
Then I should see "document.getElementsByTagName"
|
||||
|
@ -221,16 +221,18 @@ Feature: Inline editing H5P content anywhere
|
||||
Given I am on the "C1" "Course" page logged in as "admin"
|
||||
# Add H5P content to the block.
|
||||
And I turn editing mode on
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I click on "Insert H5P" "button" in the "#fitem_id_config_text" "css_element"
|
||||
And I add the "Text" block to the default region with:
|
||||
| Text block title | H5PTest |
|
||||
| Content | - |
|
||||
And I configure the "H5PTest" block
|
||||
And I click on "Insert H5P" "button" in the "//div[contains(@id,'fitem_id_config_text')]" "xpath_element"
|
||||
And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
|
||||
And I select "Content bank" repository in file picker
|
||||
And I click on "Greeting card" "file" in repository content area
|
||||
And I click on "Make a copy of the file" "radio"
|
||||
And I click on "Select this file" "button"
|
||||
And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
|
||||
And I press "Save changes"
|
||||
And I click on "Save changes" "button" in the "Configure H5PTest block" "dialogue"
|
||||
And I switch to "h5p-iframe" class iframe
|
||||
And I switch to "h5p-iframe" class iframe
|
||||
And I should see "Hello world!"
|
||||
|
@ -92,14 +92,14 @@ Feature: Run tests over my courses.
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I add the "Text" block to the default region with:
|
||||
| Text block title | Text on all pages |
|
||||
| Content | This is visible on all pages |
|
||||
And I configure the "Text on all pages" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
| Default region | Right |
|
||||
And I press "Save changes"
|
||||
And I click on "Save changes" "button" in the "Configure Text on all pages block" "dialogue"
|
||||
And I should see "This is visible on all pages"
|
||||
And "Move Text on all pages block" "menuitem" should exist in the "Text on all pages" "block"
|
||||
When I am on the "My courses" page
|
||||
|
@ -11,14 +11,14 @@ Feature: My courses page block layout in Boost theme
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I add the "Text" block to the default region with:
|
||||
| Text block title | Text on all pages |
|
||||
| Content | This is visible on all pages |
|
||||
And I configure the "Text on all pages" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
| Default region | Right |
|
||||
And I press "Save changes"
|
||||
And I click on "Save changes" "button" in the "Configure Text on all pages block" "dialogue"
|
||||
|
||||
Scenario: Student can see relevant blocks with correct placement on my courses page
|
||||
When I log in as "student1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user