test(range): migrate e2e tests

references #15803
This commit is contained in:
Cam Wiegert
2018-10-01 14:24:39 -05:00
parent 25170446d0
commit 95f7a4a61f
5 changed files with 22 additions and 40 deletions

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

View File

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

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

View File

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

View File

@ -14,11 +14,11 @@
<ion-range value="60" color="light"></ion-range>
<ion-range value="80" color="dark"></ion-range>
<ion-range pin="true" color="secondary" value="86">
<ion-icon size="small" name="ios-sunny-outline" slot="start"></ion-icon>
<ion-icon size="small" name="ios-sunny" slot="start"></ion-icon>
<ion-icon name="ios-sunny" slot="end"></ion-icon>
</ion-range>
<ion-range pin="true" color="danger" value="54">
<ion-icon size="small" name="ios-thermometer-outline" slot="start"></ion-icon>
<ion-icon size="small" name="ios-thermometer" slot="start"></ion-icon>
<ion-icon name="ios-thermometer" slot="end"></ion-icon>
</ion-range>
<ion-range value="50" pin class="custom"></ion-range>