| 1 | efrain | 1 | @tool @tool_admin_presets @javascript
 | 
        
           |  |  | 2 | Feature: I can add a new preset with current settings
 | 
        
           |  |  | 3 |   | 
        
           |  |  | 4 |   Background:
 | 
        
           |  |  | 5 |     Given I log in as "admin"
 | 
        
           |  |  | 6 |     And I navigate to "Site admin presets" in site administration
 | 
        
           |  |  | 7 |   | 
        
           |  |  | 8 |   Scenario: Export settings with an existing name
 | 
        
           |  |  | 9 |     Given I should see "Starter"
 | 
        
           |  |  | 10 |     And I click on "Create preset" "button"
 | 
        
           |  |  | 11 |     And I set the field "Name" to "Starter"
 | 
        
           |  |  | 12 |     And I set the field "Description" to "Non-core starter preset"
 | 
        
           |  |  | 13 |     When I click on "Create preset" "button"
 | 
        
           | 1441 | ariadna | 14 |     Then the following should exist in the "reportbuilder-table" table:
 | 
        
           | 1 | efrain | 15 |       | Name    | Description                                                                                                                        |
 | 
        
           |  |  | 16 |       | Starter | Moodle with all of the most popular features, including Assignment, Feedback, Forum, H5P, Quiz and Completion tracking.            |
 | 
        
           |  |  | 17 |       | Full    | All the Starter features plus External (LTI) tool, SCORM, Workshop, Analytics, Badges, Competencies, Learning plans and lots more. |
 | 
        
           |  |  | 18 |       | Starter | Non-core starter preset                                                                                                            |
 | 
        
           |  |  | 19 |   | 
        
           |  |  | 20 |   Scenario: Export current settings
 | 
        
           |  |  | 21 |     Given I click on "Create preset" "button"
 | 
        
           |  |  | 22 |     And I set the field "Name" to "Current"
 | 
        
           |  |  | 23 |     And I click on "Create preset" "button"
 | 
        
           | 1441 | ariadna | 24 |     And I press "Review settings and apply" action in the "Current" report row
 | 
        
           | 1 | efrain | 25 |     And I should not see "Setting changes"
 | 
        
           |  |  | 26 |     And I click on "Continue" "button"
 | 
        
           |  |  | 27 |     And the following config values are set as admin:
 | 
        
           |  |  | 28 |       | enableportfolios | 1 |
 | 
        
           | 1441 | ariadna | 29 |     And I press "Review settings and apply" action in the "Current" report row
 | 
        
           | 1 | efrain | 30 |     Then I should see "Setting changes"
 |