From ca1a09f98b82753cf11399e9ae3f65efa82b3d54 Mon Sep 17 00:00:00 2001 From: Robert Rosman Date: Sat, 17 Dec 2016 22:09:00 +0100 Subject: [PATCH 1/2] Only render Live editor save button when content type is set --- app/view/twig/_nav/_primary.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/view/twig/_nav/_primary.twig b/app/view/twig/_nav/_primary.twig index 16379fd3640..921fd27ce6b 100644 --- a/app/view/twig/_nav/_primary.twig +++ b/app/view/twig/_nav/_primary.twig @@ -29,12 +29,14 @@ + {% if context.contenttype is defined %}
  • {{ __('contenttypes.generic.save', {'%contenttype%': context.contenttype.slug}) }}
  • + {% endif %}
  • From 7aa0962a176abc236c237fb4e4fb72c42e9ab1be Mon Sep 17 00:00:00 2001 From: Robert Rosman Date: Mon, 19 Dec 2016 08:21:13 +0100 Subject: [PATCH 2/2] Making the tests pass --- .../acceptance/101-BackendEditor/BackendEditorCest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/codeception/acceptance/101-BackendEditor/BackendEditorCest.php b/tests/codeception/acceptance/101-BackendEditor/BackendEditorCest.php index a6b0b96bd56..657c88a1739 100644 --- a/tests/codeception/acceptance/101-BackendEditor/BackendEditorCest.php +++ b/tests/codeception/acceptance/101-BackendEditor/BackendEditorCest.php @@ -82,7 +82,7 @@ public function createRecordsTest(\AcceptanceTester $I) $I->fillField('#teaser', 'Woop woop woop! Crazy nice stuff inside!'); $I->fillField('#body', 'Take it, take it! I have three more of these!'); - $I->click('Save Page'); + $I->click('Save Page', "#savecontinuebutton"); $I->see('The new Page has been saved.'); $I->see('A page I made'); @@ -232,7 +232,7 @@ public function checkTemplateFieldsTest(\AcceptanceTester $I) $I->see('Template', 'a[data-toggle=tab]'); $I->fillField('#templatefields-section_1', 'This is the contact text'); - $I->click('Save Page'); + $I->click('Save Page', "#savecontinuebutton"); $I->click('CONTACT PAGE'); /*