d89ef3c369
* remove skip * remove skip from create test * some changes * small changes to address local failures * replace page object with dom click to help with flaky control group test * small fix that seems to help control group failures * some skipping to bring back my sanity * focusing on the section-cert-test for pki * another try at the secret cert test * skipping to focus on secret-certs * fingers crossed for pki role test * hopefully some help with control group * more on control groups * trying for one less skip here * create test remove skips * remove skip * remove comment * back to skip this test * shouldn't make sense but it does, changed the name to hit it first in acceptance test and that works * redirect testing * remove catch because that was not the issue, it never got triggered * cleanup * clean up * remove comments and add catch
22 lines
655 B
JavaScript
22 lines
655 B
JavaScript
import { create, visitable, fillable, clickable } from 'ember-cli-page-object';
|
|
import { settled } from '@ember/test-helpers';
|
|
|
|
export default create({
|
|
visit: visitable('/vault/auth'),
|
|
logout: visitable('/vault/logout'),
|
|
submit: clickable('[data-test-auth-submit]'),
|
|
tokenInput: fillable('[data-test-token]'),
|
|
login: async function(token) {
|
|
// make sure we're always logged out and logged back in
|
|
await this.logout();
|
|
await settled();
|
|
await this.visit({ with: 'token' });
|
|
await settled();
|
|
if (token) {
|
|
return await this.tokenInput(token).submit();
|
|
}
|
|
|
|
return await this.tokenInput('root').submit();
|
|
},
|
|
});
|