vault/ui/tests/pages/init.js
Hamid Ghaf e55c18ed12
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

20 lines
615 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { text, create, collection, visitable, fillable, clickable } from 'ember-cli-page-object';
export default create({
visit: visitable('/vault/init'),
submit: clickable('[data-test-init-submit]'),
shares: fillable('[data-test-key-shares]'),
threshold: fillable('[data-test-key-threshold]'),
keys: collection('[data-test-key-box]'),
buttonText: text('[data-test-advance-button]'),
init: async function (shares, threshold) {
await this.visit();
return this.shares(shares).threshold(threshold).submit();
},
});