Skip to content

Commit

Permalink
Fix Story tests. (#26464)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmajoulet authored and Enriqe committed Jan 24, 2020
1 parent 695fd66 commit b8796c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/amp-story/1.0/test/test-full-bleed-animations.js
Expand Up @@ -105,6 +105,7 @@ describes.realWin(
) {
const img = win.document.createElement('amp-img');
img.setAttribute('animate-in', animationName);
img.setAttribute('layout', 'fill');

const gridLayer = win.document.createElement('amp-story-grid-layer');
opt_gridLayerTempalate = opt_gridLayerTempalate.length
Expand All @@ -121,6 +122,7 @@ describes.realWin(
' attached as a child of a grid layer with fill template.',
() => {
createPages(ampStory.element, 2, ['cover', 'page-1']);
ampStory.buildCallback();
return ampStory
.layoutCallback()
.then(() => {
Expand Down Expand Up @@ -152,6 +154,7 @@ describes.realWin(
'template other than `fill`.',
() => {
createPages(ampStory.element, 2, ['cover', 'page-1']);
ampStory.buildCallback();
return ampStory
.layoutCallback()
.then(() => {
Expand Down Expand Up @@ -182,6 +185,7 @@ describes.realWin(
'animation is used.',
() => {
createPages(ampStory.element, 2, ['cover', 'page-1']);
ampStory.buildCallback();
return ampStory
.layoutCallback()
.then(() => {
Expand Down
4 changes: 4 additions & 0 deletions extensions/amp-story/1.0/test/test-live-story-manager.js
Expand Up @@ -85,6 +85,7 @@ describes.realWin(

it('should build a dynamic live-list', async () => {
createPages(ampStory.element, 2, ['cover', 'page-1']);
ampStory.buildCallback();
liveStoryManager = new LiveStoryManager(ampStory);
liveStoryManager.build();

Expand All @@ -96,6 +97,7 @@ describes.realWin(

it('live-list id should equal story id + dymanic-list combo', async () => {
createPages(ampStory.element, 2, ['cover', 'page-1']);
ampStory.buildCallback();
liveStoryManager = new LiveStoryManager(ampStory);
liveStoryManager.build();

Expand All @@ -109,6 +111,7 @@ describes.realWin(

it('should throw if no story id is set', () => {
createPages(ampStory.element, 2, ['cover', 'page-1']);
ampStory.buildCallback();
liveStoryManager = new LiveStoryManager(ampStory);
ampStory.element.removeAttribute('id');

Expand All @@ -123,6 +126,7 @@ describes.realWin(

it('should append new page from server to client in update', async () => {
createPages(ampStory.element, 2, ['cover', 'page-1']);
ampStory.buildCallback();
expect(ampStory.element.children.length).to.equal(2);
liveStoryManager = new LiveStoryManager(ampStory);
liveStoryManager.build();
Expand Down

0 comments on commit b8796c2

Please sign in to comment.