mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-72118 block_html: Rename HTML block to Text
This commit is contained in:
parent
1d700796ca
commit
5cbe9242f0
@ -23,14 +23,14 @@
|
||||
*/
|
||||
|
||||
$string['allowadditionalcssclasses'] = 'Allow additional CSS classes';
|
||||
$string['configallowadditionalcssclasses'] = 'Adds a configuration option to HTML block instances allowing additional CSS classes to be set.';
|
||||
$string['configallowadditionalcssclasses'] = 'Adds a configuration option to Text block instances allowing additional CSS classes to be set.';
|
||||
$string['configclasses'] = 'Additional CSS classes';
|
||||
$string['configclasses_help'] = 'The purpose of this configuration is to aid with theming by helping distinguish HTML blocks from each other. Any CSS classes entered here (space delimited) will be appended to the block\'s default classes.';
|
||||
$string['configclasses_help'] = 'The purpose of this configuration is to aid with theming by helping distinguish text blocks from each other. Any CSS classes entered here (space delimited) will be appended to the block\'s default classes.';
|
||||
$string['configcontent'] = 'Content';
|
||||
$string['configtitle'] = 'HTML block title';
|
||||
$string['html:addinstance'] = 'Add a new HTML block';
|
||||
$string['html:myaddinstance'] = 'Add a new HTML block to Dashboard';
|
||||
$string['newhtmlblock'] = '(new HTML block)';
|
||||
$string['pluginname'] = 'HTML';
|
||||
$string['search:content'] = 'HTML block content';
|
||||
$string['privacy:metadata:block'] = 'The HTML block stores all of its data within the block subsystem.';
|
||||
$string['configtitle'] = 'Text block title';
|
||||
$string['html:addinstance'] = 'Add a new text block';
|
||||
$string['html:myaddinstance'] = 'Add a new text block to Dashboard';
|
||||
$string['newhtmlblock'] = '(new text block)';
|
||||
$string['pluginname'] = 'Text';
|
||||
$string['search:content'] = 'Text block content';
|
||||
$string['privacy:metadata:block'] = 'The Text block stores all of its data within the block subsystem.';
|
||||
|
@ -1,41 +1,41 @@
|
||||
@block @block_html @core_block
|
||||
Feature: Adding and configuring HTML blocks
|
||||
Feature: Adding and configuring Text blocks
|
||||
In order to have custom blocks on a page
|
||||
As admin
|
||||
I need to be able to create, configure and change HTML blocks
|
||||
I need to be able to create, configure and change Text blocks
|
||||
|
||||
@javascript
|
||||
Scenario: Configuring the HTML block with Javascript on
|
||||
Scenario: Configuring the Text block with Javascript on
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
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 "HTML block title"
|
||||
Then I should see "Text block title"
|
||||
And I press "Save changes"
|
||||
Then I should not see "(new HTML block)"
|
||||
Then I should not see "(new text block)"
|
||||
And I configure the "block_html" block
|
||||
And I set the field "HTML block title" to "The HTML block header"
|
||||
And I set the field "Text block title" to "The Text block header"
|
||||
And I set the field "Content" to "Static text with a header"
|
||||
And I press "Save changes"
|
||||
And "block_html" "block" should exist
|
||||
And "The HTML block header" "block" should exist
|
||||
And I should see "Static text with a header" in the "The HTML block header" "block"
|
||||
And "The Text block header" "block" should exist
|
||||
And I should see "Static text with a header" in the "The Text block header" "block"
|
||||
|
||||
Scenario: Configuring the HTML block with Javascript off
|
||||
Scenario: Configuring the Text block with Javascript off
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
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"
|
||||
And I press "Save changes"
|
||||
Then I should not see "(new HTML block)"
|
||||
Then I should not see "(new text block)"
|
||||
And I configure the "block_html" block
|
||||
And I set the field "HTML block title" to "The HTML block header"
|
||||
And I set the field "Text block title" to "The Text block header"
|
||||
And I set the field "Content" to "Static text with a header"
|
||||
And I press "Save changes"
|
||||
And "block_html" "block" should exist
|
||||
And "The HTML block header" "block" should exist
|
||||
And I should see "Static text with a header" in the "The HTML block header" "block"
|
||||
And "The Text block header" "block" should exist
|
||||
And I should see "Static text with a header" in the "The Text block header" "block"
|
||||
|
@ -1,10 +1,10 @@
|
||||
@block @block_html
|
||||
Feature: HTML blocks in a course
|
||||
In order to have one or multiple HTML blocks in a course
|
||||
Feature: Text blocks in a course
|
||||
In order to have one or multiple Text blocks in a course
|
||||
As a teacher
|
||||
I need to be able to create and change such blocks
|
||||
|
||||
Scenario: Adding HTML block in a course
|
||||
Scenario: Adding Text block in a course
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Terry1 | Teacher1 | teacher@example.com |
|
||||
@ -18,15 +18,15 @@ Feature: HTML blocks in a course
|
||||
| student1 | C1 | student |
|
||||
When I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I set the field "Content" to "First block content"
|
||||
And I set the field "HTML block title" to "First block header"
|
||||
And I set the field "Text block title" to "First block header"
|
||||
And I press "Save changes"
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I set the field "Content" to "Second block content"
|
||||
And I set the field "HTML block title" to "Second block header"
|
||||
And I set the field "Text block title" to "Second block header"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
|
@ -1,42 +1,42 @@
|
||||
@block @block_html
|
||||
Feature: Adding and configuring multiple HTML blocks
|
||||
In order to have one or multiple HTML blocks on a page
|
||||
Feature: Adding and configuring multiple Text blocks
|
||||
In order to have one or multiple Text blocks on a page
|
||||
As admin
|
||||
I need to be able to create, configure and change HTML blocks
|
||||
I need to be able to create, configure and change Text blocks
|
||||
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
And I add the "Text" block
|
||||
|
||||
Scenario: Other users can not see HTML block that has not been configured
|
||||
Then "(new HTML block)" "block" should exist
|
||||
Scenario: Other users can not see Text block that has not been configured
|
||||
Then "(new text block)" "block" should exist
|
||||
And I log out
|
||||
And "(new HTML block)" "block" should not exist
|
||||
And "(new text block)" "block" should not exist
|
||||
And "block_html" "block" should not exist
|
||||
|
||||
Scenario: Other users can see HTML block that has been configured even when it has no header
|
||||
And I configure the "(new HTML block)" block
|
||||
Scenario: Other users can see Text block that has been configured even when it has no header
|
||||
And I configure the "(new text block)" block
|
||||
And I set the field "Content" to "Static text without a header"
|
||||
And I press "Save changes"
|
||||
Then I should not see "(new HTML block)"
|
||||
Then I should not see "(new text block)"
|
||||
And I log out
|
||||
And I am on homepage
|
||||
And "block_html" "block" should exist
|
||||
And I should see "Static text without a header" in the "block_html" "block"
|
||||
And I should not see "(new HTML block)"
|
||||
And I should not see "(new text block)"
|
||||
|
||||
Scenario: Adding multiple instances of HTML block on a page
|
||||
Scenario: Adding multiple instances of Text block on a page
|
||||
And I configure the "block_html" block
|
||||
And I set the field "HTML block title" to "The HTML block header"
|
||||
And I set the field "Text block title" to "The Text block header"
|
||||
And I set the field "Content" to "Static text with a header"
|
||||
And I press "Save changes"
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
And I set the field "HTML block title" to "The second HTML block header"
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I set the field "Text block title" to "The second Text block header"
|
||||
And I set the field "Content" to "Second block contents"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
Then I should see "Static text with a header" in the "The HTML block header" "block"
|
||||
And I should see "Second block contents" in the "The second HTML block header" "block"
|
||||
Then I should see "Static text with a header" in the "The Text block header" "block"
|
||||
And I should see "Second block contents" in the "The second Text block header" "block"
|
||||
|
@ -64,10 +64,10 @@ Feature: Add and configure blocks throughout the site
|
||||
Given I log in as "admin"
|
||||
And I am on homepage
|
||||
And I press "Customise this page"
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
And I add the "Text" block
|
||||
And I configure the "(new text block)" block
|
||||
And I set the following fields to these values:
|
||||
| HTML block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt=" |
|
||||
| Text block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt=" |
|
||||
| Content | Example |
|
||||
When I press "Save changes"
|
||||
Then I should see "Course overview"
|
||||
|
@ -21,7 +21,7 @@ Feature: Restrict which blocks can be added to Dashboard
|
||||
And I press "Customise this page"
|
||||
Then the add block selector should contain "Comments" block
|
||||
And the add block selector should contain "Courses" block
|
||||
And the add block selector should contain "HTML" block
|
||||
And the add block selector should contain "Text" block
|
||||
And the add block selector should contain "Tags" block
|
||||
|
||||
Scenario: Remove the ability to add the comments block to Dashboard
|
||||
@ -35,5 +35,5 @@ Feature: Restrict which blocks can be added to Dashboard
|
||||
And I press "Customise this page"
|
||||
Then the add block selector should not contain "Comments" block
|
||||
And the add block selector should not contain "Courses" block
|
||||
And the add block selector should not contain "HTML" block
|
||||
And the add block selector should not contain "Text" block
|
||||
And the add block selector should contain "Tags" block
|
||||
|
Loading…
x
Reference in New Issue
Block a user