vault/ui/tests/helpers/components/mount-backend-form-helpers.js
Angel Garbarino 120497d813
Remove ember-cli-page-object: mount-backend-form (#28799)
* first round, there shall be more

* fix secret test

* more clean up

* maybe last round of clean up?

* this is going to take a while

* all the things or more of them at least

* this is the song that never ends...

* ... it goes on and on my friend.

* clean up clean up everybody lets clean up

* rename mount helper to mountBackend

* clean up 🧹

* address pr comments

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2024-10-30 20:15:59 +00:00

20 lines
588 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { fillIn, click } from '@ember/test-helpers';
import { MOUNT_BACKEND_FORM } from 'vault/tests/helpers/components/mount-backend-form-selectors';
import { GENERAL } from 'vault/tests/helpers/general-selectors';
export const mountBackend = async (type, path) => {
await click(MOUNT_BACKEND_FORM.mountType(type));
if (path) {
await fillIn(GENERAL.inputByAttr('path'), path);
await click(GENERAL.saveButton);
} else {
// save with default path
await click(GENERAL.saveButton);
}
};