From f58e18fbe6963077043a9d94abe23a7293fd2148 Mon Sep 17 00:00:00 2001 From: Cam Wiegert Date: Mon, 1 Oct 2018 11:00:40 -0500 Subject: [PATCH] test(textarea): migrate e2e tests references #15803 --- .../src/components/textarea/test/basic/e2e.js | 19 ------------------- .../src/components/textarea/test/basic/e2e.ts | 10 ++++++++++ .../textarea/test/standalone/e2e.js | 19 ------------------- .../textarea/test/standalone/e2e.ts | 10 ++++++++++ 4 files changed, 20 insertions(+), 38 deletions(-) delete mode 100644 core/src/components/textarea/test/basic/e2e.js create mode 100644 core/src/components/textarea/test/basic/e2e.ts delete mode 100644 core/src/components/textarea/test/standalone/e2e.js create mode 100644 core/src/components/textarea/test/standalone/e2e.ts diff --git a/core/src/components/textarea/test/basic/e2e.js b/core/src/components/textarea/test/basic/e2e.js deleted file mode 100644 index d623354700..0000000000 --- a/core/src/components/textarea/test/basic/e2e.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const { By, until } = require('selenium-webdriver'); -const { register, Page, platforms } = require('../../../../../scripts/e2e'); - -class E2ETestPage extends Page { - constructor(driver, platform) { - super(driver, `http://localhost:3333/src/components/textarea/test/basic?ionic:mode=${platform}`); - } -} - -platforms.forEach(platform => { - describe('textarea/basic', () => { - register('should init', driver => { - const page = new E2ETestPage(driver, platform); - return page.navigate('#content'); - }); - }); -}); diff --git a/core/src/components/textarea/test/basic/e2e.ts b/core/src/components/textarea/test/basic/e2e.ts new file mode 100644 index 0000000000..c3c81d0d13 --- /dev/null +++ b/core/src/components/textarea/test/basic/e2e.ts @@ -0,0 +1,10 @@ +import { newE2EPage } from '@stencil/core/testing'; + +it('textarea: basic', async () => { + const page = await newE2EPage({ + url: '/src/components/textarea/test/basic?ionic:animated=false' + }); + + const compare = await page.compareScreenshot(); + expect(compare).toMatchScreenshot(); +}); diff --git a/core/src/components/textarea/test/standalone/e2e.js b/core/src/components/textarea/test/standalone/e2e.js deleted file mode 100644 index 2f866dc48e..0000000000 --- a/core/src/components/textarea/test/standalone/e2e.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const { By, until } = require('selenium-webdriver'); -const { register, Page, platforms } = require('../../../../../scripts/e2e'); - -class E2ETestPage extends Page { - constructor(driver, platform) { - super(driver, `http://localhost:3333/src/components/textarea/test/standalone?ionic:mode=${platform}`); - } -} - -platforms.forEach(platform => { - describe('textarea/standalone', () => { - register('should init', driver => { - const page = new E2ETestPage(driver, platform); - return page.navigate(); - }); - }); -}); diff --git a/core/src/components/textarea/test/standalone/e2e.ts b/core/src/components/textarea/test/standalone/e2e.ts new file mode 100644 index 0000000000..e23dcdad04 --- /dev/null +++ b/core/src/components/textarea/test/standalone/e2e.ts @@ -0,0 +1,10 @@ +import { newE2EPage } from '@stencil/core/testing'; + +it('textarea: standalone', async () => { + const page = await newE2EPage({ + url: '/src/components/textarea/test/standalone?ionic:animated=false' + }); + + const compare = await page.compareScreenshot(); + expect(compare).toMatchScreenshot(); +});