mirror of
https://github.com/nasa/openmct.git
synced 2025-01-17 18:30:07 +00:00
fix(e2e): fix grand search test
This commit is contained in:
parent
b41c98d4ab
commit
724ec423d1
@ -77,11 +77,11 @@ test.describe('Grand Search', () => {
|
|||||||
|
|
||||||
// Click [aria-label="OpenMCT Search"] a >> nth=0
|
// Click [aria-label="OpenMCT Search"] a >> nth=0
|
||||||
await page.locator('[aria-label="Search Result"] >> nth=0').click();
|
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"]
|
// Fill [aria-label="OpenMCT Search"] input[type="search"]
|
||||||
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('foo');
|
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
|
// Click text=Snapshot Save and Finish Editing Save and Continue Editing >> button >> nth=1
|
||||||
await page
|
await page
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
v-if="dismissable"
|
v-if="dismissable"
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
class="c-click-icon c-overlay__close-button icon-x"
|
class="c-click-icon c-overlay__close-button icon-x"
|
||||||
@click="destroy"
|
@click.stop="destroy"
|
||||||
></button>
|
></button>
|
||||||
<div
|
<div
|
||||||
ref="element"
|
ref="element"
|
||||||
@ -71,16 +71,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
destroy: function () {
|
destroy() {
|
||||||
if (this.dismissable) {
|
if (this.dismissable) {
|
||||||
this.dismiss();
|
this.dismiss();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttonClickHandler: function (method) {
|
buttonClickHandler(method) {
|
||||||
method();
|
method();
|
||||||
this.$emit('destroy');
|
this.$emit('destroy');
|
||||||
},
|
},
|
||||||
getElementForFocus: function () {
|
getElementForFocus() {
|
||||||
const defaultElement = this.$refs.element;
|
const defaultElement = this.$refs.element;
|
||||||
if (!this.$refs.buttons) {
|
if (!this.$refs.buttons) {
|
||||||
return defaultElement;
|
return defaultElement;
|
||||||
|
Loading…
Reference in New Issue
Block a user