test(radio): migrate e2e tests

references #15803
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
Cam Wiegert
2018-10-01 14:31:25 -05:00
gitea-unlock(16/)
parent 8f82743201
commit 5aaacbc91b
octicon-diff(16/tw-mr-1) 4 changed files with 20 additions and 38 deletions

19
core/src/components/radio/test/basic/e2e.js
View File

@@ -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/radio/test/basic?ionic:mode=${platform}`);
}
}
platforms.forEach(platform => {
describe('radio/basic', () => {
register('should init', driver => {
const page = new E2ETestPage(driver, platform);
return page.navigate('#content');
});
});
});

10
core/src/components/radio/test/basic/e2e.ts Normal file
View File

@@ -0,0 +1,10 @@
import { newE2EPage } from '@stencil/core/testing';
it('radio: basic', async () => {
const page = await newE2EPage({
url: '/src/components/radio/test/basic?ionic:animated=false'
});
const compare = await page.compareScreenshot();
expect(compare).toMatchScreenshot();
});

19
core/src/components/radio/test/standalone/e2e.js
View File

@@ -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/radio/test/standalone?ionic:mode=${platform}`);
}
}
platforms.forEach(platform => {
describe('radio/standalone', () => {
register('should init', driver => {
const page = new E2ETestPage(driver, platform);
return page.navigate('#radio2');
});
});
});

10
core/src/components/radio/test/standalone/e2e.ts Normal file
View File

@@ -0,0 +1,10 @@
import { newE2EPage } from '@stencil/core/testing';
it('radio: standalone', async () => {
const page = await newE2EPage({
url: '/src/components/radio/test/standalone?ionic:animated=false'
});
const compare = await page.compareScreenshot();
expect(compare).toMatchScreenshot();
});