vault/ui/tests/pages/secrets/backend/pki/edit-role.js
Angel Garbarino 407298f0aa
Remove Skip from flaky test left over from Ember Upgrade (#11065)
* 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
2021-03-16 12:23:48 -06:00

31 lines
1.0 KiB
JavaScript

import { Base } from '../create';
import { settled } from '@ember/test-helpers';
import { clickable, visitable, create, fillable } from 'ember-cli-page-object';
export default create({
...Base,
visitEdit: visitable('/vault/secrets/:backend/edit/:id'),
visitEditRoot: visitable('/vault/secrets/:backend/edit'),
toggleDomain: clickable('[data-test-toggle-group="Domain Handling"]'),
toggleOptions: clickable('[data-test-toggle-group="Options"]'),
name: fillable('[data-test-input="name"]'),
allowAnyName: clickable('[data-test-input="allowAnyName"]'),
allowedDomains: fillable('[data-test-input="allowedDomains"] .input'),
save: clickable('[data-test-role-create]'),
async createRole(name, allowedDomains) {
await this.toggleDomain();
await settled();
await this.toggleOptions();
await settled();
await this.name(name);
await settled();
await this.allowAnyName();
await settled();
await this.allowedDomains(allowedDomains);
await settled();
await this.save();
await settled();
},
});