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'
page.visit();
import { create, visitable } from 'ember-cli-page-object';

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

// visits '/users/10'
page.visit({ user_id: 10 });
import { create, visitable } from 'ember-cli-page-object';

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

// visits '/users?name=john'
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'
page.visit({ user_id: 1, name: 'john' });
  • Throws any Will throw an error if dynamic segments are not filled

Returns Descriptor