From 53cd9dcf1c96318dcf1e3f3283d0620e8b7ca74a Mon Sep 17 00:00:00 2001 From: bergice Date: Fri, 30 Nov 2018 13:28:04 +1300 Subject: [PATCH] Add test to make sure you can create a page under another page --- tests/behat/features/create-a-page.feature | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/behat/features/create-a-page.feature b/tests/behat/features/create-a-page.feature index ea45ba13..29a1e101 100644 --- a/tests/behat/features/create-a-page.feature +++ b/tests/behat/features/create-a-page.feature @@ -3,12 +3,27 @@ Feature: Create a page I want to create a page in the CMS So that I can grow my website - @javascript - Scenario: I can create a page from the pages section + Background: + Given a "page" "MyPage" Given I am logged in with "ADMIN" permissions And I go to "/admin/pages" + Then I should see "MyPage" in the tree And I should see a "Add new" button in CMS Content Toolbar + + @javascript + Scenario: I can create a page from the pages section + Given I go to "/admin/pages" When I press the "Add new" button And I select the "Page" radio button And I press the "Create" button Then I should see an edit page form + + @javascript + Scenario: I can create a page under another page + Given I go to "/admin/pages" + When I press the "Add new" button + And I select the "Under another page" radio button + And I select "MyPage" in the "#Form_AddForm_ParentID_Holder" tree dropdown + And I select the "Page" radio button + And I press the "Create" button + Then I should see an edit page form