From 7751a6cee733610b6d8419d3a919f7885b15068d Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Fri, 16 Sep 2016 11:44:07 +1200 Subject: [PATCH] Behat test cases for site tree duplication (#995) --- tests/behat/features/duplicate-a-page.feature | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/behat/features/duplicate-a-page.feature diff --git a/tests/behat/features/duplicate-a-page.feature b/tests/behat/features/duplicate-a-page.feature new file mode 100644 index 00000000..96a3a5dc --- /dev/null +++ b/tests/behat/features/duplicate-a-page.feature @@ -0,0 +1,24 @@ +Feature: Duplicate a page + As an author + I want to duplicate a page in the CMS + So that I can grow my website + + Background: + Given I am logged in with "ADMIN" permissions + Given a "page" "Page1" + And the "page" "Page1a" is a child of the "page" "Page1" + And the "page" "Page1b" is a child of the "page" "Page1" + And the "page" "Page1b1" is a child of the "page" "Page1b" + + @javascript + Scenario: I can duplicate a page in the pages section + When I go to "/admin/pages" + And I right click on "Page1" in the tree + And I hover on "Duplicate" in the context menu + And I click on "This page and subpages" in the context menu + Then I should see a "Duplicated 'Page1' and children successfully" notice + + When I fill in "Title" with "Duplicate Page" + And I press the "Save & publish" button + Then I should see "Page1" in the tree + And I should see "Duplicate Page" in the tree