Skip to content

Instantly share code, notes, and snippets.

@mszoernyi
Created October 19, 2015 15:33
Show Gist options
  • Save mszoernyi/5feb78d074321fd0de59 to your computer and use it in GitHub Desktop.
Save mszoernyi/5feb78d074321fd0de59 to your computer and use it in GitHub Desktop.
import PageObject from 'ui/tests/page-object';
let {
visitable,
fillable,
clickable,
text,
selectable
} = PageObject;
export default PageObject.build({
visit: visitable('/users/new'),
edit: visitable('/users/:id'),
name: fillable('input#nameid'),
email: fillable('input#email'),
password: fillable('input#pwd'),
passwordConfirmation: fillable('input#confirm'),
rolesOpen: clickable('#roles .selectize-control'),
rolesSelectFirst: clickable('#roles .selectize-dropdown-content div:first'),
submit: clickable('a.btn.green'),
cancel: clickable('a.btn.grey'),
errorMessage: text('div.alert:first'),
headerText: text('h3:first')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment