fix(e2e): fix grand search test

This commit is contained in:
Jesse Mazzella 2023-07-21 16:52:00 -07:00
parent b41c98d4ab
commit 724ec423d1
2 changed files with 6 additions and 6 deletions

View File

@ -77,11 +77,11 @@ test.describe('Grand Search', () => {
// Click [aria-label="OpenMCT Search"] a >> nth=0
await page.locator('[aria-label="Search Result"] >> nth=0').click();
await expect(page.locator('[aria-label="Search Result"] >> nth=0')).toBeHidden();
await expect(page.locator('[aria-label="Search Result"] >> nth=0')).toBeInViewport();
// Fill [aria-label="OpenMCT Search"] input[type="search"]
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('foo');
await expect(page.locator('[aria-label="Search Result"] >> nth=0')).toBeHidden();
await expect(page.locator('[aria-label="Search Result"] >> nth=0')).not.toBeInViewport();
// Click text=Snapshot Save and Finish Editing Save and Continue Editing >> button >> nth=1
await page

View File

@ -27,7 +27,7 @@
v-if="dismissable"
aria-label="Close"
class="c-click-icon c-overlay__close-button icon-x"
@click="destroy"
@click.stop="destroy"
></button>
<div
ref="element"
@ -71,16 +71,16 @@ export default {
});
},
methods: {
destroy: function () {
destroy() {
if (this.dismissable) {
this.dismiss();
}
},
buttonClickHandler: function (method) {
buttonClickHandler(method) {
method();
this.$emit('destroy');
},
getElementForFocus: function () {
getElementForFocus() {
const defaultElement = this.$refs.element;
if (!this.$refs.buttons) {
return defaultElement;