You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
856 B

import { App, NewNetwork } from './pages';
import { assertNoConsoleErrors, pageUrl, getPageUrl } from './helpers';
fixture`NewNetwork`
.page(pageUrl)
.beforeEach(App.clickNewNetworkBtn)
.afterEach(assertNoConsoleErrors);
test('should be on the route /network', async t => {
await t.expect(getPageUrl()).match(/.*#\/network$/);
});
test('should add a new network', async t => {
await t
.typeText(NewNetwork.nameInput, 'test network')
.click(NewNetwork.submitBtn)
.expect(getPageUrl())
.match(/.*#\/$/)
.expect(NewNetwork.getNotificationText())
.eql('Created network: test network');
});
test('should display new network in the network list', async t => {
await t
.typeText(NewNetwork.nameInput, 'test network')
.click(NewNetwork.submitBtn)
.expect(App.getFirstNetworkText())
.eql('test network');
});