Methods

visitable

addon/-private/properties/visitable.js:85-104

Parameters

  • path string Full path of the route to visit

Examples

const page = PageObject.create({
  visit: PageObject.visitable('/users')
});

// visits '/users'
page.visit();
const page = PageObject.create({
  visit: PageObject.visitable('/users/:user_id')
});

// visits '/users/10'
page.visit({ user_id: 10 });
const page = PageObject.create({
  visit: PageObject.visitable('/users')
});

// visits '/users?name=john'
page.visit({ name: 'john' });
const page = PageObject.create({
  visit: PageObject.visitable('/users/:user_id')
});

// visits '/users/1?name=john'
page.visit({ user_id: 1, name: 'john' });

Returns Descriptor