Skip to content

Commit

Permalink
test(e2e): stabilize flaky imagery tests (#7765)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozyx authored Jul 24, 2024
1 parent 1fae0a6 commit 689f7cc
Show file tree
Hide file tree
Showing 77 changed files with 540 additions and 485 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const config = {
'vue/no-deprecated-events-api': 'warn',
'vue/no-v-for-template-key': 'off',
'vue/no-v-for-template-key-on-child': 'error',
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'prettier/prettier': 'error',
'you-dont-need-lodash-underscore/omit': 'off',
'you-dont-need-lodash-underscore/throttle': 'off',
Expand Down
2 changes: 1 addition & 1 deletion .webpack/webpack.dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default merge(common, {
return shouldWrite;
}
},
watchFiles: ['**/*.css'],
watchFiles: ['src/**/*.css', 'example/**/*.css'],
static: {
directory: fileURLToPath(new URL('../dist', import.meta.url)),
publicPath: '/dist',
Expand Down
12 changes: 6 additions & 6 deletions e2e/appActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ async function createDomainObjectWithDefaults(

// Navigate to the parent object. This is necessary to create the object
// in the correct location, such as a folder, layout, or plot.
await page.goto(`${parentUrl}`);
await page.goto(parentUrl);

//Click the Create button
await page.getByRole('button', { name: 'Create' }).click();
// Click the Create button
await page.getByRole('button', { name: 'Create', exact: true }).click();

// Click the object specified by 'type'
await page.click(`li[role='menuitem']:text("${type}")`);
// Click the object specified by 'type'-- case insensitive
await page.getByRole('menuitem', { name: new RegExp(`^${type}$`, 'i') }).click();

// Modify the name input field of the domain object to accept 'name'
const nameInput = page.locator('form[name="mctForm"] .first input[type="text"]');
Expand Down Expand Up @@ -353,7 +353,7 @@ async function getFocusedObjectUuid(page) {
* @returns {Promise<string>} the url of the object
*/
async function getHashUrlToDomainObject(page, identifier) {
await page.waitForLoadState('load');
await page.waitForLoadState('domcontentloaded');
const hashUrl = await page.evaluate(async (objectIdentifier) => {
const path = await window.openmct.objects.getOriginalPath(objectIdentifier);
let url =
Expand Down
431 changes: 232 additions & 199 deletions e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/api/forms/components/controls/LocatorField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<mct-tree
<MctTree
:is-selector-tree="true"
:initial-selection="model.parent"
@tree-item-selection="handleItemSelection"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/LADTable/components/LadTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</tr>
</thead>
<tbody>
<lad-row
<LadRow
v-for="ladRow in items"
:key="ladRow.key"
:domain-object="ladRow.domainObject"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/LADTable/components/LadTableSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{{ ladTable.domainObject.name }}
</td>
</tr>
<lad-row
<LadRow
v-for="ladRow in ladTelemetryObjects[ladTable.key]"
:key="combineKeys(ladTable.key, ladRow.key)"
:domain-object="ladRow.domainObject"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/charts/bar/inspector/BarGraphOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ul class="c-tree">
<h2 title="Display properties for this object">Bar Graph Series</h2>
<li>
<series-options
<SeriesOptions
v-for="series in plotSeries"
:key="series.keyString"
:item="series"
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/charts/scatter/inspector/PlotOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<template>
<div>
<div v-if="canEdit">
<plot-options-edit />
<PlotOptionsEdit />
</div>
<div v-else>
<plot-options-browse />
<PlotOptionsBrowse />
</div>
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/condition/components/ConditionItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<span class="c-condition__summary">
<template v-if="!condition.isDefault && !canEvaluateCriteria"> Define criteria </template>
<span v-else>
<condition-description :show-label="false" :condition="condition" />
<ConditionDescription :show-label="false" :condition="condition" />
</span>
</span>

Expand Down Expand Up @@ -184,7 +184,7 @@
<span class="c-condition__output"> Output: {{ condition.configuration.output }} </span>
</div>
<div class="c-condition__summary">
<condition-description :show-label="false" :condition="condition" />
<ConditionDescription :show-label="false" :condition="condition" />
</div>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/condition/components/inspector/StyleEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@
</span>
</div>

<toolbar-color-picker
<ToolbarColorPicker
v-if="hasProperty(styleItem.style.border)"
class="c-style__toolbar-button--border-color u-menu-to--center"
:options="borderColorOption"
@change="updateStyleValue"
/>
<toolbar-color-picker
<ToolbarColorPicker
v-if="hasProperty(styleItem.style.backgroundColor)"
class="c-style__toolbar-button--background-color u-menu-to--center"
:options="backgroundColorOption"
@change="updateStyleValue"
/>
<toolbar-color-picker
<ToolbarColorPicker
v-if="hasProperty(styleItem.style.color)"
class="c-style__toolbar-button--color u-menu-to--center"
:options="colorOption"
@change="updateStyleValue"
/>
<toolbar-button
<ToolbarButton
v-if="hasProperty(styleItem.style.imageUrl)"
class="c-style__toolbar-button--image-url"
:options="imageUrlOption"
@change="updateStyleValue"
/>
<toolbar-toggle-button
<ToolbarToggleButton
v-if="hasProperty(styleItem.style.isStyleInvisible)"
class="c-style__toolbar-button--toggle-visible"
:options="isStyleInvisibleOption"
Expand All @@ -76,7 +76,7 @@
</div>

<!-- Save Styles -->
<toolbar-button
<ToolbarButton
v-if="canSaveStyle"
ref="saveStyleButton"
class="c-style__toolbar-button--save c-local-controls--show-on-hover c-icon-button c-icon-button--major"
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/condition/components/inspector/StylesView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@
:class="{ 'is-current': conditionStyle.conditionId === selectedConditionId }"
@click="applySelectedConditionStyle(conditionStyle.conditionId)"
>
<condition-error
<ConditionError
:show-label="true"
:condition="getCondition(conditionStyle.conditionId)"
/>
<condition-description
<ConditionDescription
:show-label="true"
:condition="getCondition(conditionStyle.conditionId)"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/displayLayout/components/BoxView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<layout-frame
<LayoutFrame
:item="item"
:grid-size="gridSize"
:is-editing="isEditing"
Expand All @@ -38,7 +38,7 @@
aria-label="Box"
></div>
</template>
</layout-frame>
</LayoutFrame>
</template>

<script>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/displayLayout/components/EllipseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<layout-frame
<LayoutFrame
:item="item"
:grid-size="gridSize"
:is-editing="isEditing"
Expand All @@ -38,7 +38,7 @@
aria-label="Ellipse"
></div>
</template>
</layout-frame>
</LayoutFrame>
</template>

<script>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/displayLayout/components/ImageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<layout-frame
<LayoutFrame
:item="item"
:grid-size="gridSize"
:is-editing="isEditing"
Expand All @@ -31,7 +31,7 @@
<template #content>
<div class="c-image-view" :style="style"></div>
</template>
</layout-frame>
</LayoutFrame>
</template>

<script>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/displayLayout/components/SubobjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
at runtime from the About dialog for additional information.
-->
<template>
<layout-frame
<LayoutFrame
:item="item"
:grid-size="gridSize"
:is-editing="isEditing"
Expand All @@ -39,7 +39,7 @@
:layout-font="item.font"
/>
</template>
</layout-frame>
</LayoutFrame>
</template>

<script>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/displayLayout/components/TelemetryView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<layout-frame
<LayoutFrame
:item="item"
:grid-size="gridSize"
:is-editing="isEditing"
Expand Down Expand Up @@ -68,7 +68,7 @@
</div>
</div>
</template>
</layout-frame>
</LayoutFrame>
</template>

<script>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/displayLayout/components/TextView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<layout-frame
<LayoutFrame
:item="item"
:grid-size="gridSize"
:is-editing="isEditing"
Expand All @@ -42,7 +42,7 @@
<div class="c-text-view__text">{{ item.text }}</div>
</div>
</template>
</layout-frame>
</LayoutFrame>
</template>

<script>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/filters/components/FilterObject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
</div>

<div v-if="isEditing" class="c-inspect-properties__label span-all">
<toggle-switch
<ToggleSwitch
:id="keyString"
:checked="persistedFilters.useGlobal"
@change="useGlobalFilter"
/>
Use global filter
</div>
<filter-field
<FilterField
v-for="metadatum in activeFilters"
:key="metadatum.key"
:filter-field="metadatum"
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/filters/components/FiltersView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
<div v-if="hasActiveFilters" class="c-filter-indication">
{{ label }}
</div>
<global-filters
<GlobalFilters
:global-filters="globalFilters"
:global-metadata="globalMetadata"
@persist-global-filters="persistGlobalFilters"
/>
<filter-object
<FilterObject
v-for="(child, key) in children"
:key="key"
:filter-object="child"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/filters/components/GlobalFilters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>
</div>
<ul v-if="expanded" class="c-inspect-properties">
<filter-field
<FilterField
v-for="metadatum in globalMetadata"
:key="metadatum.key"
:filter-field="metadatum"
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/flexibleLayout/components/ContainerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<span class="c-fl-container__size-indicator">{{ sizeString }}</span>
</div>

<drop-hint
<DropHint
class="c-fl-frame__drop-hint"
:index="-1"
:allow-drop="allowDrop"
Expand All @@ -47,7 +47,7 @@

<div role="row" class="c-fl-container__frames-holder" :class="flexLayoutCssClass">
<template v-for="(frame, i) in frames" :key="frame.id">
<frame-component
<FrameComponent
class="c-fl-container__frame"
:frame="frame"
:index="i"
Expand All @@ -58,14 +58,14 @@
:object-path="objectPath"
/>

<drop-hint
<DropHint
class="c-fl-frame__drop-hint"
:index="i"
:allow-drop="allowDrop"
@object-drop-to="moveOrCreateNewFrame"
/>

<resize-handle
<ResizeHandle
v-if="i !== frames.length - 1"
:index="i"
:drag-orientation="rowsLayout ? 'horizontal' : 'vertical'"
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/flexibleLayout/components/FlexibleLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
:aria-label="`Flexible Layout ${rowsLayout ? 'Rows' : 'Columns'}`"
>
<template v-for="(container, index) in containers" :key="`component-${container.id}`">
<drop-hint
<DropHint
v-if="index === 0 && containers.length > 1"
class="c-fl-frame__drop-hint"
:index="-1"
:allow-drop="allowContainerDrop"
@object-drop-to="moveContainer"
/>

<container-component
<ContainerComponent
:index="index"
:container="container"
:rows-layout="rowsLayout"
Expand All @@ -54,7 +54,7 @@
@persist="persist"
/>

<resize-handle
<ResizeHandle
v-if="index !== containers.length - 1"
:index="index"
:drag-orientation="rowsLayout ? 'vertical' : 'horizontal'"
Expand All @@ -64,7 +64,7 @@
@end-move="endContainerResizing"
/>

<drop-hint
<DropHint
v-if="containers.length > 1"
class="c-fl-frame__drop-hint"
:index="index"
Expand Down
Loading

0 comments on commit 689f7cc

Please sign in to comment.