diff --git a/core/src/utils/animation/animation.ts b/core/src/utils/animation/animation.ts index f7dd825439..6801e04496 100644 --- a/core/src/utils/animation/animation.ts +++ b/core/src/utils/animation/animation.ts @@ -38,7 +38,7 @@ export const createAnimation = () => { let ani: Animation; /** - * Destroy this animation and all child animations. + * Destroy the animation and all child animations. */ const destroy = () => { cleanUp(); diff --git a/core/src/utils/animation/test/animationbuilder/e2e.ts b/core/src/utils/animation/test/animationbuilder/e2e.ts new file mode 100644 index 0000000000..ffdde09f65 --- /dev/null +++ b/core/src/utils/animation/test/animationbuilder/e2e.ts @@ -0,0 +1,25 @@ +import { newE2EPage } from '@stencil/core/testing'; + +const navChanged = () => new Promise(resolve => window.addEventListener('ionRouteDidChange', resolve)); + +test('animation:backwards-compatibility animationbuilder', async () => { + const page = await newE2EPage({ url: '/src/utils/animation/test/animationbuilder?ionic:_testing=true' }); + const screenshotCompares = []; + + screenshotCompares.push(await page.compareScreenshot()); + + page.click('page-root ion-button.next'); + await page.waitFor(navChanged); + page.click('page-one ion-button.next'); + await page.waitFor(navChanged); + page.click('page-two ion-button.next'); + await page.waitFor(navChanged); + page.click('page-three ion-back-button'); + await page.waitFor(navChanged); + page.click('page-two ion-back-button'); + await page.waitFor(navChanged); + page.click('page-one ion-back-button'); + await page.waitFor(navChanged); + + screenshotCompares.push(await page.compareScreenshot()); +}); diff --git a/core/src/utils/animation/test/animationbuilder/index.html b/core/src/utils/animation/test/animationbuilder/index.html new file mode 100644 index 0000000000..2898bbd40c --- /dev/null +++ b/core/src/utils/animation/test/animationbuilder/index.html @@ -0,0 +1,179 @@ + + + +
+ +