mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-18 04:27:02 +02:00
14 lines
334 B
JavaScript
14 lines
334 B
JavaScript
import { create } from 'ember-cli-page-object';
|
|
import flashMessage from 'vault/tests/pages/components/flash-message';
|
|
|
|
const flash = create(flashMessage);
|
|
|
|
export default async function withFlash(promise, assertion) {
|
|
await flash.waitForFlash();
|
|
if (assertion) {
|
|
assertion();
|
|
}
|
|
await flash.clickAll();
|
|
await promise;
|
|
}
|