mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Fixed amp not rendering content
refs: 9d7049cd3
- I missed that the amp_content helper was meant to be async when refactoring
- I have updated our proper amp acceptance tests to catch the content not rendering as this is a regression, this should definitely have been caught
- Added missing async property to amp_content helper to fix the issue
This commit is contained in:
parent
fd678ddae6
commit
d724c8f95d
2 changed files with 5 additions and 1 deletions
|
@ -201,3 +201,5 @@ function ampContent() {
|
|||
}
|
||||
|
||||
module.exports = ampContent;
|
||||
|
||||
module.exports.async = true;
|
||||
|
|
|
@ -208,8 +208,10 @@ describe('Default Frontend routing', function () {
|
|||
|
||||
$('style[amp-custom]').length.should.equal(1);
|
||||
|
||||
res.text.should.containEql(':root {--ghost-accent-color: #FF1A75;}');
|
||||
// This asserts we should have some content (and not [object Promise] !)
|
||||
$('.post-content p').length.should.be.greaterThan(0);
|
||||
|
||||
res.text.should.containEql(':root {--ghost-accent-color: #FF1A75;}');
|
||||
res.text.should.not.containEql('__GHOST_URL__');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue