AutorÃa | Ultima modificación | Ver Log |
@block @block_dash @dash_feature @javascript @_file_uploadFeature: Add a dash to an admin pagesIn order to check the dash featuersI can add the dash block to the dashboardBackground:Given the following "categories" exist:| name | category | idnumber || Category 01 | 0 | CAT1 || Category 02 | 0 | CAT2 |And the following "courses" exist:| fullname | shortname | category | enablecompletion || Course 1 | C1 | CAT1 | 1 || Course 2 | C2 | CAT1 | 0 || Course 3 | C3 | CAT2 | 1 || Course 4 | C4 | CAT2 | 1 |And the following "users" exist:| username | firstname | lastname | email || student1 | Student | First | student1@example.com || teacher1 | Teacher | First | teacher1@example.com || student2 | Student | Two | student2@example.com |And the following "activities" exist:| activity | course | idnumber | section | name | intro | completion | completionview || page | C1 | page1 | 0 | Test page name | Test page description | 2 | 1 || page | C1 | page2 | 1 | Test page name 2 | Test page description | 2 | 1 |And the following "course enrolments" exist:| user | course | role || student1 | C1 | student || student1 | C2 | student || teacher1 | C1 | teacher || teacher1 | C2 | teacher |Scenario: Global Settings : Show header featureAnd I log in as "admin"And I navigate to "Plugins > Blocks > Dash" in site administrationThen I set the field "Show header" to "Hidden"Then I press "Save changes"And I navigate to "Appearance > Default Dashboard page" in site administrationAnd I turn editing mode onAnd I create dash "Users" datasourceThen I configure the "New Dash" blockAnd I set the field "Block title" to "Datasource: Users"And I set the following fields to these values:| Region | content |And I press "Save changes"Then I should see "Datasource: Users"Then I turn editing mode offThen I should not see "Datasource: Users"And I click on "Reset Dashboard for all users" "button"Then I log in as "student1"Then I follow "Dashboard"Then I turn editing mode onThen I should see "Datasource: Users"Then I turn editing mode offThen I should not see "Datasource: Users"Then I log in as "admin"And I navigate to "Plugins > Blocks > Dash" in site administrationThen I set the field "Show header" to "Visible"Then I press "Save changes"And I navigate to "Appearance > Default Dashboard page" in site administrationAnd I turn editing mode onAnd I create dash "Users" datasourceThen I configure the "New Dash" blockAnd I set the field "Block title" to "Datasource: Users Report"And I set the following fields to these values:| Region | content |And I press "Save changes"Then I should see "Datasource: Users Report"Then I turn editing mode offThen I should see "Datasource: Users Report"And I click on "Reset Dashboard for all users" "button"Then I log in as "student1"Then I follow "Dashboard"Then I turn editing mode onThen I should see "Datasource: Users Report"Then I turn editing mode offThen I should see "Datasource: Users Report"Scenario: Block Settings : Show header featureAnd I log in as "admin"And I navigate to "Plugins > Blocks > Dash" in site administrationThen I set the field "Show header" to "Hidden"Then I press "Save changes"And I navigate to "Appearance > Default Dashboard page" in site administrationAnd I turn editing mode onAnd I create dash "Users" datasourceThen I configure the "New Dash" blockAnd I set the field "Block title" to "Datasource: Users"And I set the following fields to these values:| Region | content || Show header | Hidden |And I press "Save changes"Then I should see "Datasource: Users"Then I turn editing mode offThen I should not see "Datasource: Users"And I click on "Reset Dashboard for all users" "button"Then I log in as "student1"Then I follow "Dashboard"Then I turn editing mode onThen I should see "Datasource: Users"Then I turn editing mode offThen I should not see "Datasource: Users"Scenario: Block Settings: Dash settings improvementsAnd I log in as "admin"#General setting css classesAnd I navigate to "Plugins > Blocks > Dash" in site administrationAnd I set the following fields to these values:| CSS classes | dash-card-block |And I press "Save changes"# Dash block setting css classesAnd I follow dashboardAnd I navigate to "Appearance > Default Dashboard page" in site administrationAnd I turn dash block editing mode onAnd I add the "Dash" blockAnd I configure the "New Dash" blockAnd I expand all fieldsetsAnd I set the following fields to these values:| CSS classes | dash-element, dash-card |And I press "Save changes"And I click on "Reset Dashboard for all users" "button"And I follow dashboardAnd ".dash-element.dash-card" "css_element" should exist in the ".block-region .block_dash" "css_element"# Gradient colorAnd I navigate to "Appearance > Default Dashboard page" in site administrationAnd I turn dash block editing mode onAnd I add the "Dash" blockAnd I configure the "New Dash" blockAnd I expand all fieldsetsAnd I set the following fields to these values:| Background gradient | linear-gradient(90deg, rgba(255, 210, 0, .2) 0%, rgba(70, 210, 251, .2) 100%) |And I press "Save changes"And I click on "Reset Dashboard for all users" "button"And I follow dashboardAnd I check dash css "linear-gradient(90deg, rgba(255, 210, 0, 0.2) 0%, rgba(70, 210, 251, 0.2) 100%)" "section.block_dash:nth-of-type(2)" "background-image"# Font color pickerAnd I navigate to "Appearance > Default Dashboard page" in site administrationAnd I turn dash block editing mode onAnd I add the "Dash" blockAnd I click on "Users" "radio"And I configure the "New Dash" blockAnd I expand all fieldsetsAnd I set the following fields to these values:| Block title | Users 01|| Font color | #c60061 |And I press "Save changes"And I click on "Reset Dashboard for all users" "button"And I follow dashboardAnd I check dash css "rgb(198, 0, 97)" "section.block_dash:nth-of-type(3) .card-title" "color"# Border colorAnd I navigate to "Appearance > Default Dashboard page" in site administrationAnd I turn dash block editing mode onAnd I add the "Dash" blockAnd I configure the "New Dash" blockAnd I expand all fieldsetsAnd I set the following fields to these values:| Block title | Border settings || Border | Visible |And I press "Save changes"And I click on "Reset Dashboard for all users" "button"And I follow dashboardAnd I check dash css "1px solid rgba(0, 0, 0, 0.125)" "section.block_dash:nth-of-type(4)" "border"Scenario: Default fields after selecting the data sourceAnd I log in as "admin"# Users data sourceAnd I navigate to "Appearance > Default Dashboard page" in site administrationAnd I turn dash block editing mode onAnd I add the "Dash" blockAnd I click on "Users" "radio"And I configure the "New Dash" blockAnd I expand all fieldsetsAnd I set the following fields to these values:| Block title | Users |And I press "Save changes"And I click on "Reset Dashboard for all users" "button"And I follow dashboardAnd I should see "Student"And I should see "First"And I should see "student1@example.com"