From 18b347b4e9afaf97c6835526852b37adcc4ac14d Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 16 Apr 2019 10:51:23 -0400 Subject: [PATCH] fix(slides): allow zoom to work fixes #17981 --- core/src/components/slide/slide.tsx | 3 +- core/src/components/slides/test/image/e2e.ts | 12 ++ .../components/slides/test/image/index.html | 159 ++++++++++++++++++ 3 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 core/src/components/slides/test/image/e2e.ts create mode 100644 core/src/components/slides/test/image/index.html diff --git a/core/src/components/slide/slide.tsx b/core/src/components/slide/slide.tsx index 4708561e7f..0033f3c51c 100644 --- a/core/src/components/slide/slide.tsx +++ b/core/src/components/slide/slide.tsx @@ -21,7 +21,8 @@ export class Slide implements ComponentInterface { hostData() { return { class: { - 'swiper-slide': true + 'swiper-slide': true, + 'swiper-zoom-container': true } }; } diff --git a/core/src/components/slides/test/image/e2e.ts b/core/src/components/slides/test/image/e2e.ts new file mode 100644 index 0000000000..63e1719f0d --- /dev/null +++ b/core/src/components/slides/test/image/e2e.ts @@ -0,0 +1,12 @@ +import { newE2EPage } from '@stencil/core/testing'; + +test('slides: image', async () => { + const page = await newE2EPage({ + url: '/src/components/slides/test/image?ionic:_testing=true' + }); + + await page.waitFor(500); + + const compare = await page.compareScreenshot(); + expect(compare).toMatchScreenshot(); +}); diff --git a/core/src/components/slides/test/image/index.html b/core/src/components/slides/test/image/index.html new file mode 100644 index 0000000000..d65f7f5333 --- /dev/null +++ b/core/src/components/slides/test/image/index.html @@ -0,0 +1,159 @@ + + + + + + Slides - Image + + + + + + + + + + + + + + + + + + + + + + + + + Slide Prev + Slide Next + Get Active Index + Get Previous Index + + Is the End? + Is the beginning? + + Slide to slide index 2 + Get slide length + Start auto play + Stop auto play + Set options + + + + + + +