AutorÃa | Ultima modificación | Ver Log |
@mod @mod_dataFeature: Users can navigate through the database activity using the tertiary navigationIn order to use the database moduleAs a userI need to navigate using the tertiary navigation.Background:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student1@example.com |And the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student |And the following "activities" exist:| activity | name | intro | course | idnumber || data | Test database name | Database intro | C1 | data1 || data | Database without fields | Database intro | C1 | data2 |And the following "mod_data > fields" exist:| database | type | name | description || data1 | text | field1 | Test field description || data1 | text | field2 | Test field 2 description |And the following "mod_data > entries" exist:| database | user | field1 | field2 || data1 | teacher1 | Teacher entry 1 | Some content 1 || data1 | teacher1 | Teacher entry 2 | Some content 2 |And the following "mod_data > presets" exist:| database | name | description | user || data1 | Saved preset by teacher1 | This preset has also a description | teacher1 |And I log in as "admin"And the following config values are set as admin:| enableportfolios | 1 |And I navigate to "Plugins > Portfolios > Manage portfolios" in site administrationAnd I set portfolio instance "File download" to "Enabled and visible"And I click on "Save" "button"And I log outAnd I am on the "Test database name" "data activity" page logged in as teacher1@javascriptScenario: The tertiary navigation in the Database page.Given I navigate to "Database" in current page administration# Teacher: List view.And I should not see "List view" in the "data-listview-content" "region"When I click on "Actions" "button"Then I should see "Import entries" in the ".entriesactions" "css_element"And I should see "Export entries" in the ".entriesactions" "css_element"And I should see "Export to portfolio" in the ".entriesactions" "css_element"And I press the escape key# Teacher: Single view.And I set the field "View mode tertiary navigation" to "Single view"And I should not see "Single view" in the "data-singleview-content" "region"And I click on "Actions" "button"And I should see "Import entries" in the ".entriesactions" "css_element"And I should see "Export entries" in the ".entriesactions" "css_element"And I should not see "Export to portfolio" in the ".entriesactions" "css_element"# Teacher: Database without fields.And I am on the "Database without fields" "data activity" pageAnd I should not see "Actions"# Student without entries: List view.And I am on the "Test database name" "data activity" page logged in as student1And I should not see "Actions"# Student without entries: Single view.And I set the field "View mode tertiary navigation" to "Single view"And I should not see "Actions"# Student with entries: Single view.But the following "mod_data > entries" exist:| database | user | field1 | field2 || data1 | student1 | Student entry 3 | Some content 3 |And I should not see "Actions"# Student with entries: List view.And I set the field "View mode tertiary navigation" to "List view"And I click on "Actions" "button"And I should not see "Import entries" in the ".entriesactions" "css_element"And I should not see "Export entries" in the ".entriesactions" "css_element"And I should see "Export to portfolio" in the ".entriesactions" "css_element"@javascriptScenario: The tertiary navigation in the Presets page.Given I navigate to "Presets" in current page administrationWhen I click on "Actions" "button"Then I should see "Import preset" in the ".presetsactions" "css_element"And I should see "Export preset" in the ".presetsactions" "css_element"And I should see "Publish preset on this site" in the ".presetsactions" "css_element"And I press the escape key# Database without fields.But I am on the "Database without fields" "data activity" pageAnd I navigate to "Presets" in current page administrationAnd I click on "Actions" "button"And I should see "Import preset" in the ".presetsactions" "css_element"And I should not see "Export preset" in the ".presetsactions" "css_element"And I should not see "Publish preset on this site" in the ".presetsactions" "css_element"Scenario: The tertiary navigation in the Presets preview page.Given I navigate to "Presets" in current page administrationWhen I follow "Saved preset by teacher1"Then I should see "Preview of Saved preset by teacher1"And "Use this preset" "button" should exist# Single viewAnd I set the field "Templates tertiary navigation" to "Single view template"And I should see "Preview of Saved preset by teacher1"And "Use this preset" "button" should exist@javascriptScenario: The tertiary navigation in the Fields page.Given I navigate to "Fields" in current page administrationWhen I open the action menu in "field1" "table_row"Then I should see "Edit"And I should see "Delete"And I press the escape keyAnd I should not see "Actions"@javascriptScenario: The tertiary navigation in the Templates page.Given I navigate to "Templates" in current page administrationWhen I click on "Actions" "button"Then I should see "Export preset" in the ".presetsactions" "css_element"And I should see "Publish preset on this site" in the ".presetsactions" "css_element"And I press the escape keyAnd I should see "Add entry template"# List template.And I set the field "Templates tertiary navigation" to "List view template"And I should not see "Add entry template"And I should see "Header"And I should see "Repeated entry"And I should see "Footer"