Visitable
Methods
Table of Contents
visitable
Parameters
path
string Full path of the route to visit
Examples
import { create, visitable } from 'ember-cli-page-object';
const page = create({
visit: visitable('/users')
});
// visits '/users'
await page.visit();
import { create, visitable } from 'ember-cli-page-object';
const page = create({
visit: visitable('/users/:user_id')
});
// visits '/users/10'
await page.visit({ user_id: 10 });
import { create, visitable } from 'ember-cli-page-object';
const page = create({
visit: visitable('/users')
});
// visits '/users?name=john'
await page.visit({ name: 'john' });
import { create, visitable } from 'ember-cli-page-object';
const page = create({
visit: visitable('/users/:user_id')
});
// visits '/users/1?name=john'
await page.visit({ user_id: 1, name: 'john' });
- Throws any Will throw an error if dynamic segments are not filled.
Note: An error instance may contain a
cause.error
property with the original error thrown by an underlying test helper.
Returns Descriptor