2018-09-25 16:28:26 +00:00
|
|
|
import { create, visitable, fillable, clickable } from 'ember-cli-page-object';
|
|
|
|
|
|
|
|
export default create({
|
|
|
|
visit: visitable('/vault/auth'),
|
|
|
|
submit: clickable('[data-test-auth-submit]'),
|
|
|
|
tokenInput: fillable('[data-test-token]'),
|
|
|
|
login: async function(token) {
|
|
|
|
await this.visit({ with: 'token' });
|
|
|
|
if (token) {
|
|
|
|
return this.tokenInput(token).submit();
|
|
|
|
}
|
|
|
|
|
2018-10-02 15:05:34 +00:00
|
|
|
return this.tokenInput('root').submit();
|
2018-09-25 16:28:26 +00:00
|
|
|
},
|
|
|
|
});
|