Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only render Live editor save button when content type is set #6182

Merged
merged 2 commits into from
Dec 19, 2016

Conversation

robertrosman
Copy link
Contributor

This PR is a follow up on #6178. Instead of trying to render the save button on every page in the back-end, only try when we're actually editing content. Otherwise Bolt will break since no contenttype is set.

@GwendolenLynch
Copy link
Contributor

That moment you look at the test failures and go; "Whaaaaaaaaaaaaat the?!"

I'll have a dig for you.

@GwendolenLynch
Copy link
Contributor

This will get your tests passing:

diff --git a/tests/codeception/acceptance/101-BackendEditor/BackendEditorCest.php b/tests/codeception/acceptance/101-BackendEditor/BackendEditorCest.php
index a6b0b96..7538160 100644
--- a/tests/codeception/acceptance/101-BackendEditor/BackendEditorCest.php
+++ b/tests/codeception/acceptance/101-BackendEditor/BackendEditorCest.php
@@ -82,7 +82,7 @@ class BackendEditorCest extends AbstractAcceptanceTest
         $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 @@ class BackendEditorCest extends AbstractAcceptanceTest
         $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');
         /*

@robertrosman
Copy link
Contributor Author

Thanks @GawainLynch! I'm not too familiar with testing, so I guess I have some reading up to do.

@GwendolenLynch
Copy link
Contributor

👍

@GwendolenLynch GwendolenLynch merged commit f9983ce into bolt:release/3.2 Dec 19, 2016
@GwendolenLynch GwendolenLynch added this to the Bolt 3.2 - Feature release milestone Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants