-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #636 from ZeitOnline/fix/form-error
ZO-4801: Display request errors that occur in JS forms
- Loading branch information
Showing
8 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ZO-4801: Display request errors that occur in JS forms (toggle: `inlineform_alert_error`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from zeit.cms.content.sources import FEATURE_TOGGLES | ||
import zeit.cms.testing | ||
|
||
|
||
class MainTemplateTest(zeit.cms.testing.ZeitCmsBrowserTestCase): | ||
def test_passes_feature_toggles_to_javascript(self): | ||
b = self.browser | ||
b.open('/repository') | ||
self.assertEllipsis( | ||
'...var feature_toggles = {..."article_agencies": true, ...};...', b.contents | ||
) | ||
|
||
# Test overrides also work | ||
FEATURE_TOGGLES.unset('article_agencies') | ||
b.open('/repository') | ||
self.assertEllipsis( | ||
'...var feature_toggles = {..."article_agencies": false, ...};...', b.contents | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters