refactor(e2e-test): wrap the test registration

This commit is contained in:
Ken Sodemann
2017-10-28 06:05:00 -05:00
parent c66a29726e
commit 9be3085f91
5 changed files with 69 additions and 43 deletions

View File

@@ -1,12 +1,11 @@
const webdriver = require('selenium-webdriver');
const driver = new webdriver.Builder().forBrowser('chrome').build();
const By = webdriver.By;
const until = webdriver.until;
const register = require('../../../../scripts/register-e2e-test');
describe('button: basic', () => {
after(() => {
return driver.quit();
});
it('navigates', () => {
register('navigates', (driver) => {
return driver.navigate().to('http://localhost:3333/src/components/button/test/basic.html');
});
});

View File

@@ -1,12 +1,11 @@
const webdriver = require('selenium-webdriver');
const driver = new webdriver.Builder().forBrowser('chrome').build();
const By = webdriver.By;
const until = webdriver.until;
const register = require('../../../../scripts/register-e2e-test');
describe('button: toolbar', () => {
after(() => {
return driver.quit();
});
it('navigates', () => {
register('navigates', (driver) => {
return driver.navigate().to('http://localhost:3333/src/components/button/test/toolbar.html');
});
});