|
| 1 | +@javascript @retry @job6 |
| 2 | +Feature: Restore to draft |
| 3 | + As a CMS author |
| 4 | + I want to restore archived pages with elemental areas to draft version |
| 5 | + |
| 6 | + Background: |
| 7 | + Given I add an extension "DNADesign\Elemental\Extensions\ElementalPageExtension" to the "Page" class |
| 8 | + And a "page" "MyPage" |
| 9 | + And the "group" "EDITOR" has permissions "Access to 'Pages' section" and "Access to 'Archive' section" |
| 10 | + And I am logged in as a member of "EDITOR" group |
| 11 | + And I go to "/admin/pages" |
| 12 | + And I should see "MyPage" |
| 13 | + And I click on "MyPage" in the tree |
| 14 | + And I press the "Publish" button |
| 15 | + |
| 16 | + Scenario: I can restore archived elemental block to draft version |
| 17 | + When I press the "Add block" button |
| 18 | + Then I click on the ".font-icon-block-content" element |
| 19 | + Then I should see "Untitled Content block" in the ".element-editor__element" element |
| 20 | + And I click on the ".element-editor__element" element |
| 21 | + And I fill in "Form_ElementForm_1_Title" with "MyBlock" |
| 22 | + When I press the "View actions" button |
| 23 | + And I press the "Publish" button |
| 24 | + And I wait 1 second |
| 25 | + And I click "More options" in the "#ActionMenus" element |
| 26 | + And I press the "Unpublish and archive" button, confirming the dialog |
| 27 | + And I go to "/admin/archive" |
| 28 | + Then I should see "MyPage" in the "#Form_EditForm" element |
| 29 | + Then I click "MyPage" in the "#Form_EditForm" element |
| 30 | + When I press the "Restore to draft" button |
| 31 | + Then I should see "Successfully restored the page" in the "#Form_EditForm" element |
| 32 | + And I go to "/admin/pages" |
| 33 | + And I click on "MyPage" in the tree |
| 34 | + Then I should see "MyBlock" in the ".element-editor__element" element |
0 commit comments