fix: remove tree-item-destroyed event (#6856)

* fix: remove `tree-item-destroyed` event

- Composition listeners should only be removed if the item has been deleted or its parent has been collapsed. Both are handled by `mct-tree` already, so doing this additionally when tree-items unmount is redundant.

- In addition to that, any time the `visibleTreeItems` array changes, all tree-items will unmount, so this just doesn't work as intended-- it will unregister all composition listeners whenever the tree changes!

* test: stabilize imagery test

- Use keyboard gestures to navigate

* fix: lint:fix
This commit is contained in:
Jesse Mazzella 2023-07-31 09:57:11 -07:00 committed by GitHub
parent 3ae14cf786
commit f0ef93dd3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View File

@ -80,19 +80,21 @@ test.describe('Example Imagery Object', () => {
// flip on independent time conductor
await page.getByRole('switch', { name: 'Enable Independent Time Conductor' }).click();
await page.getByRole('button', { name: 'Independent Time Conductor Settings' }).click();
await page.getByRole('textbox', { name: 'Start date' }).click();
await page.getByRole('textbox', { name: 'Start date' }).fill('');
await page.getByRole('textbox', { name: 'Start date' }).fill('2021-12-30');
await page.getByRole('textbox', { name: 'Start time' }).click();
await page.keyboard.press('Tab');
await page.getByRole('textbox', { name: 'Start time' }).fill('');
await page.getByRole('textbox', { name: 'Start time' }).fill('01:01:00');
await page.getByRole('textbox', { name: 'End date' }).click();
await page.getByRole('textbox', { name: 'Start time' }).type('01:01:00');
await page.keyboard.press('Tab');
await page.getByRole('textbox', { name: 'End date' }).fill('');
await page.getByRole('textbox', { name: 'End date' }).fill('2021-12-30');
await page.getByRole('textbox', { name: 'End time' }).click();
await page.getByRole('textbox', { name: 'End date' }).type('2021-12-30');
await page.keyboard.press('Tab');
await page.getByRole('textbox', { name: 'End time' }).fill('');
await page.getByRole('textbox', { name: 'End time' }).fill('01:11:00');
await page.getByRole('button', { name: 'Submit time bounds' }).click();
await page.getByRole('textbox', { name: 'End time' }).type('01:11:00');
await page.keyboard.press('Tab');
await page.keyboard.press('Enter');
// expect(await page.getByRole('button', { name: 'Submit time bounds' }).isEnabled()).toBe(true);
// await page.getByRole('button', { name: 'Submit time bounds' }).click();
// check image date
await expect(page.getByText('2021-12-30 01:11:00.000Z').first()).toBeVisible();

View File

@ -97,7 +97,6 @@
:loading-items="treeItemLoading"
:targeted-path="targetedPath"
@tree-item-mounted="scrollToCheck($event)"
@tree-item-destroyed="removeCompositionListenerFor($event)"
@tree-item-action="treeItemAction(treeItem, $event)"
@tree-item-selection="treeItemSelection(treeItem)"
@targeted-path-animation-end="targetedPathAnimationEnd()"

View File

@ -191,7 +191,6 @@ export default {
},
unmounted() {
this.openmct.router.off('change:path', this.highlightIfNavigated);
this.$emit('tree-item-destroyed', this.navigationPath);
},
methods: {
targetedPathAnimationEnd($event) {