first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,39 @@
@block @block_html @core_block
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 Text blocks
@javascript
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 "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"
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 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 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 "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 text block)"
And I configure the "block_html" block
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 Text block header" "block" should exist
And I should see "Static text with a header" in the "The Text block header" "block"
@@ -0,0 +1,35 @@
@block @block_html
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 Text block in a course
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| 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 "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 "Text block title" to "First block header"
And I press "Save changes"
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 "Text block title" to "Second block header"
And I press "Save changes"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I should see "First block content" in the "First block header" "block"
And I should see "Second block content" in the "Second block header" "block"
@@ -0,0 +1,42 @@
@block @block_html
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 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 "Text" block
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 text block)" "block" should not exist
And "block_html" "block" should not exist
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 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 text block)"
Scenario: Adding multiple instances of Text block on a page
And I configure the "block_html" block
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 "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 Text block header" "block"
And I should see "Second block contents" in the "The second Text block header" "block"