mirror of
https://github.com/nasa/openmct.git
synced 2025-06-22 09:08:43 +00:00
test(e2e): unique names for created objects by default (#5945)
* feat(e2e): default unique names for new objects * refactor(e2e): reference generated object names - Fixes the tests that were locating "Unnamed <object_type>" to use the generated unique names * feat(e2e): add testInfo into domainObject notes - adds info about the currently running test and its project to notes * fix(e2e): fix selector for notes section * feat: ARIA: menu role for menus and SuperMenus - Implements the [ARIA: menu role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/roles/menu_role) for Menus and SuperMenus, * refactor(e2e): use role selectors for menu items * refactor(e2e): better selectors for "OK" button * refactor(e2e): better selectors for menu items * refactor(e2e): improve selector * refactor(e2e): update test to use appActions * refactor(e2e): update test to use object name * refactor(e2e): improve selectors for menu items * test(e2e): fix search test * refactor(e2e): update more plain 'text=' selectors * fix: resolve codeQL error - remove superfluous argument * refactor(e2e): move testNotes to `pluginFixtures` and update imports * refactor(e2e): remove unused fixture from test * refactor: add dynamic id to form textareas * refactor(e2e): improve notes textarea selector * refactor(e2e): remove unused fixture
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
:class="model.cssClass"
|
||||
>
|
||||
<textarea
|
||||
:id="`${model.key}-textarea`"
|
||||
v-model="field"
|
||||
type="text"
|
||||
:size="model.size"
|
||||
|
@ -3,39 +3,52 @@
|
||||
class="c-menu"
|
||||
:class="options.menuClass"
|
||||
>
|
||||
<ul v-if="options.actions.length && options.actions[0].length">
|
||||
<ul
|
||||
v-if="options.actions.length && options.actions[0].length"
|
||||
role="menu"
|
||||
>
|
||||
<template
|
||||
v-for="(actionGroups, index) in options.actions"
|
||||
>
|
||||
<li
|
||||
v-for="action in actionGroups"
|
||||
:key="action.name"
|
||||
:class="[action.cssClass, action.isDisabled ? 'disabled' : '']"
|
||||
:title="action.description"
|
||||
:data-testid="action.testId || false"
|
||||
@click="action.onItemClicked"
|
||||
>
|
||||
{{ action.name }}
|
||||
</li>
|
||||
<div
|
||||
v-if="index !== options.actions.length - 1"
|
||||
:key="index"
|
||||
class="c-menu__section-separator"
|
||||
role="group"
|
||||
>
|
||||
</div>
|
||||
<li
|
||||
v-if="actionGroups.length === 0"
|
||||
:key="index"
|
||||
>
|
||||
No actions defined.
|
||||
</li>
|
||||
</template>
|
||||
<li
|
||||
v-for="action in actionGroups"
|
||||
:key="action.name"
|
||||
role="menuitem"
|
||||
:class="[action.cssClass, action.isDisabled ? 'disabled' : '']"
|
||||
:title="action.description"
|
||||
:data-testid="action.testId || false"
|
||||
@click="action.onItemClicked"
|
||||
>
|
||||
{{ action.name }}
|
||||
</li>
|
||||
<div
|
||||
v-if="index !== options.actions.length - 1"
|
||||
:key="index"
|
||||
role="separator"
|
||||
class="c-menu__section-separator"
|
||||
>
|
||||
</div>
|
||||
<li
|
||||
v-if="actionGroups.length === 0"
|
||||
:key="index"
|
||||
>
|
||||
No actions defined.
|
||||
</li>
|
||||
</div></template>
|
||||
</ul>
|
||||
|
||||
<ul v-else>
|
||||
<ul
|
||||
v-else
|
||||
role="menu"
|
||||
>
|
||||
<li
|
||||
v-for="action in options.actions"
|
||||
:key="action.name"
|
||||
role="menuitem"
|
||||
:class="[action.cssClass, action.isDisabled ? 'disabled' : '']"
|
||||
:title="action.description"
|
||||
:data-testid="action.testId || false"
|
||||
|
@ -5,45 +5,54 @@
|
||||
>
|
||||
<ul
|
||||
v-if="options.actions.length && options.actions[0].length"
|
||||
role="menu"
|
||||
class="c-super-menu__menu"
|
||||
>
|
||||
<template
|
||||
v-for="(actionGroups, index) in options.actions"
|
||||
>
|
||||
<li
|
||||
v-for="action in actionGroups"
|
||||
:key="action.name"
|
||||
:class="[action.cssClass, action.isDisabled ? 'disabled' : '']"
|
||||
:title="action.description"
|
||||
:data-testid="action.testId || false"
|
||||
@click="action.onItemClicked"
|
||||
@mouseover="toggleItemDescription(action)"
|
||||
@mouseleave="toggleItemDescription()"
|
||||
>
|
||||
{{ action.name }}
|
||||
</li>
|
||||
<div
|
||||
v-if="index !== options.actions.length - 1"
|
||||
:key="index"
|
||||
class="c-menu__section-separator"
|
||||
role="group"
|
||||
>
|
||||
</div>
|
||||
<li
|
||||
v-if="actionGroups.length === 0"
|
||||
:key="index"
|
||||
>
|
||||
No actions defined.
|
||||
</li>
|
||||
</template>
|
||||
<li
|
||||
v-for="action in actionGroups"
|
||||
:key="action.name"
|
||||
role="menuitem"
|
||||
:class="[action.cssClass, action.isDisabled ? 'disabled' : '']"
|
||||
:title="action.description"
|
||||
:data-testid="action.testId || false"
|
||||
@click="action.onItemClicked"
|
||||
@mouseover="toggleItemDescription(action)"
|
||||
@mouseleave="toggleItemDescription()"
|
||||
>
|
||||
{{ action.name }}
|
||||
</li>
|
||||
<div
|
||||
v-if="index !== options.actions.length - 1"
|
||||
:key="index"
|
||||
role="separator"
|
||||
class="c-menu__section-separator"
|
||||
>
|
||||
</div>
|
||||
<li
|
||||
v-if="actionGroups.length === 0"
|
||||
:key="index"
|
||||
>
|
||||
No actions defined.
|
||||
</li>
|
||||
</div></template>
|
||||
</ul>
|
||||
|
||||
<ul
|
||||
v-else
|
||||
class="c-super-menu__menu"
|
||||
role="menu"
|
||||
>
|
||||
<li
|
||||
v-for="action in options.actions"
|
||||
:key="action.name"
|
||||
role="menuitem"
|
||||
:class="action.cssClass"
|
||||
:title="action.description"
|
||||
:data-testid="action.testId || false"
|
||||
|
Reference in New Issue
Block a user