mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-28 02:20:30 -04:00
* license: update headers to IBM Corp. * `make proto` * update offset because source file changed Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
34 lines
846 B
JavaScript
34 lines
846 B
JavaScript
/**
|
|
* Copyright IBM Corp. 2016, 2025
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { waitFor, settled } from '@ember/test-helpers';
|
|
import { collection, text, clickable } from 'ember-cli-page-object';
|
|
import { getter } from 'ember-cli-page-object/macros';
|
|
|
|
export default {
|
|
latestMessage: getter(function () {
|
|
return this.latestItem.text;
|
|
}),
|
|
latestItem: getter(function () {
|
|
const count = this.messages.length;
|
|
return this.messages.objectAt(count - 1);
|
|
}),
|
|
messages: collection('[data-test-flash-message-body]', {
|
|
click: clickable(),
|
|
text: text(),
|
|
}),
|
|
waitForFlash() {
|
|
return waitFor('[data-test-flash-message-body]');
|
|
},
|
|
clickLast() {
|
|
return this.latestItem.click();
|
|
},
|
|
async clickAll() {
|
|
for (const message of this.messages) {
|
|
message.click();
|
|
}
|
|
await settled();
|
|
},
|
|
};
|