Compare commits

...

582 Commits

Author SHA1 Message Date
6f97117c42 Update src/ui/composables/extendedLines.js
Co-authored-by: Even Stensberg <evenstensberg@gmail.com>
2025-04-23 09:50:05 -07:00
2c61739542 Merge branch '7936-add-discrete-event-visualization' of https://github.com/nasa/openmct into event-visualization-composable 2025-04-23 09:49:34 -07:00
c1f7243263 Remove commented obsolete code. 2025-04-21 12:09:15 -07:00
5a364cea00 Remove timelinePlugin argument to EventTimeline plugin 2025-03-19 11:05:28 -07:00
1ea2cf9ce5 Disable extended lines on unmount 2025-03-19 10:45:51 -07:00
25ca7d4321 Remove references to ExtendedLinesBus 2025-03-18 11:39:41 -07:00
39ce53f561 Use composable instead of using event emitters for extended lines overlays 2025-03-18 11:32:09 -07:00
2e35212c32 Decode object path 2025-03-07 07:33:45 -08:00
8545ddeaff remove eventemitter and use native custom events 2025-03-07 12:01:26 +01:00
55d15caa63 add documentation as to why we need the label hint for EventTimelineView 2025-03-07 11:24:13 +01:00
bbae9c6048 use this.el instead of hardcoded layout ref 2025-03-07 11:17:52 +01:00
af6f3274cb remove extraneous class 2025-03-07 10:49:28 +01:00
b171f82e94 Ensure now marker shows up correctly even when there are no plots to send tick updates 2025-03-06 16:35:48 -08:00
88b43314d9 Handle right offset alignment for event timeline view 2025-03-06 16:35:23 -08:00
14a5c47efa Increase the priority of EventtimelineView 2025-03-05 17:10:29 -08:00
8be969fb7a Increase priority of event timeline view provider 2025-03-05 16:50:54 -08:00
157bde841e Fix linting issues 2025-03-05 16:17:13 -08:00
74a5d7e1f3 Merge branch 'master' of https://github.com/nasa/openmct into 7936-add-discrete-event-visualization 2025-03-05 16:11:21 -08:00
aa5fa468b5 Use the tooltips mixin 2025-03-05 15:23:53 -08:00
3ad64f08c5 Refactor code to
1) reduce call to instance method
2) Use existing event line bus functionality
3) move non reactive properties to the created lifecycle hook
2025-03-05 12:33:17 -08:00
1ced12d22f Remove the priority for imagerytimestripviewprovider and reduce the priority for eventtimelineviewprovider to HIGH.
Also add a condition to the eventtimelineview to reject objects that have imagery (this is to promote the imagerytimestripview to handle those objets)
2025-03-05 12:21:26 -08:00
9e68514b27 Removed commented out code 2025-03-05 11:32:17 -08:00
28b5d7c41c Time strip marcus banes line "now line" fix for right y-axis and when now is out of bounds (#7993)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
* Account for right y-axes when calculating now line position.
Don't show the now line if it's out of bounds of the time axis

* Add test for now marker in realtime and out of bounds modes
2025-02-17 18:23:48 +00:00
ecd120387c Independent time conductor related handling for plot synchronization. (#7956)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
* Ensure that the mode set when independent time conductor is enabled/disabled is propagated correctly.
Also ensure that global time conductor changes are not picked up by the independent time conductor when the user has enabled it at least once before

* Use structuredClone instead of deep copy

* Add e2e test

* Assert that you're in fixed mode after sync time conductor

* Comment explaining new time context test

* Change test to be a little less complicated

* Fix linting errors
2025-02-10 21:46:00 +00:00
a6517bb33e migrate from actions/upload-artifact: v3 to v4. (#8000)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
* migrate from actions/upload-artifact: v3 to v4.
https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md

* Add names for artifacts and allow overwriting them
2025-02-07 18:03:00 +00:00
1fde0d9e38 Don't disallow mouse events when in compact mode for plots (#7975)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
e2e-couchdb / e2e-couchdb (push) Has been cancelled
e2e-perf / e2e-full (push) Has been cancelled
e2e-pr / e2e-full (ubuntu-latest) (push) Has been cancelled
e2e-pr / e2e-full (windows-latest) (push) Has been cancelled
pr-platform / Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} (x64, lts/hydrogen, macos-latest) (push) Has been cancelled
pr-platform / Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} (x64, lts/hydrogen, ubuntu-latest) (push) Has been cancelled
pr-platform / Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} (x64, lts/hydrogen, windows-latest) (push) Has been cancelled
pr-platform / Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} (x64, lts/iron, macos-latest) (push) Has been cancelled
pr-platform / Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} (x64, lts/iron, ubuntu-latest) (push) Has been cancelled
pr-platform / Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} (x64, lts/iron, windows-latest) (push) Has been cancelled
pr-platform / Node lts/hydrogen - x64 on macos-latest (push) Has been cancelled
pr-platform / Node lts/hydrogen - x64 on ubuntu-latest (push) Has been cancelled
pr-platform / Node lts/hydrogen - x64 on windows-latest (push) Has been cancelled
pr-platform / Node lts/iron - x64 on macos-latest (push) Has been cancelled
pr-platform / Node lts/iron - x64 on ubuntu-latest (push) Has been cancelled
pr-platform / Node lts/iron - x64 on windows-latest (push) Has been cancelled
* Allow highlights and locking highlight points for plots in compact mode, but still disallow pan and zoom.

* Remove unnecessary watch on cursor guides and grid lines

* Test for cursor guides in compact mode
2025-01-18 15:50:24 +00:00
32a0e15691 handle case where we only have events in timeline 2025-01-06 10:40:51 +01:00
0e940b2883 lint and simplify playwright locator 2025-01-06 10:09:39 +01:00
15b674f3d1 Closes #7936
- Fix left and right `alignmentData` offsets that were not being applied to the correct element.
2024-12-19 19:17:28 -08:00
0933d27ce6 Closes #7936
- Fix left and right `alignmentData` offsets in
EventTimelineView.vue, ImageryTimeView.vue and ActivityTimeline.vue.
2024-12-19 18:09:17 -08:00
f163034e18 Closes #7936
- Sanding and shimming on imagery and events TS look and feel.
- Fixed scrollbar issue in imagery TS view when thumb goes beyond the right edge of the time frame.
2024-12-19 17:34:31 -08:00
e6cb940ee7 Closes #7936
- WIP prepping activities view for adjustable swimlane height.
- Refactored ActivityTimeline.vue to not draw SVG if no activities in timeframe.
- ActivityTimeline.vue `leftOffset` now uses absolute position `left` instead of `left-margin`.
2024-12-19 15:25:30 -08:00
cfa2129660 Closes #7936
- Consolidate `__no-items` message style into timeline.scss.
2024-12-19 15:06:22 -08:00
6cafa7a22d Closes #7936
- Add in alignmentData to set the left edge of the imagery-tsv element properly.
2024-12-19 12:45:18 -08:00
9522040929 Closes #7936
- Significant improvements for Time Strip imagery view ahead of user-settable swimlane heights.
- Imagery container height, image height and width no longer set in code.
- Imagery swimlane now uses styles and hover behavior consistent with events.
2024-12-19 12:35:20 -08:00
5b28086f95 Closes #7936
- CSS cleanups.
2024-12-19 12:30:45 -08:00
bb4fea78f5 Closes #7936
- Swimlane style refinements.
- New theme constants for swimlane colors.
- Time Strip label column buttons aligned right.
2024-12-19 09:56:28 -08:00
5312458776 Closes #7936
- Fixed swimlane button markup.
- CSS cleanup.
2024-12-18 17:26:18 -08:00
3c24205b67 Merge remote-tracking branch 'origin/7936-add-discrete-event-visualization' into 7936-add-discrete-event-visualization 2024-12-18 16:39:08 -08:00
65b1f0256d Closes #7936
- Fixed previous change that broke grid layout of Stacked Plots in Time Strip.
- Re-enabled code that sets min-height for Stacked Plots in Time Strip based
on the number of children.
2024-12-18 16:38:57 -08:00
8c72e4a062 Closes #7936
- Remove `c-menu` from Tooltip.
- Tooltip component tweaks.
2024-12-18 11:46:47 -08:00
601fc33e75 trigger off selection for extended line hilight 2024-12-18 20:39:55 +01:00
638b03c17d spelling 2024-12-18 16:23:23 +01:00
531ef3ef1b good job tests 2024-12-18 15:54:51 +01:00
68fc3172a0 Merge branch '7936-add-discrete-event-visualization' of github.com:nasa/openmct into 7936-add-discrete-event-visualization 2024-12-18 09:19:57 +01:00
51d96544ec fix selection issue 2024-12-18 09:19:50 +01:00
546714b3dc Closes #7936
- Styling added to tooltip for event severity.
2024-12-17 23:44:58 -08:00
099153ba4e Closes #7936
- Changed `--hovered` to `--hilite`.
2024-12-17 16:42:30 -08:00
27af030566 Mods to Event Generator and limit provider
- Changed SEVERE to use `is-event--purple` style.
- Mods to EventTelemetryProvider.js:
  - Adds a more random start time to each event.
  - Reduces frequency at which a severity is applied to events.
2024-12-17 16:27:45 -08:00
b865d8c038 Closes #7936
- Moved all event line styling into events-view.scss.
- Refactor `*__event-wrapper` to `*__event-line`.
- Event line color styling for hover and `s-select`.
- New theme constants for `$colorEvent<color>Line`.
- Removed `--no-style` CSS class; created unnecessary need to override.
2024-12-17 16:23:44 -08:00
2ae1fe1579 resolve conflicts 2024-12-17 20:08:30 +01:00
cba7c7f8ed remove is selected, add hover event for extended liens 2024-12-17 20:04:16 +01:00
49a106b79e Closes #7936
- Remove `element-handle`.
2024-12-17 09:56:41 -08:00
f4ec532357 add tests 2024-12-17 13:44:49 +01:00
72ff0bced6 start e2e testing 2024-12-17 12:31:35 +01:00
36d31973fe bump priority for our timeline view 2024-12-17 11:46:57 +01:00
3af9083f89 add a random severity 2024-12-17 10:50:16 +01:00
2ba6bc9c73 ensure metadata exists on events 2024-12-17 10:21:48 +01:00
aaa2e43796 Closes #7936
- Removed event handle again.
2024-12-16 17:43:16 -08:00
6bda108e95 Closes #7936
- Layout converted to set `min-height` on top-most `c-swimlane` element.
Interior containers now use 100% height or absolute positioning.
- Removed `c-timeline-holder` from `c-events-tsv` in EventTimelineView.vue;
Refactored `c-events-tsv__contents` to be `js-events-tsv` as that was being used as a reference.
- New theme constant `eventLineW` sets event lines to be 1px wide for more precision.
2024-12-16 16:14:38 -08:00
20426fe359 add tooltip class and only offset swimlane 2024-12-16 20:30:16 +01:00
20247bbd87 only add left margin to container 2024-12-16 20:19:52 +01:00
62b4975d57 add selection class 2024-12-16 13:19:43 +01:00
d048af108e add tooltip 2024-12-16 12:39:23 +01:00
cda7cc9d06 fix extended lines 2024-12-16 12:15:59 +01:00
d97f7c347b resolve conflicts 2024-12-16 11:50:26 +01:00
781d83410a add hovered effect for extended lines 2024-12-16 11:39:34 +01:00
64bd625d0b remove debugging code and extraneous classes 2024-12-16 10:31:47 +01:00
3d3f093c7e Closes #7960
- Removed bad `}` in TimeSystemAxis.vue.
- Removed `.u-contents` from line 129 of ganttChart.e2e.spec.js.
- Removed `event-handle` element; not needed.
- Changed `__event-wrapper` to not set height explicitly; uses absolute positioning.
- Added :before element to event-wrapper for better hit area.
- Improved hover styling.
- $colorEvent* style constants added to theme constant SCSS files.
2024-12-13 17:42:46 -08:00
38292953fc Closes #7960
- Removed in-page `style` defs from ExtendedLinesOverlay.vue; CSS actually located in timeline.scss.
- Improved sizing and style for Marcus Bains ("now") line.
- Removed extraneous padding at bottom of plot view when in Time Strip.
- Added missing header info to timeline.scss.
- CSS refinements.
2024-12-13 14:43:55 -08:00
96d8870f22 watch for left offset changes 2024-12-13 15:47:44 +01:00
aaec052783 add title 2024-12-13 12:36:02 +01:00
6f26add740 works per swimlane now 2024-12-13 11:39:58 +01:00
052129ba87 ensure colored lines work 2024-12-13 10:35:18 +01:00
d046ad13ff extended events 2024-12-12 16:06:36 +01:00
e9f120a480 button works 2024-12-12 14:55:31 +01:00
0db301dea8 add facility to send action to mounted component regarding extending lines 2024-12-12 14:05:14 +01:00
3b236cc33b pass event bus 2024-12-11 17:20:08 +01:00
8b5e2f4595 remove undefined 2024-12-11 11:55:22 +01:00
5b006b69b7 inspector and colors work 2024-12-11 11:34:07 +01:00
2776cc8ac9 inspector works 2024-12-11 11:06:02 +01:00
55bed6a525 Merge remote-tracking branch 'origin/master' into 7936-add-discrete-event-visualization 2024-12-11 09:32:09 +01:00
944634d759 adding inspector 2024-12-10 18:21:38 +01:00
7af3996d29 fix events not being removed 2024-12-10 12:01:27 +01:00
7b22cf3371 going to try with YAMCS data 2024-12-10 11:16:47 +01:00
5be103ea72 modified the sanitizeForSerialization method to remove unnecessary re… (#7950)
modified the sanitizeForSerialization method to remove unnecessary recursion, update e2e test to CORRECTLY test the functionality
2024-12-09 20:34:07 +00:00
680b0953b2 more scaffolding 2024-12-09 16:46:56 +01:00
3159de08b1 initial structure 2024-12-09 10:32:42 +01:00
d74e1b19b6 In progress activities that are out of bounds are shown (#7945)
If an activity is out of bounds, but in progress, display it in the currently visible list.
2024-12-06 22:38:27 +00:00
5bb6a18cd4 [Notebook] Browse Bar holding onto stale model, reverts changes (#7944)
* moving rename methods to appActions

* importing back into original test

* reverting

* add the ability to change the name in the browse bar

* add test to verify entries are not being lost

* addding aria labels for tests

* when an object is changed, store the whole new object, not just the name

* typo!
2024-12-06 14:13:08 -08:00
14b947c101 fix vue reactivity of rows by changing the reference of the updated row (#7940)
* do not call `updateVisibleRows` on horizontal scroll
* add example provider for in place row updates
2024-12-04 11:27:52 -08:00
61b982ab99 [Telemetry API] Prevent Subscriptions with different options from overwriting each other (#7930)
* initial implementation

* cleaning up a bit

* adding the hash method back as we dont want gigantic keys

* adding a line

* added filtering to state generator, updated filters readme to fix error, more robust hash function

* removing unnecessary changes in wrong file

* adding a test to confirm each endpoint has a separate subscription based of filtering

* lint

* adding back in hints, accidentally removed

* remove some redundant code and convert sanitization method into a replacer function for stringify

* tweaking serialize replacer to handle arrays correctly, adding more determinative row addition check to test

* more focused selector for the table

* simplified the serialization method even further and added some more docs
2024-12-04 03:33:15 +00:00
ba4d8a428b [Gauge Plugin] Fix Missing Object handling (#7923)
* checking if the metadata exists before acting on it

* added a test to catch missing object errors in gauges

* remove waitForTimeout and add in check for time conductor successful start offset update

* hardening the test by checking for the time before the time change

* add "pageerror" to cspell
2024-12-03 15:13:51 -08:00
ea9947cab5 Use the disabled attribute on a valid element - the button. (#7914)
* Use the disabled attribute on a valid tag - the button.

* Add e2e test to check for add criteria button being enabled

* Improve test

* Check for add criteria button to have attribute disabled

* Remove focused test
2024-11-05 20:53:28 +00:00
2010f2e377 chore: bump @playwright/test to v1.48.1 (#7913) 2024-10-21 17:03:54 -07:00
3241e9ba57 chore: remove release.yml (#7907) 2024-10-18 15:43:57 -07:00
057a5f997c Encode urls for css background images (#7906)
* Add new utility to encode urls.
Use the encode urls utility to encode all background images in css

* need a commit to pull exampleimagery from

* skip and fix on otherside

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-10-18 19:59:02 +00:00
078cd341a5 Bump references to support node22 (#7901)
* Bump references to support node22

* strings!

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-10-18 10:07:26 -07:00
518b55cf0f fix(vipergc-660): identify axis keys upon adding object to composition (#7897)
* fix: identify axis keys upon adding object to composition

* fix: set yKey to 'none' if nonArrayValues
2024-10-17 15:08:52 -07:00
3e23dceb64 fix(#7892): restore "now" (marcus bains) line to planning views (#7898)
* Initialize alignment offset to 0. (it was undefined). Also handle a small bug with swimlane configuration not getting replaced when the plan used by a gantt chart was changed

* lint: fix

* test: update visual tests to mock clock and show now line

---------

Co-authored-by: Mazzella, Jesse D. (ARC-TI)[KBR Wyle Services, LLC] <jesse.d.mazzella@nasa.gov>
2024-10-17 14:24:26 -07:00
7f8b5e09e5 Fix gantt chart swimlane order (#7895)
* Use the planObject to get ordered swimlane names

* If there is no plan object, don't try to render the chart

---------

Co-authored-by: Jamie V. <jamie.j.vigliotta@nasa.gov>
2024-10-17 17:28:55 +00:00
7c2bb16bfd Bugfix/7873 time conductor input validation (#7886)
* validate on change because input is too aggressive
* validate logical bounds on submit
* perfection
2024-10-16 18:57:56 -07:00
890ddcac4e Revert d8c5095ebb (#7894) 2024-10-16 09:57:24 -07:00
d8c5095ebb add environment variable check 2024-10-16 09:08:34 -07:00
ccf7ed91af fix(vipergc-574): Use selected shelve duration for fault management (#7890)
* refactor: `Indefinite` -> `Unlimited`
* refactor: remove unused const
* fix: use the selected shelveDuration
* fix: set and use default if none selected
* fix: bad optional chaining
* fix: handle the case of no provider
* fix: don't assign defaults if no provider
2024-10-15 23:26:57 +00:00
2b8673941a Don't persist current tab when display is locked (#7882)
Check if a display is locked before saving current tab. 

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-10-11 16:17:29 -07:00
703186adf1 Add script to lock object sub-tree and fix object locking bugs (#7855)
* Script for locking an object tree

* Show lock button if locked

* Do not allow properties editing of locked objects

* Remove package-lock.json

* Added p-debounce

* Allow duplication of locked objects

* Better user feedback

* Add semaphores to prevent file handle exhaustion

* Leverage official Apache Couch library - nano. Clean up dependencies. Default to environment variables for couch config. Simplify batching mechanism to make it synchronouse

* Added lock user attribution

* Remove unused code

* Modify open script for adding auth design doc

* Added script for creating auth design doc

* Add css class for disallow unlock

* Add user attribution to lock button

* Fix import

* Typo

* User it was locked by, not current user. Wow.

* Closes #7877
- Front-end sanding and shimming: displays <span> instead of button when domainObject.disallowUnlock.

* Fixed bug where lock is shown even if object is not locked

---------

Co-authored-by: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-10-10 15:09:39 -07:00
c43ef64733 [Telemetry Tables] Fix sort issues (#7875)
* Issue where immutable objects sort order was not being set correctly in telemetry tables. 
* Configuration couldn't be saved and the sort order was not being saved in memory. 
* Telemetry was not being re-requested when the sort order of a table was changed and the table was in performance (limited) mode.
* We've moved sort order to both configuration and in-memory and we will re-request telemetry if changing sort order in performance mode.

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-10-10 14:24:31 -07:00
f4cf9c756b test(visual): Stabilize compass per timestamp (#7866)
* feat: add function to generate a seeded random value

* fix: produce the same compass orientation per timestamp
- helps for consistent visual tests

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-10-10 10:52:42 -07:00
4415fe7952 Fix complex displays not loading (#7858)
Clock
* pass in default timeContext in request options
* observe for clock tick, instead of polling, to determine if clock has time set

Progress Bars
* use scale instead of move animation

Plan
* use a ResizeObserver instead of polling for size changes

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
Co-authored-by: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-10-08 13:10:35 -07:00
83e4a124e2 Fix table sorting in descending order (#7863)
When adding sorted arrays to the beginning, make sure to insert them in the same order and not accidentally reverse them while inserting.

Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-10-08 13:56:28 +00:00
47f0b66c7e [CI] Fix flake with clocks and state generators (#7867)
* add two appActions

* replace with appAction

* replace with determinsitic appAction

* fix lint

* speed
2024-10-04 15:47:25 -07:00
55c023d1eb chore: it is 2024. (#7864) 2024-10-03 06:28:26 -07:00
37b2660f27 [Conditionals] Increase performance, switch to TelemetryCollections (#7841)
* adding telemetry collections to condition manager

* handling telemetry collection data not datum

* adding from maaster

* addressing PR comments

* update unit test to work with telemetry collections

* fixing tests

* removing unnecessary addition

* removing focused describe

* removing focused it

* fix weird test bleed

* adding test for conditional styling

* removing some auto fix es-lint

* got a bit overzealous

* clarification

* using raf utility which handles it correctly and moving visiblity handling into the raf for consistency and performance

* using raf correctly

* removing raf, was causing issues

* move the test and add some determinism

* oops only

* missed lint

* got it!

* fix comments

* test(condStyling): stabilize test

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-10-02 14:14:15 -07:00
43cc963328 chore: bump @playwright/test to 1.47.2 (#7859) 2024-10-01 21:01:02 +00:00
ad30a0e2d0 feat(Fault Management): allow fault providers to define shelve durations (#7849)
* refactor: clean up FaultManagementView code

* feat: providers can now provide "Shelve Duration" options

* fix(exampleFaultSource): support `getShelveDurations`

* a11y: aria label for fault management list item

* a11y(FaultManagement): more labels

* refactor: eliminate some faultUtils and refactor locator() out of tests

* docs: add some more docs to fault management api

* refactor: make for loop more readable

* test: use static faults when testing

* fix: set a timestamp for static faults and subtract so we get faults in order

* refactor: autoformat

* chore: add missing copyright header

* fix: use as default parameter to get value as method is called

* refactor: make magic number a const

* fix(codecov): use codecov github action to upload

* fix: generate the report

* build: update circleci yml to use codecov orb

* build: remove codecov scripts and package

* build: don't use the orb because things can't be easy

- nasa org disallows "third party" orbs

* build: only use `sudo` if we ain't da root user

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-10-01 10:41:18 -07:00
29f1956d1a Improve telemetry buffering implementation (#7837)
* Simplifies the implementation of telemetry buffering in Open MCT.
* Switches from per-parameter buffering to a shared queue. Per-parameter buffering is too easily overwhelmed by bursts of telemetry from high-frequency parameters. A single shared buffer has more overhead to grow when a burst arrives without overflowing, because the buffer is shared across all parameters.
* Removes the need for plugins to pass serialized code to a worker.
* Switched to a "one-size-fits-all" batching strategy removing the need for plugins to define a batching strategy at all.
* Captures buffering statistics for display in the PerformanceIndicator.
2024-09-30 14:36:40 -07:00
c498f7d20c Fix bad color value for Gauge 'Needle' type (#7821)
* Closes #7820
- Fix 0 opacity fill in theme constants files for Gauge type needle.

* move gauge plugin to its own suite

* add two more snapshots

* driveby: fix some flake

* bug: update linting rule

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-09-28 09:17:32 -07:00
a8fbabe695 fix(#7825): imagery pause (#7842)
* more readable

* unpause explicitly

* fix jsdoc

* e2e testing multiple image removal

* prettier

* fix to remove multiple images from history

* move tests that use playwright clock api into own file

* fix playwright clock tests

* add aria-label to element

* prevent straggler debounced function call on unmount

* clean up and fix tests

* update paths

* lint fix

* lint fix

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-09-27 14:32:14 -07:00
e792403788 Bar graphs should only get latest historical datum (#7811)
* Only as for latest historical telemetry

* Add test for size 1 request when a bar graph is loaded

* Use strategy latest instead of size 1 for historical request

* Fix linting issues

* Add size and strategy

* Remove bar graph tests

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-09-25 09:37:38 -07:00
de122b91c2 [Build] Update tsconfig to explicitly set target and module options (#7845)
* bugfix: update tsconfig to set module to NodeNext and exclude openmct/e2e

* chore: remove unnecessary paths from exclude

- the `exclude` option only excludes files in the context of the `include` paths, if there are any. We can remove some of these because they don't match anything in the include paths.

* chore: fix capitalization for consistency

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-09-16 23:23:56 +00:00
fa8efa858b [Build] Update package lock to reference correct version of package and also update the browserlist (#7843)
chore: update package lock to 4.1.0-next and update browserlist
2024-09-13 07:52:58 -07:00
26578e849d chore: bump version to 4.1.0-next (#7832)
chore: bump version to 4.1.0-next
2024-09-10 23:14:22 +00:00
fccae3bd49 Don't change sort order when changing performance mode (#7810)
* adding an option to no swap order to initiatSort

* debug

* defaulting to desc order for requests if there is not saved order

* adding some common constants

* replace all got into a comment

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-09-10 02:28:05 +00:00
440474b2e3 fix(conditional styling): conditional visibility for images and alpha-numerics in display layouts (#7824)
* fix: apply `is-style-invisible` className to image and alphanumeric items

* test: generate storagestate file with basic condition set

* refactor: small a11y additions for Toolbars

* test: add suite for display layout conditional styling

* fix: make condition true half of the time

* fix: use a period of 5 so tests are more stable

* test: mark as slow

* test: use inline base64 image text instead of a url

* fix: use vue reactivity system to conditionally show these objects

* test: use tiny base64 image

* fix: condition for v-show

* fix: use both v-if and v-show to toggle visibility

* refactor: convert to ES6 class

* fix: remove focused test

* fix: switch back to a div due to visual artifacts. settle for an aria role instead

- IT'S CALLED COMPROMISE!
2024-09-09 22:41:29 +00:00
21a4335c4e chore: re-enable perf/mem tests on PR + fix broken locator in imagery perf test (#7806)
* test: fix broken locator in imagery perf test

* Prevent this from happening

* make rule explicit

* test: maintain `locator()` pattern for contract tests

* test(couchdb): try some new techniques to stabilize the test

* Revert "test(couchdb): try some new techniques to stabilize the test"

This reverts commit 9aa1ea95a1.

* chore: revert to `networkidle` and disable eslint rule

* test: add `@network` annotation for tests with real network requests

---------

Co-authored-by: Hill, John (ARC-TI)[KBR Wyle Services, LLC] <john.c.hill@nasa.gov>
2024-08-13 21:55:57 +00:00
0413e77d8a test(e2e): Major refactor and stabilization of e2e tests (#7581)
* fix: update broken locator

* update eslint package

* first pass of lint fixes

* update package

* change ruleset

* update component tests to match linting rules

* driveby

* start to factor out bad locators

* update gauge component

* update notebook snapshot drop area

* Update plot aria

* add draggable true to tree items

* update package

* driveby to remove dead code

* unneeded

* unneeded

* tells a screenreader that this is a row and a cell

* adds an id for dragondrops

* this should be a button

* first pass at fixing tooltip selectors

* review comments

* Updating more tests

* update to remove expect expect given our use of check functions

* add expand component

* move role around

* update more locators

* force

* new local storage

* remove choochoo steps

* test: do `lint:fix` and also add back accidentally removed code

* test: add back more removed code

* test: remove `unstable` annotation from tests which are not unstable

* test: remove invalid test-- the "new" time conductor doesn't allow for millisecond changes in fixed time

* test: fix unstable gauge test

* test: remove useless asserts-- this was secretly non-functional. now that we've fixed it, it makes no sense and just fails

* test: add back accidentally removed changes

* test: revert changes that break test

* test: more fixes

* Remove all notion of the unstable/stable e2e tests

* test: eviscerate the flake with FACTS and LOGIC

* test: fix anotha one

* lint fixes

* test: no need to wait for save dialog

* test: fix more tests

* lint: fix more warnings

* test: fix anotha one

* test: use `toHaveLength` instead of `.length).toBe()`

* test: stabilize tabs view example imagery test

* fix: more tests be fixed

* test: more `toHaveCount()`s please

* test: revert more accidentally removed fixes

* test: fix selector

* test: fix anotha one

* update lint rules to clean up bad locators in shared fixtures

* update and remove bad appActions

* test: fix some restricted notebook tests

* test: mass find/replace to enforce `toHaveCount()` instead of `.count()).toBe()`

* Remove some bad appActions and update text

* test: fix da tree tests

* test: await not await await

* test: fix upload plan appAction and add a11y

* Updating externalFixtures with best practice locators and add missing appAction framework tests

* test: fix test

* test: fix appAction test for plans

* test: yum yum fix'em up and get rid of some dragon drops

* fix: alas, a `.only()` got my hopes up that i was done fixing tests

* test: add `setTimeConductorMode` test "suite" which covers most TC related appActions

* test: fix arg

* test(couchdb): fix some network tests via expect polling

* Stabalize visual test

* getCanasPixels

* test: stabilize tooltip telemetry table test, better a11y for tooltips

* chore: update to use `docker compose` instead of `docker-compose`

* New rules, new tests, new me

* fix sort order

* test: add `waitForPlotsToRender` framework test, passthru timeout override

* test: remove `clockOptions` test as we have `page.clock` now

* test: refactor out `overrideClock`

* test: use `clock.install` instead

* test: use `clock.install` instead

* time clock fix

* test: fix timer tests

* remove ever reference to old base fixture

* test: stabilize restricted notebook test

* lint fixes

* test: use clock.install

* update timelist

* test: update visual tests to use `page.clock()`, update snapshots

* test: stabilize tree renaming/reordering test

* a11y: add aria-label and role=region to object view

* refactor: use `dragTo`

* refactor: use `dragTo`, other small fixes

* test: use `page.clock()` to stabilize tooltip telemetry table test

* test: use web-first assertion to stabilize staleness test

* test: knock out a few more `page.click`s

* test: destroy all `page.click()`s

* refactor: consistently use `'Ok'` instead of `'OK'` and `'Ok'` mixed

* test: remove gauge aria label

* test: more test fixes

* test: more fixes and refactors

* docs: add comment

* test: refactor all instances of `dragAndDrop`

* test: remove redundant test (covered in previous test steps)

* test: stabilize imagery operations tests for display layout

* chore: remove bad unicorn rule

* chore(lint): remove unused disable directives

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-08-07 21:36:14 +00:00
4ee68cccd6 docs: better docs and types for the API (#7796)
* docs: fix type imports in openmct.js

* docs: fix type imports

* docs: fix types for eventHelpers

* docs: types for TypeRegistry

* docs: types for StatusAPI

* docs: fix ObjectAPI types and docs

* docs: more types

* docs: improved types for main entry

* docs: improved types

* fix: unbreak the linting

* chore: remove EventEmitter webpack alias as it hide types

* fix: return type

* fix: parameter type

* fix: types for composables

* chore: add webpack consts to eslintrc

* fix: remove usage of deprecated timeAPI methods and add a ton of docs and types

* docs: update README.md

* lint: clean up API.md

* chore: upgrade eventemitter to v5.0.2

* refactor: update imports for EventEmitter to remove alias

* format: lint

* docs: update types for Views and ViewProviders

* docs: expose common types at the base import level

* docs(types): remove unnecessary tsconfig options

* docs: ActionAPI

* docs: AnnotationAPI

* docs: import common types from the same origin

* docs: FormsAPI & TelemetryAPI types

* docs: FormController, IndicatorAPI

* docs: MenuAPI, ActionsAPI

* docs: `@memberof` is not supported by `tsc` and JSDoc generation so remove it

* docs: RootRegistry and RootObjectProvider

* docs: Transaction + Overlay

* lint: words for the word god

* fix: review comments
2024-07-31 10:46:16 -07:00
e3fcbe1a35 fix(#7791): tc form shouldn't submit bounds changes on dismiss (#7792)
* fix(#7791): tc form shouldn't submit bounds changes on dismiss

* test(e2e): add tests for validating time conductor popup

- update appAction for setting time conductor in fixed mode
- add a11y to time conductor in fixed mode
- update tests using `setTimeConductorBounds`

* fix(#7791): actually fix the problem. Also, add a test.

* test: add annotation to regression test

* docs: comments

* test: fix the reset image button flake ONCE AND FOR ALL

- wait for the rightmost image thumbnail to be in the viewport :D

* test: add tests for `setTimeConductorMode` and `setTimeConductorBounds`
2024-07-25 23:55:50 +00:00
689f7cc815 test(e2e): stabilize flaky imagery tests (#7765) 2024-07-23 20:41:07 -07:00
1fae0a6ad5 fix(#6812): Align Plot and Plan X-Axes in Time Strips (#7744)
* DRAFT - alignment for axes

* Use alignmentContext to manage tick widths instead of passing around as props

* Remove log statements

* Add ability to remove alignment widths for a given y axis

* Fix computation of left margin and width of plan when in the timestrip

* Remove excess padding when there is no left y axis

* Use alignment composable to adjust left margin and width of time system axis

* Fix now marker visibility

* refactor: use built in `Map()` data structure

* refactor: improve readability and conciseness

* docs: improve jsdocs

* refactor: move jsdoc typedefs to bottom of file

* refactor: axis to use vue reactivity

* fix: return alignment as an object of refs

* alignmentMap needs to be shared state, move it out of the useAlignment composable.

* Fix now marker offset

* Add new visual test for time strips

* update with animation stabilization

* Fix failing test due to changed injected property (path -> objectPath)

* change injected property from path to objectPath

* Fix spelling

* Remove unused arguments to function call

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: Hill, John (ARC-TI)[KBR Wyle Services, LLC] <john.c.hill@nasa.gov>
2024-07-22 16:05:21 -07:00
762762945d chore: bump playwright to 1.45.2 (#7785)
* chore: bump playwright to `1.45.2`

* chore: update package-lock
2024-07-16 18:51:44 +00:00
c763937455 chore: disable codeql scanning for e2e/ folder (#7784) 2024-07-16 11:26:35 -07:00
db808b4d54 Plots correctly use configuration set on the parent if they can't their own (#7770)
* For telemetry that cannot have it's own configuration, ensure that it is correct initialized by the parent.

* stacked plot test checks that config properties for immutable telemetry points are applied correctly

* add tab navigation to inspector tabs

* add accessibility metadata to this component

* Update title to be on the correct component. Add expand/collapse logic

* clean up test

* refactor: better a11y for plot forms, fix "expand by default" test, refactor out `plotActions.js`

* a11y: aria label for plotOptionsItem

* refactor(a11y): PlotOptionsBrowse structure to have better a11y

* fixed tests

* address comment

* reverted to match previous commit

---------

Co-authored-by: Hill, John (ARC-TI)[KBR Wyle Services, LLC] <john.c.hill@nasa.gov>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-07-16 10:57:12 -07:00
6983148aba fix(package.json): consistent props (#7768) 2024-07-15 22:09:42 +00:00
92e5cba6d3 test(visual): skip flaky visual test (#7776) 2024-07-15 13:28:29 -07:00
0215a5b693 chore: bump playwright to version 1.45.0 (#7762) 2024-07-02 21:04:39 +00:00
291c0997a6 chore(cspell): grammar fixes (#7735)
* chore(cspell): grammar fixes

* chore: remove valid words

* fix(cspell): resolve linting errors

* fix(naming): change filename

* fix(cspell): resolve linting errors

* fix(spelling): remove wrong word

* fix(review): redundant wording
2024-07-01 10:38:26 -07:00
393da7dc62 chore(deps): bump ws, engine.io and socket.io-adapter (#7761)
Bumps [ws](https://github.com/websockets/ws), [engine.io](https://github.com/socketio/engine.io) and [socket.io-adapter](https://github.com/socketio/socket.io-adapter). These dependencies needed to be updated together.

Updates `ws` from 8.11.0 to 8.17.1
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.11.0...8.17.1)

Updates `engine.io` from 6.5.4 to 6.5.5
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.5.4...6.5.5)

Updates `socket.io-adapter` from 2.5.4 to 2.5.5
- [Release notes](https://github.com/socketio/socket.io-adapter/releases)
- [Changelog](https://github.com/socketio/socket.io-adapter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-adapter/compare/2.5.4...2.5.5)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io-adapter
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 05:36:49 -07:00
448750ca59 Fix some flaky percy behavior (#7756)
* update imagery to be static

* bump versions

* doesn't do anything

* does this do anything

* undo only

* update the hardcoded urls

* add ignore CI logs push

* downgrade to test

* update the package lock

* Add some more noise reduction

* move to elements tab so that there is no time-based component

* stability
2024-06-25 05:08:01 +00:00
554f77c42f [a11y] re-enable and fix all failing plan tests (#7753)
* enable planning a11y tests

* Fix all a11y failing tests

* drive-by: missed clean

* test: attempt to fix parallelization

* split the test 3 ways

* lint

---------

Co-authored-by: Hill, John (ARC-TI)[KBR Wyle Services, LLC] <john.c.hill@nasa.gov>
2024-06-21 16:37:36 -07:00
a5770817cc chore: re-enable a11y checks in visual suite (#7747)
* re-enable main test

* Enable tests and fix some failing ones

* revert accidental changes

* test(a11y): on failure, take a screenshot to disk

* test(visual): wait for the snapshot indicator to stop flashing

* Fix all failing tests

* test: disable a11y checks for planning suite

* lint:fix

* fix pathing issues

* build: increase visual-a11y parallelism from 2 to 4

* test: darkmatter theme a11y checks + snapshots-- ACTIVATE!

* test: fix file name and path

* fix(#7317): scott bell prophecy

* jk no credit for u

* chore: disable parallelism until we figure out what's going on

* chore: set parallelism to 2 in hopes it fixes percy

---------

Co-authored-by: Hill, John (ARC-TI)[KBR Wyle Services, LLC] <john.c.hill@nasa.gov>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-06-19 01:16:54 +00:00
34b4091204 fix(#7680): no index.html on npm pack (#7699) 2024-06-05 19:11:54 +00:00
6360bc4b6c Ensure time conductor mode is set when synchronizing time range (#7731)
* Use setMode API to set the time span as well as the bounds instead of the old bounds time API.

* Add test for synchronized time conductor via plots

* Fix linting issue
2024-06-03 16:17:41 +00:00
c354e1c2f1 If display bounds are out of sync with time conductor, don't purge data out of bounds (#7732)
* If we're paused, don't purge data out of bounds
* Refactor auto scale utility functions for reuse
* Create new test spec for plot controls
* Move plot related actions into it's own file
* Fix typo for imports
* Remove named exposedFunction as it is causing errors when the method is used on the same page more than once.
* Fix spelling
2024-06-03 15:46:05 +00:00
eba6f0f505 fix(#7670): Ensure objects unsubscribe from staleness when destroyed (#7736)
* clear any staleness subscriptions before viewing a new object

* add checkbox to options for createDomainObjectWithDefaults, update swg staleness provider to use new time api, add test

* revert

* modified for simplification and to remove the need to update helper methods

* consistent naming convention

* Update e2e/tests/functional/staleness.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* adding back vars that were removed

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-05-31 20:46:59 +00:00
017380bb6a chore: upgrade eventemitter to v5.0.2 (#7709)
* chore: upgrade eventemitter to v5.0.2
* fix: pass context to eventHelpers
* fix: no need to destroy router as it is destroyed during openmct teardown
* fix: register `CreateAction` and retrieve it from the registry
* test: fix tests
* refactor: import action key consts
* fix: update usage. don't use getters
Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>

---------

Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
2024-05-14 21:51:33 +00:00
810d580b18 [Telemetry Tables] Make sure tables auto scroll correctly on first load (#7720)
* run scroll method to scroll to top after initial load of historical data

* clarifying comment

* added e2e test to make sure tables auto scroll on mount

* adding descriptive comments

* adding in ascending check as well

* added new appAction for navigating to/in realtime, using it in table scroll test

* lint

---------

Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
2024-05-09 11:53:11 -07:00
977792fae8 this is 2024. * observers no more. (#7715)
* this is 2024. `*` observers no more.

* add edit and save domain object helper functions

* add aria-labels and fix e2e tests to use new labels

* generate and save in local storage a condition set with telemetry and condition

* rename const

* move creation code out of generateLocalStorage since it is immutable

* remove function abstractions

* remove @localStorage test label

* Update e2e/tests/functional/plugins/conditionSet/conditionSet.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* Update e2e/tests/functional/plugins/conditionSet/conditionSet.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* Update e2e/tests/functional/plugins/conditionSet/conditionSet.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* Update e2e/tests/functional/plugins/conditionSet/conditionSet.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* remove unneccesary aria text

* remove unneccessary aria text

* use recommended playwright locators

* lint fix

* remove unneccesary steps now that child created directly in parent

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-05-09 11:19:55 -07:00
a69e300f1c chore: bump playwright to v1.44.0 (#7716) 2024-05-09 08:20:31 -07:00
17bc6cb722 chore(webpack): destruct version from pkgJson (#7713) 2024-05-07 08:52:41 -07:00
b3d3465734 [Darkmatter] Create new darkmatter theme (#7682)
* initial theme plugin setup, changes to layout frames

* update visual tests

* Changes to gauge, layout borders, and background

* Make background image a DIY theme variable. Fixes made to gauges. Deleted custom font.

* More changes to overall background colors. Added glass layer effect to menus

* changes to menu

* Fix to make theme easy to run

* Fix tab colors and add glass background to menus

* make highlightd corners longer

* Initial changes to font styles

* Add temporary numeric font style. Test numeric font in gauges.

* Initial changes to alphanumerics in layouts

* Updated variables

* update plugin.js file

* Fix highlighted corners on frames such that it uses outermost frame

* renaming theme plugin and rename branch

* fix button colors to be more readable

* change background image

* Fix bad merges from other theme files. Fix gauge and alphanumerics such that they dont have darkmatter borders

* more fixes

* Fix where mixin is used such that when an object's frame is hidden, highlgihts disappear

* remove blur from meter gauges

* Add comment about this theme being in beta mode

* Delete draft .scss file that is no longer needed

* Fix major accessibility issues

* Fix PR review comments

*  fix: Correct import file name for DarkMatter theme.

* Fix other theme code that was failing e2e tests

* Revert index.html

* Fix linting error

* Fix for failing percy test regarding padding

* Fix for failing percy test regarding padding part 2

* Fix for failing percy test regarding padding part 3

* Remove mixin that may be causing percy issue

* Another fix to resolve percy issue

* Add back some code that was deleted during debugging, and create new variables for the object padding

* Fix gradient clipping in inspector

* Restructure all constants-.scss files

* Change bg image to be square and NASA official picture

* Final fixes to darkmatter variable layouts

* Address PR comments

* Change darkmatter to darkmatterTheme

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-04-25 16:06:07 -07:00
fb0d74e87f chore(deps-dev): bump vue from 3.4.19 to 3.4.24 (#7702)
Bumps [vue](https://github.com/vuejs/core) from 3.4.19 to 3.4.24.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.4.19...v3.4.24)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 13:19:00 -07:00
a961d7e3bf Fix nested Flexible Layout direction problem (#7637)
* Closes #7635
- More specific approach to CSS class application for column vs. row layouts.
- Added layout direction CSS classing to `c-fl-container__frames-holder`.
- Switched toolbar icon and titling for better parity with
'toggle' approach used elsewhere.
- Cleaned up duped property def in mixin.

* Addressing PR change requests
- Updated e2e test.
- New computed properties for layout direction.
- CSS code cleanup.

* fix selector in test

* fix more bad selectors

* fix changed title

---------

Co-authored-by: David Tsay <david.e.tsay@nasa.gov>
2024-04-18 23:38:11 +00:00
5a06b51c5a refactor: remove the final .bounds() call (#7695)
 refactor: Use getBounds method instead of bounds in IndependentTimeContext.
2024-04-17 16:19:21 +00:00
ef8b353d01 Improve performance of JSON import and add progress bar (#7654)
* add progress bar

* improves performance a lot

* fix test

* remove old function

* fix legit bug from test - well done tests

* add constant, better comments

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-04-16 21:23:31 +00:00
6c5b925454 chore: remove all usage of deprecated Time API methods (#7688)
* chore: remove all usage of deprecated Time API methods

* test: update unit test

* docs: Fix spacing and add clarity to TimeConductorBounds definition.

* test: add unit test coverage for new time api methods
2024-04-16 21:12:09 +00:00
e91aba2e37 Handle paste events for images and text properly (#7679)
* enable eval source maps for debugging

* split image and text paste handling
better event handling

* change back source maps

* image takes precedence over text

* break up notebook entry functions for re-use

* create hotkeys utils
add clipboard functions

* add notebook paste test

* add test for pasting to selected but not editing entry

* link tests to issue

* jsdoc addition

* jsdocs

* no need to import then export

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* fix changed path

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-04-16 13:54:40 -07:00
b18aa48141 Revert "Handle the case where the pasted data is not an image" (#7668)
Revert "Handle the case where the pasted data is not an image (#7628)"

This reverts commit d33da65dae.
2024-04-04 15:03:45 -07:00
d33da65dae Handle the case where the pasted data is not an image (#7628)
* Handle the case where the pasted data is not an image or it is image AND text
* Change method name for paste handling

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-04-04 21:30:12 +00:00
e3adeb6a75 Do not add unused created attribute to metadata of couch documents on create (#7656)
this isn't used anywhere

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-04-04 13:33:36 -07:00
de3dad02b5 [Telemetry Tables] Don't mutate configuration if object is not able to be persisted (#7626)
* source maps

* do not persist if obj is not persistable

* nope

* prevent mutation of configuration

* static roots are read only by nature

* helps to use functions correctly

* update persistModeChange logic

* remove debug

* remove unnecessary change
2024-04-04 00:38:59 +00:00
311ad0b87a fix(e2e): specify .nyc_output path as custom config setting (#7658)
* fix: specify .nyc_output path as custom config setting

* fix: coverage for mobile suite

* fix: pathing in playwright configs
2024-04-01 18:29:47 +00:00
f98eb31956 fix: move file to correct folder (#7652) 2024-03-28 17:32:46 -07:00
1671a585fb Mct7636 (#7645)
* setting order for sort to descending if in performance mode and no sort set

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-03-28 17:32:03 -07:00
a3fb84ad43 chore: remove type: module, create openmct-e2e subpackage (#7590)
* fix: remove mystery webpack code

* fix: remove type:module and specify exports

- we aren't a module... yet

* fix: rename webpack*.js to webpack*.mjs so we can use import/export. fix imports

* fix: exports format

* fix: woops, need to add `start` script back

* chore: split e2e into its own module

* fix: use normal Painterro import

* fix: update e2e pathing

* fix: copy over helper functions

* chore: specify `cwd` for playwright configs so that openmct npm commands work as intended in any environment

* chore: add pretest script to e2e package.json

* chore: don't package e2e

* refactor: tidy up webpack common config

* chore: compile types to a single file

* chore: fix visual test npm scripts

* chore: fix import pathing

* chore: define package exports, move test specific dependencies to the subpackage

* chore: export test framework from openmct-e2e

* chore: export baseFixtures also

* chore: let `openmct` and `openmct-e2e` share `node_modules/`

* chore: use `--workspace`, remove pretest script

* Revert "fix: remove mystery webpack code"

This reverts commit eb14d52569ffa27ab1a090b883694f4707b59cd0.

* chore: update package-lock

* chore: add `.npmignore`

* fix: *js -> mjs
2024-03-28 14:49:00 -07:00
a5c6b141a6 chore(deps-dev): bump express from 4.18.3 to 4.19.2 (#7646)
Bumps [express](https://github.com/expressjs/express) from 4.18.3 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.3...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 13:12:48 -07:00
46823ec225 chore(gha): run prcop workflow on milestone (#7647)
chore: run prcop workflow on milestone
2024-03-27 09:09:57 -07:00
5b4ee1949f fix(#7623): Resize ConductorAxis properly (#7624)
* fix: resize conductor properly

* refactor: more computed properties, unregister listener

* fix: beforeUnmounted hook

* test(visual): add time conductor visual test for fixed mode

* fix: initialize to `null`

* feat: extend the base `screenshot` function to mask elements which will always create variance in an Open MCT screenshot

* docs: add types for fixtures

* fix: remove unneeded await

* chore: add sinon timers types package back

* docs: remove unused docs

* doc: remove unused docs

* test: add visual realtime url, update imports

* feat: provide wrapped page.screenshot fixture that applies defaults

* test: add basic timeConductor snapshot tests

* chore: update eslint config

* lint: remove unused disable directives

* test: remove redundant navigation

* fix: remove listeners

* fix: maybe stabilize unit tests

* docs: remove

* fix: provide sourcemaps in unit tests

* test: add regression snapshot test for time conductor axis

* lint: remove unused imports

* feat(e2e): add fixture to manually tick the clock and use it

* test: reactivate test now that we don't use deploysentinel :(

* test: update snapshots

* test: add test for clockOptions and tick fixtures

* test: add afterEach stub and fixme

* test: try and stabilize fault management flake

* lint: defy the word gods

* chore: ignore `*-darwin.png` screenshots

* chore: remove darwin screenshot binaries

* docs: markdownlint

* docs: remove MacOS specific instructions from snapshot testing

* fix: remove a11y
2024-03-26 23:52:33 +00:00
7e926ccbb7 chore(deps-dev): bump webpack-dev-middleware from 7.0.0 to 7.1.1 (#7634)
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 7.0.0 to 7.1.1.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v7.0.0...v7.1.1)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 15:23:17 -07:00
6e264517f8 docs: Mission Status and more (#7521)
* chore: update tsconfig to target modern ES

* docs: update UserProvider

* docs: update UserAPI, make openmct private

* docs: update StatusAPI

* refactor: convert ViewRegistry to ES6 class

* docs: finish type imports for openmct api

* docs: minor doc improvements

* docs: add UserIndicator readme

* docs: add User API section to API docs

* docs: document Mission Status

* docs(JSDoc): primitive types should be lowercase, otherwise TitleCase
2024-03-26 19:11:00 +00:00
986da5782b Disable reload in preview (#7639)
disable reload in preview

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-03-26 16:58:47 +00:00
539138437b For an existing View in a Preview, ensure we pull the same ActionCollection (#7632)
* ensure action collection returned is the cached one from the same view

* add test

* use async await
2024-03-26 14:11:23 +00:00
493b31d0b9 fix(#7633): add missing await (#7643)
* fix(#7633): add missing `await`

* test: add LAD table e2e suite + test
2024-03-26 10:14:25 +00:00
d68ac31ab5 chore: bump @playwright/test to 1.42.1 (#7627)
* chore: bump `@playwright/test` to `1.42.1`

* chore(circleci): don't try to re-run individual percy tests
2024-03-21 09:27:41 -07:00
f504ee29cc fix: 🤖 beep boop beep, you forgot an await 🤖 (#7630)
* fix: 🤖 beep boop beep, you forgot an `await` 🤖

* add e2e test

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2024-03-20 20:20:48 +00:00
1d5ddc545e chore(deps-dev): bump @types/lodash from 4.14.192 to 4.17.0 (#7610)
Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.192 to 4.17.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 22:57:38 -07:00
42085a4b70 [CI] Parallelize visual test runs (#7618)
* rename suite and add parallelism

* use test sharding

* expect 2 parallel runs

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2024-03-19 20:50:14 -07:00
b2b0837592 Handle empty namespaces in import (#7619)
* handle blank namespaces in import

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-03-19 13:05:14 -07:00
e305b46d88 Ensure a request for telemetry happens in Condition Sets (#7592)
* request telemetry when subscribing to data in case we have cached subscription

* change back to >=

* revert

* update tests

* fixing tests

* add metadata

* fix test

* another mock required

* one more function needed

* attempt to fix some afterall errors

* add fixme for e2e test

* fail fast on request

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-03-19 10:44:50 -07:00
fb396ac194 [Telemetry Table] Telemetry mode bug fixes (#7601)
* source maps

* any tables without configuration will default to either default options or configured options

* prevent double unsubscribese

* remove source maps

* update coment

* moving defaults to plugin level

* whoops

* missed a spot, updated omment

* adding config values

* lint

* typos

* fixing broken ref

* fixing broken ref

* actually fixing ref

* setting rowLimit so initial change does not trigger a resubscribe of telemetry that was not subscribed yet
2024-03-19 02:34:00 +00:00
a01f21017f For the setTimeConductorMode, use the close time popup button rather than the submit button to dismiss time popup (#7613)
Use the close time popup button rather than the submit button as the submit button triggers network requests.
2024-03-18 23:48:33 +00:00
b7b9ccbe65 [TC Popup] Fix Calendar so it is not cutoff (#7596) 2024-03-18 23:28:09 +00:00
f189a4d602 Resize plans properly (#7597)
* resize firing

* ensure watcher fires

* remove unneeded const

* add small visual test resizing plan

* use browser with null viewport

* lint
2024-03-18 15:13:19 -07:00
4027eae299 chore(deps-dev): bump follow-redirects from 1.15.5 to 1.15.6 (#7603)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-17 06:53:20 -07:00
d4695178bc remove reference to LGTM (#7591) 2024-03-16 11:33:55 -07:00
5fc5c13314 [Plot] Fix plot swatch behavior when vertical space is small (#7493)
Add overflow: hidden such that when vertical space is small, no autoscroll happens on the axis
2024-03-14 16:49:36 +00:00
ceeb761d94 [build] Re-enable package lock (#7584)
* include package lock
* migrate to npm ci
* remove cache busting doc and replace with npm run clean

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-03-14 16:27:31 +00:00
10eb749d32 Prevent Metadata Time System Error for Missing Objects (#7565)
https://github.com/nasa/openmct/pull/7565 Modified Stacked Plots to not show Missing Objects. Added a check in Telemetry Collections for missing objects before displaying telemetry metadata time system error.
2024-03-14 09:05:23 -07:00
faed27c143 fix(#7552): Fix notebook snapshot image annotations (#7555)
* fix: painterro import

* test(snapshotAnnotation): add minimal e2e test

* chore: add e2e test annotation

* fix: notebook snapshot test

* refactor: put `v-else` on template

* small changes to the test and a visual one

* additional a11y

* fix: html structure

* test(e2e): fix notebook snapshot tests

* Update documentation for file download and JSON testing

* Update stubs and add jpg/png export

* refactor(TimelistComponent): tidy up

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-13 20:27:49 +00:00
18e976ad12 allow inspector pane content to scroll vertically (#7567)
* allow content to scroll vertically

* add framework for inspector content scrollable e2e test

* fix paths and spelling error

* add aria-label to properties list

* add scroll check to test

* use click, which scrolls if needed

* use scrollbar to scroll

* Closes #7566
- Fixed scrolling to only apply to the area below the Inspector tabs.
- Removed unneeded padding in pane.scss.
- Alignment fixes to related scroll elements in tree.

* cspell: ignore this file because it doesn't understand latin

* fix selectors and test

* lint fix

* driveby: wait for thumbnail bar to finish scrolling before taking snapshot

---------

Co-authored-by: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-03-13 19:04:02 +00:00
64862634f3 [Telemetry Table] Address issues found during testing Table Performance (#7529)
Fix exporting from Limited Mode: #7268 (comment)
Fix UI issues: #7268 (comment)
Apply configuration changes made in Edit Properties.

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-03-13 09:25:51 -07:00
cb4c59a464 fix(#7015): Generate source maps for generating code coverage metrics (#7582)
* fix(?): the robot says to do this...

* refactor: remove unused env var

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-12 17:02:41 -07:00
5f0bd10c61 Request batch when idle (#7526)
See https://github.com/nasa/openmct/pull/7526 for details
2024-03-12 20:46:06 +00:00
8c2558bfe0 fix(#7524): Open in New Tab action from a sub-object in a layout (#7542)
* refactor: url tools use named exports

* fix: refactor method and remove customUrlParams

* test(e2e): verify bounds are preserved in data pivoting

* test: remove test as feature is no longer needed

- dataVisualization logic has moved from MMGIS plugin to the open source. As such, we can just use the time conductor bounds

* refactor: autoformat keeps changing this so i'mma just commit it

* refactor: remove unnecessary code

* refactor: simplify, add docs

* Revert "refactor: remove unnecessary code"

This reverts commit 87aef35c510230835fb682b80e89a6006ef2d923.

* a11y: improve aria labels for ITC

* fix: simplify url method

* fix: update ITC app actions

* test: add test to generate test data for display layout w/ overlay plot + ITC enabled

* test(e2e): add suite + test for open in new tab from subobject

- needs cleanup

* a11y: various a11y improvement drivebys

* a11y: clock indicator needs to be quiet

* a11y: add `aria-live` to SuperMenu details

* a11y: greatly improve a11y of Menus and SuperMenus

* test(e2e): clean up test

* fix: improve a11y for context menus, fix test

* chore: remove nop-longer-recommended extension

* feat: provide one more bound option for example data viz

* fix: no need for `mount`, use dynamic rendering instead

* Revert "fix: simplify url method"

This reverts commit b24c7dabc783a9a1c3f2460eada99f452259f566.

* fix: correct time conductor bounds when opening in a new tab from a plot in the inspector

* test: fix e2e tests

* Revert "test: remove test as feature is no longer needed"

This reverts commit 759ebd4667bffb1979d5f62af6b47f349dcd9f77.

* test: move 2p annotation to test

* test: fix e2e

* fix: no words for the word god today

* test: fix e2e

* fix: e2e test

* test: fix test

* driveby: fix perf test

* fix: revert required prop change

---------

Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-11 16:39:38 -07:00
0eadc7a4ae chore(deps-dev): bump copy-webpack-plugin from 11.0.0 to 12.0.2 (#7574)
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 11.0.0 to 12.0.2.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v11.0.0...v12.0.2)

---
updated-dependencies:
- dependency-name: copy-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-11 16:33:15 -07:00
cad4652a08 chore(deps-dev): bump karma-webpack from 5.0.0 to 5.0.1 (#7575)
Bumps [karma-webpack](https://github.com/webpack-contrib/karma-webpack) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/webpack-contrib/karma-webpack/releases)
- [Changelog](https://github.com/codymikol/karma-webpack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/karma-webpack/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: karma-webpack
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-11 16:03:50 -07:00
8379f2d073 chore(deps-dev): bump imports-loader from 4.0.1 to 5.0.0 (#7576)
Bumps [imports-loader](https://github.com/webpack-contrib/imports-loader) from 4.0.1 to 5.0.0.
- [Release notes](https://github.com/webpack-contrib/imports-loader/releases)
- [Changelog](https://github.com/webpack-contrib/imports-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/imports-loader/compare/v4.0.1...v5.0.0)

---
updated-dependencies:
- dependency-name: imports-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-11 16:03:12 -07:00
8ed112a4a8 chore(deps-dev): bump sass from 1.68.0 to 1.71.1 (#7577)
Bumps [sass](https://github.com/sass/dart-sass) from 1.68.0 to 1.71.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.68.0...1.71.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-11 15:42:05 -07:00
14c58c4410 chore(deps-dev): bump npm-run-all2 from 6.1.1 to 6.1.2 (#7579)
Bumps [npm-run-all2](https://github.com/bcomnes/npm-run-all2) from 6.1.1 to 6.1.2.
- [Release notes](https://github.com/bcomnes/npm-run-all2/releases)
- [Changelog](https://github.com/bcomnes/npm-run-all2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bcomnes/npm-run-all2/compare/v6.1.1...v6.1.2)

---
updated-dependencies:
- dependency-name: npm-run-all2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 15:40:13 -07:00
87ba9fcbc0 [Mobile] Make Time Conductor Usable Again (#7515)
* Initial changes to refactor Time Conductor

* Finish refactor using grid-template

* Finish total refactor of Time Conductor

* Initial mobile changes

* Fix TC on mobile by changing grid template

* Fix more mobile stuff

* Add ellipsize to TC popup options and rearrange popup inputs and labels

* Small final changes so TC is adaptive to extreme cases

* Add e2e mobile test

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-08 12:22:09 -08:00
ab49f3f3a1 fix(#7215)[Fault Management]: Fix shelving and acknowledging faults with single and bulk actions (#7559)
* refactor: merge FaultManagementListView into FaultManagementView

* refactor: make `selectedFaults` a computed property

* refactor: use named exports

* fix: reset fault map AFTER selectedFaults have been acknowledged

* a11y: add aria labels for fault management toolbar buttons

* refactor: use named import/exports

* a11y: add label

* a11y: add aria label for checkboxes

* fix: acknowledging or shelving single fault from context menu should only apply to selected fault

* refactor: use change event instead of input event for checkbox

* test: fix e2e tests, remove expect.softs

* test: stabilize fault management e2e tests
2024-03-06 15:28:38 -08:00
df969722d1 d3 implementation of progress pie chart (#7485)
* d3 implementation of progress pie chart

* Handle 0% and 100% cases

* PR #7485
- Minor tweaks to `s-selected` styling.

* add in-progress class for compact view

* Fix issue where updating progress for pie chart wasn't working till at least one clock tick.
Write tests for progress pie

* update documentation for clock annotation

* Update clock annotation in tests

* split long testfile

* driveby missing test

* driveby fix flake

* temp: fix flake and prep for visual test

* Fix linting errors

* this should be resolved

* these keep popping up

* moving some of this around

* moving this around

* the test

* Fix imports for tests

* no longer need constant

* move to front

* Stabalize name

* test(missionStatus): fix visual test

---------

Co-authored-by: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-03-05 14:45:28 -08:00
ef62633df1 chore(deps-dev): bump sass-loader from 14.0.0 to 14.1.1 (#7512)
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 14.0.0 to 14.1.1.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v14.0.0...v14.1.1)

---
updated-dependencies:
- dependency-name: sass-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-04 19:10:15 -08:00
597dc58eb7 chore: minor formatting fix for PR template (#7550)
Minor formatting nitpick
2024-03-04 19:09:33 -08:00
5d00d642f3 [CI] Temp disable flakefinder as we it's generating too many GHA minutes (#7548)
Temp disable flakefinder as we it's generating too many GHA minutes
2024-03-04 18:32:12 -08:00
39ab81c3d0 fix(overlay plot): legend updates correctly when removing element via remove action (#7531)
* fix: remove duplicate listeners
* fix: if no series found, don't splice
* test(e2e): update legend a11y and add test
2024-03-05 02:07:44 +00:00
0bdd0963a4 Limit lines handle plot resizing (#7151)
* Fix error when removing staleness subscription due to incorrect parameter

* On resize, clear the drawing API to reset the height and width for point calculation.

* Add e2e test to test limit lines after resizing the plot view.

* We need to update viewport when drawing limits in case there is no data for plots.

* Address review comments. change event naming convention and reduce debounce time.

* Use limit line and label seriesKeys to make ids unique

* Improve locator for limit lines checkbox

* Add a check for network requests when limit lines are redrawn
2024-03-04 17:02:30 -08:00
eae51356c8 chore(deps-dev): bump plotly.js-basic-dist-min from 2.20.0 to 2.29.1 (#7523)
Bumps [plotly.js-basic-dist-min](https://github.com/plotly/plotly.js) from 2.20.0 to 2.29.1.
- [Release notes](https://github.com/plotly/plotly.js/releases)
- [Changelog](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.js/compare/v2.20.0...v2.29.1)

---
updated-dependencies:
- dependency-name: plotly.js-basic-dist-min
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-04 16:22:18 -08:00
a36ad3f5e7 chore(deps-dev): bump webpack-dev-server from 4.15.1 to 5.0.2 (#7544)
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.15.1 to 5.0.2.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.15.1...v5.0.2)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-04 16:11:50 -08:00
307ededd19 chore(deps-dev): bump eslint-plugin-vue from 9.18.1 to 9.22.0 (#7545)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.18.1 to 9.22.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.18.1...v9.22.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-04 15:57:12 -08:00
d7ecfdf10f chore(deps-dev): bump webpack from 5.89.0 to 5.90.3 (#7546)
Bumps [webpack](https://github.com/webpack/webpack) from 5.89.0 to 5.90.3.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.89.0...v5.90.3)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-04 13:42:26 -08:00
a1c36f314d chore(deps-dev): bump sanitize-html from 2.11.0 to 2.12.1 (#7539)
Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.11.0 to 2.12.1.
- [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apostrophecms/sanitize-html/compare/2.11.0...2.12.1)

---
updated-dependencies:
- dependency-name: sanitize-html
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-04 13:20:17 -08:00
86e636cbce chore(deps-dev): bump @axe-core/playwright from 4.8.2 to 4.8.5 (#7496)
Bumps [@axe-core/playwright](https://github.com/dequelabs/axe-core-npm) from 4.8.2 to 4.8.5.
- [Release notes](https://github.com/dequelabs/axe-core-npm/releases)
- [Changelog](https://github.com/dequelabs/axe-core-npm/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/dequelabs/axe-core-npm/commits/v4.8.5)

---
updated-dependencies:
- dependency-name: "@axe-core/playwright"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-03 09:06:49 -08:00
0d2b36ae82 chore(deps-dev): bump vue-eslint-parser from 9.3.2 to 9.4.2 (#7471)
Bumps [vue-eslint-parser](https://github.com/vuejs/vue-eslint-parser) from 9.3.2 to 9.4.2.
- [Release notes](https://github.com/vuejs/vue-eslint-parser/releases)
- [Commits](https://github.com/vuejs/vue-eslint-parser/compare/v9.3.2...v9.4.2)

---
updated-dependencies:
- dependency-name: vue-eslint-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-03 08:55:45 -08:00
95072da257 chore(deps-dev): bump marked from 11.2.0 to 12.0.0 (#7467)
Bumps [marked](https://github.com/markedjs/marked) from 11.2.0 to 12.0.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v11.2.0...v12.0.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-03 08:41:49 -08:00
faa2621e26 chore(deps-dev): bump css-loader from 6.8.1 to 6.10.0 (#7466)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 6.8.1 to 6.10.0.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.8.1...v6.10.0)

---
updated-dependencies:
- dependency-name: css-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-03 08:29:37 -08:00
73eead6b72 [Mobile] Center Confirmation Dialog Texts (#7492)
* Make overlay messages centered

* Fix changes so that only dialogs and not forms are affected

* Fix buttons such that they are right-aligned

* Reduce to one worker for stability

* Add test to cover new capabilities

* lint fixes

* Closes #7343
- Fixed an oversight that caused the top of form dialogs to
be scrolled out of view by default.
- Fixed approach to vertical centering for `-fit` type confirmation dialogs.
- Reduced size of confirmation dialog icons.
- Smoke tested in Chrome mobile emulator in a large variety of mobile
viewport sizes and orientations.

* Closes #7343
- Removes extra margin unintentionally added to `l-overlay-large`.

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
2024-03-03 16:14:45 +00:00
e449fd0eda Fix visible toolbar overflow (#7037)
* Closes #7036
- CSS fix to prevent toolbar overrun of main view area.

* a11y: add label to pane handles

* test(visual): toolbar overflow

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-02-29 11:26:51 -08:00
7d25c967a5 Allow test data toggle to be clicked (#7479)
* Add the disabled class instead of the disabled property

* Add test for condition set test data

* Use computed property for css class

* Use array syntax for class instead of computed value

* Fix .getByTitle locators to use .getByLabel instead

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-02-28 19:44:37 +00:00
dc9bd8bcb1 Remove all logic around auto centering and scrolling the timelist (#7474) 2024-02-22 17:56:54 +00:00
29d83e9c6d fix(#7456): allow children of Overlay Plots to be removed (#7516)
* fix(#7456): check if object is an identifier

* refactor: use v-show, remove unnecessary deep copy, set yAxes array to empty in a way that preserves reactivity

* refactor: use ESM exports

* refactor: use ESM imports

* test(e2e): add test for element item removal from overlay plot

* a11y: add accessible name for object labels

* refactor: move overlayPlot creation to beforeAll, use getByLabel
2024-02-21 16:07:48 -08:00
6393a77c19 [Mobile] Add Global Search to Mobile (#7477)
* Add status area back to mobile

* Make search results responsive to width

* Make clear search button always visible, regardless of hover

* Make clear search button visible, and fix weird margin in top left corner

* Fix input width, add logic to make close button work properly, fix margin on results so there is room for close button, fix various landscape mode issues

* update mobile testing

* Fix dropdown sizes, remove shadows and corners to make it look less like a popup and more full screen

* Add animation and persist search bar in mobile

* Fix linting issues

* Fix padding in Desktop

* fix padding in status area

* fix bad merge

* lint fixes

* fix bad merge... again

* again

* fixes to mobile

* update tests

* lint fix

* test fixes

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-02-21 15:29:38 -08:00
6bbabf9c45 chore(deps-dev): bump vue from 3.3.8 to 3.4.19 (#7511)
Bumps [vue](https://github.com/vuejs/core) from 3.3.8 to 3.4.19.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.3.8...v3.4.19)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-02-21 15:13:02 -08:00
f18d1d2a51 Add Collapse to Recent Objects (#7502)
* initial functional implementation

* removing vestigial code

* Fix styles for button bar

* Remove bound for :persist-position

* Revert "Remove bound for :persist-position"

This reverts commit ce2ea422d7.

* test(e2e): modify existing test to verify collapse/expand recent objects pane

---------

Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-02-21 21:28:29 +00:00
5894c66df1 docs(release.yml): make plural (#7517) 2024-02-20 14:58:44 -08:00
6ff8c42041 docs: Update release.yml and docs (#7514)
Attempt one
2024-02-20 14:29:00 -08:00
9870a6bc9c Check role when receiving status updates in the Operator Status Indicator (#7509)
* check role when receiving status updates

* pass role to get status
2024-02-16 21:45:04 +00:00
317ea8c275 docs: Add openmct type hints (#7247)
* Add setAssetPath method to MCT type information

* Add TypeRegistry to OpenMCT typedef
2024-02-16 16:56:13 +00:00
bc36a93b9b chore: bump version to 4.0.0-next (#7506)
Bump to 4.0.0
2024-02-15 13:49:04 -08:00
847232d64b style: ensure legacy indicators align with Vue indicators (#7458)
* style: ensure legacy indicators align with Vue indicators

* fix: move logic to `vueWrapHtmlElement` and use `u-contents` class
2024-02-15 20:22:52 +01:00
4fbccd4c91 Ensure object specific actions load in previews (#7504)
* add actions after element has had chance to render

* add test

* remove test.only
2024-02-15 18:00:04 +00:00
cd560bceed Bypass cache/dirty when canceling transaction (#7503)
* force remote/non-cached when canceling transaction

* add test

* update unit test
2024-02-15 09:26:45 -08:00
e08633214e Misc memory leak fixes (#7224)
* fix(leak): remove font listeners

* fix(leak): release componentInstance

* fix(perf): remove unused emit

* fix(perf): only emit if tickWidth changes

* fix: warnings and undefined keys

* fix: remove unused bind

* fix: restore MctTicks component
2024-02-14 23:49:02 +00:00
a9ad0bf38a When plan view is used in a gantt chart, handle the domain object differently. (#7473)
Rename for readability. Track plan changes if object is a plan.
2024-02-14 22:32:50 +00:00
5f8d6899d2 Plot legends expand by default when enabled (#7453)
* expanded legend showing, but malformed

* fix legends

* add e2e test and aria labels for controls

* fix tests

* remove focused test

* make plot legend items dynamic

* expand legend immediately when changing default

* Ensure stacked plots show cumulative legend (#7481)

* simplify config loading logic

* wip

* fixed stacked plot legend issue

* fix legend

* remove console.debugs

* remove extraneous prop

* add test

* fix legend

* use props
2024-02-07 18:35:19 +00:00
cd6adbadde Upgrade prettier and eslint compatibility libraries to latest (#7478)
* chore: upgrade prettier and eslint libraries to latest

- upgrade prettier
- upgrade eslint
- upgrade eslint-plugin-prettier
- upgrade eslint-config-prettier

* chore: run lint:fix

* chore: add `prettier-eslint` devDependency

- The `prettier-eslint` vscode plugin sinc v6.0.0 no longer provides this package so we must install it as a devDependency so that autoformat works.

* chore: add recommended extensions file for vscode users

* Update extensions.json

* Revert "Update extensions.json"

This reverts commit 942f341a75.

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-02-07 00:16:22 +00:00
539b43325a test(e2e): add e2e and visual tests for Mission Status (plus a11y) (#7462)
* feat: enable mission status in example user

* test: add initial missionStatus suite

* test(WIP): mission status e2e suite

* test(e2e): add e2e and visual tests for mission status + a11y

* test(a11y): scan for a11y violations

* a11y: remove labels for non-interactive elements
2024-02-06 21:44:01 +00:00
eeb8e9704b Ensure previews work for plots (#7459)
* fix large view in tree

* remove existing view concept

* fix plots in overlays

* remove debug and actually remove overlays when dismissed

* add test

* improve tests

* move test
2024-02-06 08:16:31 +01:00
0aceb4b590 Filter values as a string not an object (#7448)
* Push the value of a property to the activity as a string if it is not undefined.

* Add documentation for sourceMap filterMetadata

* Allow . for filtering. Check for null values
2024-02-05 18:38:37 +00:00
82fa4c1597 feat: Mission Status for Situational Awareness (#7418)
* refactor: `UserIndicator` use vue component directly

* style(WIP): filler styles for user-indicator

* feat(WIP): working on mission status indicators

* feat: support mission statuses

* feat(WIP): can display mission statuses now

* feat(WIP): add composables and dynamically calculate popup position

* feat(WIP): dismissible popup, use moar compositionAPI

* Closes #7420
- Styling and markup for mission status control panel.
- Tweaks and additions to some common style elements.

* feat: set/unset mission status for role

* refactor: rename some functions

* feat: more renaming, get mission role statuses working

* refactor: more method renaming

* fix: remove dupe method

* feat: hook up event listeners

* refactor: convert to CompositionAPI and listen to events

* fix: add that back in, woops

* test: fix some existing tests

* lint: words for the word god

* refactor: rename

* fix: setting mission statuses

* style: fix go styling

* style: add mission status button

* refactor: rename `MissionRole` -> `MissionAction`

* test: fix most existing tests

* test: remove integration tests already covered by e2e

- These tests are going to be wonky since they depend on the View. Any unit tests depending on Vue / the View will become increasingly volatile over time as we migrate more of the app into the main Vue app. Since these LOC are already covered by e2e, I'm going to remove them. We will need to move towards a more component / Vue-friendly testing framework to stabilize all of this.

* docs: add documentation

* refactor: rename

* fix: a comma

* refactor: a word

* fix: emit parameter format

* fix: correct emit for `missionStatusActionChange`

---------

Co-authored-by: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-02-02 22:50:16 +00:00
ee5081f807 test(visual): add unclipped activity names visual tests + a11y fixes (#7454)
* test: add unclipped activity names visual tests + a11y fixes

* lint: add additional dictionaries
2024-02-02 19:47:52 +00:00
3cbaa7bf07 Have countdowns in the Timelist use a - symbol (#7452)
* fix issue

* add test

* remove debugger

* expanded legend showing, but malformed

* Revert "expanded legend showing, but malformed"

This reverts commit b954f00257.
2024-02-02 09:37:37 +01:00
18e4b9da65 Add Expanded view for Time List (#7378)
* Add activity states domain object and interceptor to auto create one

* Add activity state inspector option

* Only save status if we have a unique ids for activities

* Include the id in the activity properties

* Don't show activity state section in the inspector if multiple activities are selected

* Display activity properties when an activity row is selected in the timelist

* Add compact view for timelist

* Add inspector configuration for compact view

* Set colors based on time relation of activity

* Use activity id as key if it is available

* Ensure the correct option is selected for activity states

* Closes #7377
- Markup and CSS sanding and polishing.
- Still WIP!

* Closes #7377
- Markup and CSS sanding and polishing.
- Still WIP!

* Add status label

* Rename to Expanded view and isExpanded as properties. Add display style dropdown configuration in the inspector.

* Refactor activity selection. Display activity properties

* Closes #7377
- Label formatting Todo notes about states.
- Computed values and `v-ifs` added to control display for progress pie and countdown 'hero'.
- Still WIP!

* Closes #7377
- Add svg icons and some stubbed in logic.
- Still WIP!

* Remove activity states plugin. Move the activity states interceptor to the plan plugin.

* Change activity states interceptor parameters to options

* Rename constants

* Fix activity states test

* Addresses review comments making code more readable.

* Closes #7377
- Significant adds for large Time List element styling for activity states.
- `$color*` Time List-related theme constants remapped and significantly enhanced.
- Code cleanup and removal of stubbed-in SCSS vars.

* Closes #7377
- Unit testing and colors in Snow in progress.
- Fixed erroneous checkin in ExpandedViewItem.vue.

* Remove ExpandedView component and pull the ExpandedViewItem up to the top level.
Same for ListView, pulling the ListItem up one level.

* Fix sorting for compact view.
Hardcode options for switching compact/expanded views.

* Closes #7377
- Snow Time List colors finalized and smoke tested.
- New graphic SVG for skipped activity.
- Added aria labels to SVG graphics.

* Closes #7377
- Fixed div with no class.

* Add e2e test for activity states feature.

* Address review comments. Rename variables, documentation.

* No shallow copy

* Merge updates to activity-state

* Sync with activity states PR

* Draft of progress-pie

* - Add `s-selected` styling for Expanded Time List elements.

* Add 2 new date formats

* Look and feel enhancements for pie, zero duration events and start and end time formats

* Fix pie show/hide condition

* Final touches to the pie and labels

* Refactor label logic

* Closes #7377
- Added `sweep-hand` animation element to progress pie graphic SVG.

* Remove use of ListView - no point passing arrays around since we are already using sortedItems and itemProperties for expandedViewItems

* We addded a new column for duration and changed the previous duration to countdown. This required adjustment of the test

* Fix expanded view for timelist tests

* Closes #7377
- Fixed display logic for inferred execution states.

* Closes #7377
- Fixed a bug that threw console errors when a value was undefined.

* Optimize rendering of timelist activities

* Remove focused test

* Address review comments

* Remove reactive selection for plan activities

* destructure props into individual item properties for render performance benefits

* Use local variables and remove JSON utility methods

* Change cancelled to skipped

* Focus the activity tab when shown

* Fix label updates

* Add countup to cspell

* Remove progress pie due to licensing unknowns

---------

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
Co-authored-by: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
2024-01-30 16:30:57 -08:00
d42aa545bb Add support for multiple CouchDB databases, multiple namespaces, and readOnly configurations (#7413)
* two namespaces appear

* works with two databases

* try to batch requests

* fix indicators

* add option to omit root for myitems

* ready for review

* ready for review

* ready for review

* typo in README

* spelling

* spelling

* update readme

* fix tests

* Update src/plugins/persistence/couch/README.md

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* remove omitRoot

* remove omitRoot

* fix my items to check for namespace when intercepting

* update readme

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2024-01-30 15:10:31 -08:00
69b81c00ca [e2e] Steps to reduce flakiness in test reporting (#7436)
* flakefinder gha

* Update e2e-flakefinder.yml

* driveby

* skip visual

* first attempt at sharding with circle

* Updated config.yml

* fixes

* missing quote

* re-enable old jobs and update to 7x

* max failures

* destructure the npm script

* missing quote

* revert

* uncomment and re-add 7 parallel

* add unit tests

* add p flag

* skip the flaky test
2024-01-30 14:21:52 -08:00
068ac4899d Fix constrast for accessibility (#7315)
* Closes #7304
- Change colors to increase contrast.
- New base level theme color var: `$colorBodyFgSubtle`.
- Minor CSS cleanups.
- WARNING: this appears to have added a regression in selects
that colors the arrow black in Espresso.

* Closes #7304
- Fix dropdown arrow colors, whew.
- Normalize font sizes in Status area.
- More color changes for contrast, including new theme constants.
- TODO: compare and sync Espresso with other themes.
- TODO: check for regressions!

* disable ruleset

* Closes #7304
- Normalize font sizes in multiple spots.
- More color changes for contrast, including more new theme constants.
- TODO: compare and sync Espresso with other themes.
- TODO: check for regressions!

* Closes #7304
- Reorganize CSS files for more uniformity.

* Closes #7304
- CSS normalized across all themes via Google Sheet at https://docs.google.com/spreadsheets/d/1SEEtuNSq6I7gvVHKpHW8_fp8Ltc-HOAWxrSAkUzS6Kw/edit?usp=sharing

* Closes #7304
- Color tweaks, normalization.

* Closes #7304
- Color tweaks, normalization.
- Search layout, contrast and font-size improvements.
- Added '+' icons to collapsed pane buttons.

* Closes #7304
- Shell head layout improvements.

* Update ColorKey for Take Snapshot Failures and Opacity labels. Also fix create menu

* Closes #7410
- CHERRY PICK FROM event-colors-7410.
- Event display approach modified to include background color.
- Theme colors modified and constrast verified via Wave a11y browser plugin.

* Closes #7304
- Set back to install Espresso theme by default.

* temporarily skip

* remove comment

* lint

* Update default colors

* update snapshot

* missed

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2024-01-29 21:30:55 -08:00
f8d936a834 Use different root for renderWhenVisible (#7415)
* attempt to fix

* reenable test

* going to revert most of this, but works

* slowly reverting changes

* further reversions to the mean

* reversion to the mean

* revert

* change to use openmct element

* reference issue

* reference issue

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-01-29 15:33:47 -08:00
5c21c34568 Support telemetry batching and move WebSocket handling to worker (#7391)
* Support subscription batching from API, Tables, and Plots

* Added batching worker

* Added configurable batch size and throttling rate

* Support batch size based throttling

* Default to latest strategy

* Don't hide original error

* Added copyright statement

* Renamed BatchingWebSocketProvider to BatchingWebSocket

* Adding docs

* renamed class. changed throttling strategy to be driven by the main thread

* Renamed classes

* Added more documentation

* Fixed broken tests

* Addressed review comments

* Clean up and reconnect on websocket close

* Better management of subscription strategies

* Add tests to catch edge cases where two subscribers request different strategies

* Ensure callbacks are invoked with telemetry in the requested format

* Remove console out. Oops

* Fix linting errors
2024-01-29 15:17:55 -08:00
0eea2e0bbc chore(deps-dev): bump marked from 11.1.0 to 11.2.0 (#7427)
Bumps [marked](https://github.com/markedjs/marked) from 11.1.0 to 11.2.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v11.1.0...v11.2.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-01-29 12:32:06 -08:00
61acc91200 chore(deps-dev): bump sass-loader from 13.3.2 to 14.0.0 (#7428)
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 13.3.2 to 14.0.0.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v13.3.2...v14.0.0)

---
updated-dependencies:
- dependency-name: sass-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-01-29 12:31:36 -08:00
a52982d2bf chore(deps-dev): bump moment from 2.29.4 to 2.30.1 (#7425)
Bumps [moment](https://github.com/moment/moment) from 2.29.4 to 2.30.1.
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.4...2.30.1)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 12:27:25 -08:00
1d40b134b6 Make Tabs eager loading configurable but default to false (#7199)
* convert tabs plugin to use es6 import/export

* default of eager load is false but configurable

* change true/false select to toggleSwitch

* add and clean up unit tests

* Update test

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-01-29 12:08:38 -08:00
735c8236e5 Skip some tests, fix a mislabeled test, and add default condition for tabs (#7422)
* wrong format

* skip the flake for now

* Add Tabs test

* one more flake
2024-01-28 16:28:49 -08:00
dc5a3236b3 Activity state display for plans in Gantt and Time list views (#7370)
* Add activity states domain object and interceptor to auto create one

* Add activity state inspector option

* Only save status if we have a unique ids for activities

* Include the id in the activity properties

* Don't show activity state section in the inspector if multiple activities are selected

* Display activity properties when an activity row is selected in the timelist

* Use activity id as key if it is available

* Ensure the correct option is selected for activity states

* Add status label

* Refactor activity selection. Display activity properties

* Remove activity states plugin. Move the activity states interceptor to the plan plugin.

* Change activity states interceptor parameters to options

* Rename constants

* Fix activity states test

* Add e2e test for activity states feature.

* Address review comments. Rename variables, documentation.

* No shallow copy

* Suppress lint warning for conditionals

* Remove check for abort controller

* Move classes to components

* number primitive

* Closes #7369
- WIP tweaks to simplify the Inspector view.

* Ensure 'notStarted' is the default state for activities

* Remove extra quotes

* Closes #7369
- Mod to `s-selected` styling to allow selection visiblity on Time List rows.

* Use generated key for vue

* Fix e2e tests

* Fix timelist test

---------

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-01-28 15:46:10 -08:00
60e1eeba8e Add filtering by metadata (#7388)
* Add filtering by metadata. Add new sourceMap property to get a list of properties for metadata filtering.

* Change filter label names

* Add aria-labels

* Closes #7389
- Added a "No filters applied" message for both input areas.
- Added additional detail about how it works in the hint text visible while editing.

* Restore valid state if there is an error

* Fix linting error

* Tests for filtering by metadata

---------

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
2024-01-28 18:04:52 +00:00
1fc6056c51 Set disabled items to use disabled property (#7342)
* Closes #7322
- New CSS for `aria-disabled = true` property.
- Changed multiple items to use aria-disabled instead of .disabled, including:
  - Action menu
  - Super menu
  - Notebook drag area
- Tree item style modded to only italicize when is-navigated and is being edited.

* Closes #7322
- New CSS for `aria-disabled = true` property.
- Changed multiple items to use aria-disabled instead of .disabled, including:
  - Action menu
  - Super menu
  - Notebook drag area
- Tree item style modded to only italicize when is-navigated and is being edited.
- Create button sets itself to `disabled` when the editor is in use.

* Closes #7322
- Create button now _actually_ sets itself to `aria-disabled` when the editor is in use.
- CSS removes selector for `.is-editing`.

* fix conflict

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-01-26 14:55:13 -08:00
b9df97e2bc Table performance paging (#7399)
* dereactifying the row before passing it to the commponent

* debouncin

* i mean... throttle

* initial

* UI functionality, switching between modes, prevention of export in performance mode, respect size option in swgs

* added limit maintenance in table row collectins, autoscroll respecting sort order

* updating the logic to work correctly :)

* added handling for overflow rows, this way if an object is removed, we can go back to the most recent rows for all remaining items and repopulate the table if necessary

* removing debug row numbers

* Closes #7268
- Layout and style sanding and polishing.
- Added title to button.
- More direct button labeling.

* Closes #7268
Partially closes #7147
- Removed footer hover behavior: table footer now always visible.
- Tweaks to style, margin etc. to make footer more compact.

* moved row limiting out of table row collections and into telemetry collections, table row collections will only limit what they return in getRows, handling sorting when in different modes

* have swgs return enough data to fill the requested bounds

* support minmax in swgs

* using undefined for more clarity

* clearing up boolean typo

* Address lint fixes

* removing autoscroll for descending, it is not necessary

* update snapshots

* lint

---------

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-01-26 13:24:24 -08:00
b985619d16 Table CPU Performance Improvements (#7392)
* dereactifying the row before passing it to the commponent

* debouncin

* i mean... throttle
2024-01-26 10:40:16 -08:00
3e31bbef97 Get actions collection on Preview Container update (#7385)
* Get actions collection on Preview Container update

* Added fixme and link to initial ticket

* Stubbed out preview mode e2e test

* Lint fix

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-01-26 17:35:52 +00:00
3e5ada8f5f Fix actions menu on display layout alphanumerics (#7414)
* remove errant action

* add e2e test
2024-01-25 16:26:03 +01:00
2b2c74da9c New action to reload an individual view and all of its children (#7362)
* add reload action plugin

* checking for domain object before reloading

* check if objects are equal before refreshing

* add test

* lint

* change to label

* ensure object styles are initialized

* resubscribe to staleness too

* add better labels for tabels

* ensure tab uses exact for label now due to table aria changes

* fix table tests

* make tabs exact

* update conflicts

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-01-25 05:36:44 +00:00
450cab428f move performance tests to GHA (#7412)
* move performance tests to GHA

* no need for chrome beta

* Add baseline imagery test

* skip flaky app

* lint
2024-01-24 21:26:48 -08:00
0340fe18fa Change Imagery positional freshness label from 'POS' to 'ROV' (#7409)
Closes #7404
- Change 'POS' to 'ROV'.
2024-01-25 05:18:29 +00:00
114864429a feat(#7394): Incorporate Status Indicators into the main Vue app (#7395)
* feat(IndicatorAPI): accept Vue components

- Adds a new property to Indicators, `component`, which is a synchronous or asynchronous Vue component.
- Adds `wrapHtmlElement` utility function to create anonymous Vue components out of `HTMLElement`s (for backwards compatibility)
- Refactors StatusIndicators.vue to use dynamic components, allowing us to dynamically render indicators (and keep it all within Vue's ecosystem).

* refactor(indicators): use dynamic Vue components instead of `mount()`

- Refactors some indicators to use Vue components directly as async components

* refactor: use Vue reactivity for timestamps in clock indicator

* fix(test): fix unit tests and remove some console logs

* test(e2e): stabilize ladSet e2e test

* test: mix in some Vue indicators in indicatorSpec

* refactor: cleanup variable names

* docs: update IndicatorAPI docs

* fix(e2e): wait for async status bar components to load before snapshot

* a11y(e2e): add aria-labels and wait for status bar to load

* test(e2e): add exact: true

* fix: initializing indicators

* fix(typo): uhhh.. how did that get there? O_o

* fix: use synchronous components for default indicators

* test: clean up, remove unnecessary `nextTick()`s

* test: remove more `nextTick()`s

* refactor: lint:fix

* fix: `on` -> `off`

* test(e2e): stabilize tabs test

* test(e2e): attempt to stabilize limit lines tests with `toHaveCount()` assertion
2024-01-23 23:15:22 +00:00
4cf63062c0 Mct7367-tests (#7387)
* refactor(ExportAsJSONAction): use private methods

* refactor: remove unnecessary webpack alias

* refactor: lint

* fix: tests for `ExportAsJSONAction`

* test: stabilize `InspectorStylesSpec` tests

* docs: fix jsdocs

* chore: remove dead / redundant code

* refactor(LocalStorageObjectProvider): use `getItem()` and `setItem()`

* refactor(ExportAsJSONAction): use `Promise.all` where applicable

* refactor(MenuAPI): one-liner

* feat: add percentage ProgressBar to ExportAsJSONAction

* fix(ProgressBar.vue): v-if conditionals

* test(fix): update mockLocalStorage

* test: fix locators

* test: remove unneeded awaits

* fix: example imagery urls (moved after NASA wordpress migration)

* Revert "refactor(LocalStorageObjectProvider): use `getItem()` and `setItem()`"

This reverts commit 4f8403adab.

* test(e2e): fix logPlot test

* Revert "Revert "refactor(LocalStorageObjectProvider): use `getItem()` and `setItem()`""

This reverts commit 0de66401cd.

* test(e2e): remove waitForNavigations

* driveby and fixes

* aria improvement

* getting tests back oline

* more tests

* add last test

* Add a11y

* lint

* lint

* driveby

* review comments

* driveby rename

* fix selectors and break up test suites

* add test for snapshot in header

* last lint fixes

* stable

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-01-22 21:41:56 -08:00
43ae3cf655 Provide renderWhenVisible to LadTableSets (#7384)
* Provide renderWhenVisible for LadTables

* fix open in new tab

* add test for open in new tab

* fix test to include renderWhenVisible

* refactor test

* fix tests

* fix tests

* having timing issues now
2024-01-19 09:47:44 +01:00
01434ff2d5 feat(#7367): ProgressBar for ExportAsJSONAction (#7374)
* refactor(ExportAsJSONAction): use private methods

* refactor: remove unnecessary webpack alias

* refactor: lint

* fix: tests for `ExportAsJSONAction`

* test: stabilize `InspectorStylesSpec` tests

* docs: fix jsdocs

* chore: remove dead / redundant code

* refactor(LocalStorageObjectProvider): use `getItem()` and `setItem()`

* refactor(ExportAsJSONAction): use `Promise.all` where applicable

* refactor(MenuAPI): one-liner

* feat: add percentage ProgressBar to ExportAsJSONAction

* fix(ProgressBar.vue): v-if conditionals

* test(fix): update mockLocalStorage

* test: fix locators

* test: remove unneeded awaits

* fix: example imagery urls (moved after NASA wordpress migration)

* Revert "refactor(LocalStorageObjectProvider): use `getItem()` and `setItem()`"

This reverts commit 4f8403adab.

* test(e2e): fix logPlot test

* Revert "Revert "refactor(LocalStorageObjectProvider): use `getItem()` and `setItem()`""

This reverts commit 0de66401cd.

* test(e2e): remove waitForNavigations
2024-01-18 12:21:36 +01:00
70f5ba9ca8 Clear active role if no longer in available roles (#7345)
* if role is removed from user, reprompt

* add some basic user login tests

* add more robust user tests

* add more robust user tests

* resolve PR comments

* setup event listener earlier
2024-01-16 17:57:57 +01:00
11f3ce9470 fix(#7055): Expand on image with double click (#7308)
* Add double click event to expand image view

* Add performance tests for large view and close
button

* Add example imagery in flexible layout to test double-click functionality

* Remove click event listener in ImageryView.vue

* Move test to 'Example Imagery in Flexible layout'

* Refactor exampleImagery.e2e.spec.js

* Remove unnecessary code for opening and closing
large view in imagery.contract.per.spec.js

* Replace pageSelector with getByRole on double-click image test

* Add role and aria-label to focused image

* Remove unnecessary code and role attribute from ImageryView.vue

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2024-01-14 15:55:11 -08:00
6ce340cebd [e2e] Update remaining tests and add missing comparison coverage (#7363) 2024-01-11 14:47:00 -08:00
6fd7b6f7a3 Add right click actions on imagery to allow high resolution download (#7371)
* action stubs in place

* first draft of actions

* delete copy

* add test

* remove console.debug
2024-01-11 19:57:04 +01:00
3ff2f029eb chore: update copyright end year to 2024 (#7364) 2024-01-09 13:31:51 -08:00
67a1094a1f Timelist centering algorithm change and duration formatting change (#7194)
* Change the centering algorithm for timelist
Make duration formatting better

* test: add time list countdown and countup test

* test: respond to comments

* chore: lint fix

* fix: lint errors and visual suite failures

* Change parameters to options object

* Fix regression with auto scroll. Improve code readability

* Add defaults for getPreciseDuration options object

* Defaults for options

* Add missing await

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-01-08 23:14:33 +00:00
64d4ddd80e Set location hash if query parameters or path have changed (#7306)
* refactor to es6 class

* change URL on path or params change

* add test for url

* put into edit mode for test

* es6 module export

* a11y: add `status` role to clock component

* a11y: add label to overlay

* a11y: update roles for search results

* a11y: add `dialog` role and label for PreviewContainer

* refactor(e2e): get rid of a bunch of `page.locator()`s

* refactor(e2e): spruce up locators

* test: fix unit tests

* fix tests with new aria labels

* fix tests with new aria labels

* fix tests with new aria labels

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2024-01-08 20:29:01 +01:00
dfba4e23c5 fix(#7338): Persisted styles correctly apply to StackedPlotItems on mount (#7341)
* refactor: use `Plot` component directly in `StackedPlotItem` template

* test(e2e): fix style test for stackedplot

* test(e2e): add annotation back in

* test: fix unit tests

* refactor: tidy up

* fix: move const, remove eslint ignore

* fix: apply staleness styling properly

* refactor: remove unused data()

* refactor: remove unused `isMissing`

* refactor: remove debug statements
2024-01-08 10:19:41 -08:00
70de7363d8 [Flexible Layouts] Flexible Layout styling fixes (#7319) 2024-01-03 17:11:35 -08:00
6f3bb5fc6f chore(deps-dev): bump @vue/compiler-sfc from 3.3.10 to 3.4.3 (#7332)
Bumps [@vue/compiler-sfc](https://github.com/vuejs/core/tree/HEAD/packages/compiler-sfc) from 3.3.10 to 3.4.3.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/commits/v3.4.3/packages/compiler-sfc)

---
updated-dependencies:
- dependency-name: "@vue/compiler-sfc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 17:46:40 +00:00
b220c2bad5 chore(deps-dev): bump typescript from 5.2.2 to 5.3.3 (#7335)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.2.2 to 5.3.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.2.2...v5.3.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 09:04:52 -08:00
74f30789ca chore(deps-dev): bump @babel/eslint-parser from 7.22.5 to 7.23.3 (#7232)
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.22.5 to 7.23.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.3/eslint/babel-eslint-parser)

---
updated-dependencies:
- dependency-name: "@babel/eslint-parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 08:22:06 -08:00
fce98a1c47 refactor: migrate to ESM (#7331)
* refactor: move package.json to type: module

this is where the fun begins

* chore: move webpack common and prod to esm

* chore: move webpack to esm, eslint to explicit cjs

* refactor: migrate all files to esm

* style: lint

* refactor: begin moving karma to cjs, use dynamic esm import

* refactor: move index-test to cjs

* refactor: begin moving e2e to ESM

this was manual. I'm committing this because I'm about to try the `cjstoesm` tool

* refactor: move all to esm

* fix: make all e2e tests use .js imports

* refactor: begin moving exports to esm

* refactor: use URL transforms instead of __dirname

* fix: use libraryExport: default to properly handle openmct

* fix: export all playwright configs as modules

* refactor: move all instances of __dirname to import.meta.url

* refactor: lint, drop unnecessary URL call

* fix: use correct URL path on helper/addNoneditableObject.js

* fix: more incorrect URL resolve issues

* fix: parse json after reading it
2024-01-02 07:24:22 -08:00
68e60e332e fix: cleanup from #7029 (#7328)
* refactor: fix issues arose from #7029

* refactor: move replaceAll -> replace in makeKeyString

* fix: move order of escape to backslash first

* style: lint
2023-12-28 12:39:28 -08:00
5af491382e chore: watch mode improvements (#7326) 2023-12-27 21:48:14 -08:00
2e03bc394c feat: AMD -> ES6 (#7029)
* feat: full amd -> es6 conversion

* fix: move MCT to ES6 class

* fix: default drop, correct imports

* fix: correct all imports

* fix: property typo

* fix: avoid anonymous functions

* fix: correct typo

scarily small - can see why this e2e coverage issue is high priority

* fix: use proper uuid format

* style: fmt

* fix: import vue correctly, get correct layout

* fix: createApp without JSON

fixes template issues

* fix: don't use default on InspectorDataVisualization

* fix: remove more .default calls

* Update src/api/api.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* Update src/plugins/plugins.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* Update src/plugins/plugins.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* fix: suggestions

* fix: drop unnecessary this.annotation initialization

* fix: move all initialization calls to constructor

* refactor: move vue dist import to webpack alias

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-12-27 12:15:51 -08:00
715a44864e Reduce bundle size (#7246)
* chore: use ESModule imports for d3 libraries

* chore: add d3 types

* chore: use minified plotly

* chore: use ESModule style imports for printj

* chore: use `terser-webpack-plugin` to minimize

* Revert "chore: use minified plotly"

This reverts commit 0ae9b39d41b6e38f0fe38cd89a2cd73869f31c36.

* Revert "Revert "chore: use minified plotly""

This reverts commit 08973a2d2e6675206907f678d447717ac6526613.

* fix: use default minification options

* test: stabilize notebook image drop e2e test

* test(fix): remove .only()

* refactor: convert TelemetryValueFormatter to es6 class

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-12-20 11:23:24 -08:00
0d97675a0a [CI] Add a11y checks to our visual testing suite (#7047)
* Add a VISUAL_URL constant and remove all vestiges of hide inspector and tree

* hide timer and add concurrency

* turn off concurrency

* factor out old appAction

* Add expand button to panes

* remove old slow annotations

* fix fault

* update domcontentloaded

* missed refactor

* driveby: setTimeBounds private

* add comments to the percyCSS

* suggest MISSION_TIME

* more notes

* regen

* clean up test

* driveby: clean up order

* restructure

* add new suite now that i'ts hidden

* use mission time everywhere possible

* driveby

* rerun generatedata

* comments

* lint fix

* add inital pass of a11y tests

* first pass for fixing a11y problems

* update build

* add copyright

* check for slashes

* rename files

* update testcases

* update to latest

* updates

* section 508

* final version

* remove leftover

* comments

* documentation

* bad merge

* comment

* use current ruleset

* typo

* feedback

* remove time conductor due to false positives

* default to closed tabs

* add some more accessiblity checking

* change to a condition widget and update search

* lint fix

* turns this into a single function

* update doc to match single function

* update to single function

* update to new function

* lint

* update locator for search input

* fix extra page

* why

* comments

* comments

* refacotr

* wrong paths and fixes
2023-12-19 14:16:08 -08:00
ec910dcbdc Add tests for inspector data pivoting (#7282)
* inspector view needs renderWhenVisible function

* add a default visualization source

* add plugin to exercise data pivotting

* use correct key string

* test skeleton

* add e2e test

---------

Co-authored-by: David Tsay <david.e.tsay@nasa.gov>
Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
2023-12-19 04:33:50 -06:00
0ce36c8297 [CI] Remove unneeded parameterization and increase parallelism (#7310)
* remove unneeded parameterization and increase parallelism

* wrong scripts

* rename

* refactor: rename job

* fix: woops

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-12-18 16:48:13 -08:00
3fccac0bfc Automatically check additional views for memory leaks on navigation (#7300)
* add new objects for navigation testing

* add test for remaining objects

* cleanup plotly on dismount

* lint

* remove vestigial object

* do not need to call destroy here

* do not need to call destroy here

* refactor: ensure path to test file always resolves

* refactor: better locators

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-12-15 10:13:41 +01:00
2675220452 Defer intersection monitoring until needed to prevent race conditions (#7278)
* defer visibility rendering until actually used to prevent race conditions

* remove extrace space
2023-12-15 09:40:36 +01:00
4075a31d96 PR Cop 2.0 (#5815)
* PR Cop

* Update the PR Template

* address review comments
2023-12-14 10:55:51 -08:00
7f95325816 Add CodeQL badge to readme (#6803)
Because we're passing and we should be proud of that!

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-12-14 07:31:31 -08:00
e07ba61c4c chore(deps-dev): bump marked from 9.1.5 to 11.1.0 (#7299)
Bumps [marked](https://github.com/markedjs/marked) from 9.1.5 to 11.1.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v9.1.5...v11.1.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-14 07:29:27 -08:00
97bffc554f Fix Notebook entry hover problem (#7106)
Closes #7105
- Removed `:not(:focus)` CSS check for hover.
- New theme constant for a more subdued hover effect to differentiate
from active editing mode.

Co-authored-by: Scott Bell <scott@traclabs.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-12-14 06:39:09 -08:00
250db8d7f9 Allow specification of swimlanes via configuration (#7200)
* Use specified group order for plans

* Allow groupIds to be a function

* Fix typo in if statement

* Check that activities are present for a given group

* Change refresh to emit the new model

* Update domainobject on change

* Revert changes for domainObject

* Revert groupIds as functions. Check if groups are objects with names instead.

* Add e2e test for plan swim lane order

* Address review comments - improve if statement

* Move function to right util helper

* Fix path for imported code

* Remove focused test

* Change the name of the ordered group configuration
2023-12-14 06:19:42 -08:00
3520a929a9 chore(deps): bump github/codeql-action from 2 to 3 (#7296)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-14 14:03:20 +00:00
800b03ad60 fix: define main entry point in package.json (#7298) 2023-12-14 05:50:17 -08:00
902ed0274a Update API Readme to indicate renderWhenVisible function is optional (#7285)
* using less normative languange

* grammar
2023-12-13 09:57:48 +00:00
9ed8d4f5a5 Provide own renderWhenVisible function since manually creating an object view (#7281)
inspector view needs renderWhenVisible function
2023-12-08 18:33:49 +01:00
93e5219917 Handle aborted get requests and null domain objects when using ObjectAPI (#7276)
* handle null domain objects

* add some test coverage for aborting search results

* to make test independent
2023-12-05 17:43:49 +00:00
2d9c0414f7 Inconsistent behavior with multiple annotations in imagery (#7261)
* fix opacity issue

* wip, though selection still weird

* remove debugging

* plots still have issue with last tag

* add some better tests

* Apply suggestions from code review

Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>

* remove hardlined classnames

* case sensitivity

* good job tests finding issue

---------

Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-12-04 19:12:24 -08:00
a3e0a0f694 chore(deps-dev): bump @vue/compiler-sfc from 3.3.8 to 3.3.10 (#7270)
Bumps [@vue/compiler-sfc](https://github.com/vuejs/core/tree/HEAD/packages/compiler-sfc) from 3.3.8 to 3.3.10.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/commits/v3.3.10/packages/compiler-sfc)

---
updated-dependencies:
- dependency-name: "@vue/compiler-sfc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-12-04 19:29:58 -05:00
5ec155c7ce chore: bump version to 3.3.0-next (#7273)
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-12-04 15:58:43 -08:00
cfb190fb68 wrote an e2e test for can create a notebook object (#7236)
* wrote an e2e test for can create a notebook object

* made suggested changes to notebook.e2e.spec.js

* made suggested changes to notebook.e2e.spec.js

* made changes to newly created notebook

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-12-04 22:15:55 +00:00
72e0621ecd When searching, build the path objects asynchronously while returning the results (#7265)
* build paths as fast as we can

* fix tests

* add abort controllers and async load tags
2023-12-04 13:40:28 -08:00
e7b9481aa9 Destroy canvas in plots if not visible (#7263)
* first draft

* add some more debugging

* add test and remove debug

* Remove debug function

* consolidate destroy

* add better canvas name and handle if gl has gone missing

* extra check for extension
2023-12-04 21:28:24 +00:00
2dc1388737 chore(package.json): fix warning during npm publish (#7253)
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-12-01 09:44:03 -08:00
41bee3111c Update API documentation for Visibility-Based Rendering (#7262)
update API with documentation for Visibility-Based Rendering
2023-12-01 10:35:41 +01:00
97cb783c4b chore: bump d3-scale and use ESModule imports (#7245)
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-11-28 14:07:34 -08:00
39a31617b8 [Build] Update to Node 20 and remove 16 (EOL) (#7260)
attempt one
2023-11-28 13:05:28 -08:00
415b65237b Prevent rubber-banding in Telemetry Table filter input (#7248)
* should debounce the filtering of the telemetry, not the setting of the input

* add some laggy typing to check for debouncing issues

* revert test
2023-11-28 17:39:34 +01:00
28bfc90036 chore(deps-dev): bump eslint from 8.53.0 to 8.54.0 (#7250)
Bumps [eslint](https://github.com/eslint/eslint) from 8.53.0 to 8.54.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.53.0...v8.54.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 12:35:42 -08:00
7ce3ed5597 Provide visibility based rendering as part of the view api (#7241)
* first draft

* in preview mode, just show it

* fix unit tests
2023-11-20 09:19:00 -08:00
b9ae461b7d fix(#7234): Fix frame deletion in Flexible Layouts (#7244)
* fix: use the correct event name for frame deletion

* test: add test for frame removal

* refactor: update test locators, add a11y

* test: upgrade locator

* test: assert dialog text
2023-11-17 18:02:58 +00:00
15ee8303e4 Gauge fixes for NaN and composition policy (#5608)
* Closes #5536, #5538
- Significant changes to code flow for better handling of missing telemetry values; closes #5538.
- Changes to flow to handle range display when updating composition and when ranges are set by limits.
- Added `GaugeCompositionPolicy.js`; closes #5536.

* Closes #5536, #5538
- Code cleanup, linting.

* Closes #5538
- Linting fixes.

* Closes #5538
- Added test for 'Gauge does not display NaN when data not available'.

* Closes #5538
- Refined test.

* Closes #5538
- Refined 'NaN' test.
- Added test for 'Gauge enforces composition policy';

* Closes #5538
- Fix linting issues.

* Closes #5538
- Suggested changes from PR review.

* Closes #5538
- Suggested changes from PR review.

* Update e2e/tests/functional/plugins/gauge/gauge.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* chore: lint:fix

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-11-16 10:40:48 -08:00
a914e4f1f7 Only show marquee for selected item (#7180)
* only show marquee for selected item

* Revert "only show marquee for selected item"

This reverts commit d17af210c2.

* revert change made in #6767

* create framework for displayLayout visual test

* WIP create display layout for test

* only show marquee for selected

* fix selection of object in nested layout

* fix grid and code cleanup

* add child layouts side by side

* code cleanup

* externalize setup for reuse in multiple tests

* write marquee and grid tests

* fix object in layout locator

* fix nested layout selector

* add aria label to layouts

* fix layout locator

* add jsdoc for test setup function

* make test more efficient

* cleanup and linting

* update locator

* update locators

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-11-16 10:31:35 -08:00
cdd772aa87 fix(#7234): 'Remove Container' button not working in Flexible Layout toolbar (#7240)
* refactor: rename prop for clarity

- `orientation` -> `dragOrientation`

* fix(#7234): fix event name for flexible layout toolbar action

* test(e2e): add tests for flexible layout toolbar actions

* test: add `@localStorage` tags
2023-11-16 09:21:23 -08:00
7f8262b882 Changed global time to use time context current value for ITC (#7191)
Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-11-13 15:42:54 -06:00
deacd91078 Defer rendering for inactive tabs in open mct tabbed view (#7149)
* simple prototype

* add a few examples

* revert to original

* only check first element

* only print when we're firing

* need to return status

* ignore polling logic if not visible

* convert to es6 classes

* add private variables

* remove debug code

* revert on this branch webgl changes

* fix draw loader import

* do not use v-model for search component

* remove flakey unit tests and add e2e tests for same behavior

* remove fdescribe

* add test word

* add simple functional test for tabs

* add performance test for tabs

* make tab selection more explict

* better describe expects

* lint

* switch back to fixed time

* fix perf test for webpacked version

* lint

* relax condition

* relax condition

* resolve PR comments

* address PR review comments

* typo on role vs locator
2023-11-13 18:27:50 +00:00
29b7c389ad fix(index.html): use defer and move script to head (#6999) 2023-11-09 14:13:24 -08:00
591b5745a8 chore(deps-dev): bump vue from 3.3.4 to 3.3.8 (#7214)
Bumps [vue](https://github.com/vuejs/core) from 3.3.4 to 3.3.8.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.3.4...v3.3.8)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-11-09 11:27:49 -08:00
4b0abdf54f chore(deps-dev): bump eslint-plugin-unicorn from 48.0.1 to 49.0.0 (#7218)
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 48.0.1 to 49.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v48.0.1...v49.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-09 08:06:08 -08:00
0c19260028 chore(deps-dev): bump webpack from 5.88.0 to 5.89.0 (#7186)
Bumps [webpack](https://github.com/webpack/webpack) from 5.88.0 to 5.89.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.88.0...v5.89.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-09 08:05:46 -08:00
2cc00271b1 [CI] Add CI Troubleshooting doc (#6988)
* document how to bust cache

* Update TESTING.md

Co-authored-by: David 'Epper' Marshall <epper.marshall@gmail.com>

* add approapriate link

* Update missing troublehshooting doc and combine code-cov docs

* comments

---------

Co-authored-by: David 'Epper' Marshall <epper.marshall@gmail.com>
2023-11-09 08:04:52 -08:00
3c933eaa19 chore(deps-dev): bump @types/jasmine from 4.3.4 to 5.1.2 (#7219)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 4.3.4 to 5.1.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine)

---
updated-dependencies:
- dependency-name: "@types/jasmine"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-09 07:51:38 -08:00
b829735d64 [CI] Dependabot skip rebasing on every merge (#7216)
Skip rebasing on every merge
2023-11-08 15:28:32 -08:00
51eb2a4f59 Add static limit values to LAD tables (#7193)
* limits shown

* use more verbose way for uniqueness

* when adding items, check for what columns we need

* make header logic much simpler

* add test coverage

* fix test and lint

* Update e2e/tests/functional/plugins/lad/lad.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* Update e2e/tests/functional/plugins/lad/lad.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* change to getByTitle

* lint and change to getByLabel

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-11-08 17:56:59 +00:00
09b7873fbd chore(deps-dev): bump eslint from 8.48.0 to 8.53.0 (#7211)
Bumps [eslint](https://github.com/eslint/eslint) from 8.48.0 to 8.53.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.48.0...v8.53.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 17:16:08 +00:00
c3eef44beb chore(deps-dev): bump @percy/cli from 1.26.0 to 1.27.4 (#7212)
Bumps [@percy/cli](https://github.com/percy/cli/tree/HEAD/packages/cli) from 1.26.0 to 1.27.4.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.27.4/packages/cli)

---
updated-dependencies:
- dependency-name: "@percy/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 07:56:06 -08:00
34d3ba0cff chore(deps-dev): bump eslint-plugin-you-dont-need-lodash-underscore from 6.12.0 to 6.13.0 (#7213)
chore(deps-dev): bump eslint-plugin-you-dont-need-lodash-underscore

Bumps [eslint-plugin-you-dont-need-lodash-underscore](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore) from 6.12.0 to 6.13.0.
- [Release notes](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/releases)
- [Commits](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/compare/v6.12.0...v6.13.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-you-dont-need-lodash-underscore
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 07:41:02 -08:00
5fd24cb689 [Dependency] Update to skip regular releases of marked (#7209)
* update to latest

* skip major versions
2023-11-06 16:19:12 -08:00
a64faae394 docs: add warning about deploying devServer to prod environment (#7203)
* docs: add warning about using dev server in
production environment

* docs: fix formatting
2023-11-06 16:12:10 -08:00
d44e06d598 docs: add related repos section to README.md (#7111)
* docs: add related repos section to README.md

* docs: update related repos section
2023-11-06 16:10:37 -08:00
bfcab6b327 chore(deps-dev): bump webpack-merge from 5.9.0 to 5.10.0 (#7205)
Bumps [webpack-merge](https://github.com/survivejs/webpack-merge) from 5.9.0 to 5.10.0.
- [Changelog](https://github.com/survivejs/webpack-merge/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/survivejs/webpack-merge/compare/v5.9.0...v5.10.0)

---
updated-dependencies:
- dependency-name: webpack-merge
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 00:09:51 +00:00
1f24cbed1f chore(deps-dev): bump @vue/compiler-sfc from 3.3.4 to 3.3.8 (#7208)
Bumps [@vue/compiler-sfc](https://github.com/vuejs/core/tree/HEAD/packages/compiler-sfc) from 3.3.4 to 3.3.8.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/commits/v3.3.8/packages/compiler-sfc)

---
updated-dependencies:
- dependency-name: "@vue/compiler-sfc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 15:52:17 -08:00
da7d0df736 chore(deps-dev): bump uuid from 9.0.0 to 9.0.1 (#7207)
Bumps [uuid](https://github.com/uuidjs/uuid) from 9.0.0 to 9.0.1.
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 15:33:06 -08:00
8e7c02069e chore: bump Playwright to v1.39.0 (#7201) 2023-11-04 17:20:35 -07:00
4dbca9cb09 chore(deps): bump actions/checkout from 3 to 4 (#7034)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-11-02 16:39:54 -07:00
bc0c0d63c1 chore(deps-dev): bump npm-run-all2 from 6.0.6 to 6.1.1 (#7185)
Bumps [npm-run-all2](https://github.com/bcomnes/npm-run-all2) from 6.0.6 to 6.1.1.
- [Release notes](https://github.com/bcomnes/npm-run-all2/releases)
- [Changelog](https://github.com/bcomnes/npm-run-all2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bcomnes/npm-run-all2/compare/v6.0.6...v6.1.1)

---
updated-dependencies:
- dependency-name: npm-run-all2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-02 15:37:38 -07:00
0d27938843 docs: update Telemetry Formats section (#7173) 2023-11-02 14:35:36 -07:00
02f1013770 fix: DisplayLayout and FlexibleLayout toolbar actions only apply to selected layout (#7184)
* refactor: convert to ES6 function

* fix: include `keyString` in event name

- This negates the need for complicated logic in determining which objectView the action was intended for

* fix: handle the case of currentView being null

* fix: add keyString to flexibleLayout toolbar events

* fix: properly unregister listeners

* fix: remove unused imports

* fix: revert parameter reorder

* refactor: replace usage of `arguments` with `...args`

* fix: add a11y to display layout + toolbar

* test: add first cut of layout toolbar suite

* test: cleanup a bit and add Image test

* test: add stubs

* fix: remove unused variable

* refactor(DisplayLayoutToolbar): convert to ES6 class

* test: generate localStorage data for display layout tests

* fix: clarify "Add" button label

* test: cleanup and don't parameterize tests

* test: fix path for recycled_local_storage.json

* fix: path to local storage file

* docs: add documentation for
utilizing localStorage in e2e

* fix: path to recycled_local_storage.json

* docs: add note hyperlink
2023-11-02 20:42:37 +00:00
bdff210a9c chore(deps-dev): bump eslint-plugin-vue from 9.17.0 to 9.18.1 (#7188)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.17.0 to 9.18.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.17.0...v9.18.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-02 18:08:58 +00:00
ae22920576 Refine display options and add Independent Time Conductor option for Time List view (#7161)
* Apply sort settings immediately - even when in edit mode.

* Adds test for sort order

* Enable independent time conductor for time list view

* Remove time frame duration options.

* Remove immediate sorting in edit mode.

* Closes #7113
- Color of current events changed to bring more in-line with color conventions.
- Changed Time List rgba colors to solids.
- Removed bolding on current events text.

* Fix tests to include new changes

---------

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
2023-11-01 15:47:43 +00:00
a0fd1f0171 Removed errant brace in ObjectAPI Error (#7192)
Removed errant brace
2023-10-31 07:28:20 -07:00
c7fd584b58 chore(deps-dev): bump @braintree/sanitize-url from 6.0.2 to 6.0.4 (#7190)
Bumps [@braintree/sanitize-url](https://github.com/braintree/sanitize-url) from 6.0.2 to 6.0.4.
- [Changelog](https://github.com/braintree/sanitize-url/blob/main/CHANGELOG.md)
- [Commits](https://github.com/braintree/sanitize-url/compare/v6.0.2...v6.0.4)

---
updated-dependencies:
- dependency-name: "@braintree/sanitize-url"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 23:05:33 +00:00
16ca994cfa chore(deps-dev): bump sinon from 15.1.0 to 17.0.0 (#7155)
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.1.0 to 17.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.1.0...v17.0.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-29 09:13:09 -07:00
ebe5323f82 chore(deps-dev): bump painterro from 1.2.78 to 1.2.87 (#7165)
Bumps [painterro](https://github.com/devforth/painterro) from 1.2.78 to 1.2.87.
- [Release notes](https://github.com/devforth/painterro/releases)
- [Changelog](https://github.com/devforth/painterro/blob/master/Release.md)
- [Commits](https://github.com/devforth/painterro/compare/v1.2.78...v1.2.87)

---
updated-dependencies:
- dependency-name: painterro
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-29 15:55:57 +00:00
7a8a6d3649 chore(deps-dev): bump eslint-plugin-unicorn from 44.0.2 to 48.0.1 (#7163)
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 44.0.2 to 48.0.1.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v44.0.2...v48.0.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-29 06:55:09 -07:00
25e7a16c77 chore(deps-dev): bump cspell from 7.3.6 to 7.3.8 (#7162)
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 7.3.6 to 7.3.8.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/compare/v7.3.6...v7.3.8)

---
updated-dependencies:
- dependency-name: cspell
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-28 14:57:47 +00:00
141939295a chore(deps): bump actions/setup-node from 3 to 4 (#7166)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-10-24 16:52:17 -07:00
2c1040c7c0 chore(deps-dev): bump sass from 1.63.4 to 1.68.0 (#7086)
Bumps [sass](https://github.com/sass/dart-sass) from 1.63.4 to 1.68.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.63.4...1.68.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rukmini Bose (Ruki) <48999852+rukmini-bose@users.noreply.github.com>
2023-10-24 16:26:27 -07:00
d94fe8806b [Plots] Gracefully handle Float32Array breaking values (#7138)
* WIP

* guaranteeing float32breaking values for swgs when option is set

* cleaning up and clarity

* more clarity

* removing randomization of float breaking number, as it is not necessary

* logging the values that could not be plotted for awareness

* remving auto-added imports

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-10-24 23:07:43 +00:00
7bf983210c [Filters] Fix view based filters when string input is enabled (#7050)
* de-reactifying some objects for clarity, handling strings for filters, some vue 3 formatting

* removing debug, fixing string value persistence

* remove unnecessary change

* removing vue utils from non vue files

* nipping proxy objects in the bud

* linting

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-10-24 15:33:08 -07:00
8f92cd4206 [Tooltips] Finish tests for gauges, telemetry tables, recently viewed items, and time strips (#7145)
Finish tests for gauge, telemetry tables, recently viewed items, and time strips

Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
2023-10-24 22:06:40 +00:00
13311b9fc8 Prevent infinite loop when updating a table row in place (#7154)
* bump index on update row in place

* add test

* Removing problematic test

* spelling
2023-10-23 09:22:13 -07:00
2daec448da chore: bump version to 3.2.0-next (#7117)
chore: bump version to 3.2.0-next

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-10-23 12:23:34 +02:00
5bd8d17592 chore(deps-dev): bump jasmine-core from 5.0.0 to 5.1.1 (#7008)
Bumps [jasmine-core](https://github.com/jasmine/jasmine) from 5.0.0 to 5.1.1.
- [Release notes](https://github.com/jasmine/jasmine/releases)
- [Changelog](https://github.com/jasmine/jasmine/blob/main/RELEASE.md)
- [Commits](https://github.com/jasmine/jasmine/compare/v5.0.0...v5.1.1)

---
updated-dependencies:
- dependency-name: jasmine-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 23:20:32 +00:00
954c72b100 chore(deps-dev): bump eslint-plugin-vue from 9.15.0 to 9.17.0 (#6907)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.15.0 to 9.17.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.15.0...v9.17.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 19:01:12 +00:00
43338f3980 chore: remove vue/compat and complete Vue 3 migration (#7133)
* chore: remove custom `compatConfig` settings

* chore: remove `vue-compat` and adjust webpack config

* chore: explicitly define Vue feature flags

* fix: `_data` property moved to `_.data`

* fix(e2e): revert to original test procedures

* refactor: replace final instances of `$set`

* refactor: remove `Vue` imports from tests

* refactor: `Vue.ref()` -> `ref()`

* refactor: actually push the changes...

* test: replace unit test with e2e test

* test: remove test as it's already covered by e2e

* fix(test): use `$ref`s instead of `$children`

* test(fix): more `$refs`

* fix(test): more `$refs`

* fix(test): use `$refs` in InspectorStyles tests

* fix(SearchComponent): use `$attrs` correctly

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-10-19 09:08:39 -07:00
1414f54c17 chore(deps-dev): bump vue-eslint-parser from 9.3.1 to 9.3.2 (#7125)
Bumps [vue-eslint-parser](https://github.com/vuejs/vue-eslint-parser) from 9.3.1 to 9.3.2.
- [Release notes](https://github.com/vuejs/vue-eslint-parser/releases)
- [Commits](https://github.com/vuejs/vue-eslint-parser/compare/v9.3.1...v9.3.2)

---
updated-dependencies:
- dependency-name: vue-eslint-parser
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 15:49:29 +00:00
9849e0398e fix(#7143): add eslint-plugin-no-sanitize and fix errors (#7144) 2023-10-16 09:26:12 -07:00
76889cf60d Rename all configuration inspector tabs to Config (#7140) 2023-10-12 13:48:13 -07:00
26d3bd1e69 When dropping an unsupported file onto a notebook entry, tell the user it isnt supported (#7115)
* handle unknown files and deal with copy/paste

* add some nice errors if couch pukes

* added how to adjust couchdb limits

* throw error on anntotation change

* keep blockquotes

* add test for blockquotes

* allow multi-file drop of images too

* add test for big files

* spell check

* check for null

* need to ignore console errors

* reorder tests so we can ignore console errors

* when creating new entry, ready it for editing

* fix tests and empty embeds

* fix tests

* found similar issue from notebooks in plots
2023-10-12 07:34:32 +02:00
a16a1d35b6 do not store state in singleton action (#7121)
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2023-10-10 15:49:45 -07:00
97b2ebc0bb Fix remaining vue-compat warnings (#6966)
* PascalCase files

* emit warnings

* minor updates

* merge conflict resolve pt 1

* part 2

* update to eventbus

* eventbus spelling

* fix: import

* fix: eventBus injection

* fix: import

* fix(test): provide eventBus in overlay plot tests

* refactor: EventBus as composable

* chore: lint:fix

* chore: require vue event hyphenation

* fix: revert event renames

* refactor: use PascalCase name

* fix: ensure `$attrs` are properly bound

* fix: emit `click` event from SearchComponent

* chore: remove rules already included in `vue/vue3-recommended` ruleset

* fix: remove `Vue` import

* chore: remove unused files

* fix: fix lint scripts and make them cross-platform

* refactor: rename `DataImagery.vue` -> `ImageryInspectorView.vue`

* refactor: rename `NumericData.vue` -> `NumericDataInspectorView.vue`

* refactor: rename components

* refactor: rename `GeneralIndicators.vue` -> `StatusIndicators.vue`

* refactor: rename components

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-10-10 13:29:01 -07:00
6b32c63039 [Staleness] Fix issue with object view staleness styles not being reset on clock change (#7122)
Add logic to un/re-subscribe when clock changes to object view
2023-10-06 15:26:05 -07:00
084784a409 Handle negative height & width in image annotations (#7116)
* add fix

* remove debug code

* add test for unholy rectangles

* make test a bit more forgiving

* address pr review
2023-10-06 19:08:42 +02:00
734a8dd592 [Staleness] Fix staleness on clock change (#7088)
* Update staleness mixin
* Fix listeners and add guard
* Add check to make sure staleness only shows for correct clock
* Add guard for time api
* Cleanup the setting of isStale in ObjectView
* Cleanup use of combinedKey on LadTableSet
2023-10-04 13:39:20 -07:00
5eed5de3bb chore(cspell): use --quiet flag (#7110)
chore(cspell): use `--quiet` flag
2023-10-04 14:47:49 +02:00
ce59c0f50a Check realtime mode in remote clock interceptor (#6985)
* Revert Date.now() purge change
Check that the request is using realtime before using the remote-clock start and end timestamps for telemetry requests
* docs: clarify comment

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-10-03 20:41:02 +00:00
d53d8d562e Eagerly lose WebGL context on DrawWebGL.destroy() (#7080)
* test default for preserveDrawingBuffer
* fix: delete WebGL resources on destroy
* fix: eagerly lose WebGL contexts on destroy
- Recommended by Mozilla's [WebGL best practices]-(https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#lose_contexts_eagerly).

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-10-03 19:33:51 +00:00
d973140906 [Documentation] Time API docs update new/deprecated functionality (#7107)
* update time api docs to reflect recent changes

* clarify what mode openmct starts in and update setMode arguments
2023-10-03 18:42:35 +00:00
b1169ffd7d chore(deps-dev): bump eslint-plugin-compat from 4.1.4 to 4.2.0 (#7104)
Bumps [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat) from 4.1.4 to 4.2.0.
- [Release notes](https://github.com/amilajack/eslint-plugin-compat/releases)
- [Changelog](https://github.com/amilajack/eslint-plugin-compat/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amilajack/eslint-plugin-compat/compare/v4.1.4...v4.2.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-compat
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-10-03 16:56:06 +00:00
ede93d881c Ensure CouchDB changes for plans trigger updates in the view (#7099)
Listen to ALL changes for a plan since couchdb feed updates does not trigger a property only event. It triggers a catchall '*' event.

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-10-02 23:26:13 +00:00
6947c912a7 Add markdown to notebook entries (#7084)
* try marked out

* fix url validation

* now rendering blockquotes properly

* add abbrv, link titles, and strikethrough

* fix tests and lint

* Closes #6060
- CSS resets and styling for markdown-related HTML markup in Notebook entries.
- Better styling and cursor affordances for Notebook entry selection and editing interaction flow.

* add line breaks option

* Closes #6060
- Tab

* Closes #6060
- Conversion of contenteditable-div to textarea started.
- Stubbed in textarea with styles.

* have it markdown with a textarea and adjust size automatically

* Closes #6060
- Padding added back to text `div` area.

* Closes #6060
- Styles added to support Shift Log and hover behavior for entries on locked pages.
- Removed `--major` styling from Shift Log Commit Entries button
to reduce confusion with entry commit button.
- CSS code cleanups.

* two step focus/edit. also scroll into view for editing

* add markdown, strip all tags, and truncate

* lint

* remove unneeded code

* fix notebook entry, selected page may also be null

* fix existing notebook tests

* lint

* fix whitelist

* readd whitelist

* lint

* fix link tests

* fix tests

* fix tagging test

* add some markdown test

* get rid of pause

* add another sanitization step

---------

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-10-02 22:28:02 +00:00
2243381d52 Protect against prototype pollution in import action (#7094) 2023-10-02 14:50:53 -07:00
3c7d3397d6 chore(deps-dev): bump cspell from 7.1.1 to 7.3.6 (#7067)
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 7.1.1 to 7.3.6.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/compare/v7.1.1...v7.3.6)

---
updated-dependencies:
- dependency-name: cspell
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-10-02 17:38:42 +00:00
9f8338124f Catchall for bug fix PRs and add performance category (#7096)
* Catchall for bug fix PRs and add performance category

* Move Bug fixes to the bottom

* Fix performance label
2023-09-29 17:17:14 +00:00
ab0e2d2c96 Hide image controls when tagging, and hide compass HUD by default (#7028)
* make compass HUD configurable and hide image controls when tagging

* lint fixes

* address PR comments

* change prop to inject

---------

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-09-28 03:58:24 +00:00
c3b5e4e1e3 chore: add release.yml (#7090)
Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-09-27 12:18:19 -07:00
8fc5aa6ed5 Revert "fix(templates): move to own folder" (#7092)
Revert "fix(templates): move to own folder (#7000)"

This reverts commit 5592d20ab1.
2023-09-26 16:02:48 -05:00
5592d20ab1 fix(templates): move to own folder (#7000)
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-09-26 13:37:55 -07:00
ce2305455a Add script to delete annotations (#7069)
* add script

* add package.json and script to delete annotations

* amend help

* fix issues

* added explicit runs

* add design document and index creation to script

* update tests to wait for url to change

* i think we can remove this deprecated function now
2023-09-25 10:15:00 -07:00
ff2c8b35b0 🙅🚮␡ Removeopenmct.components🚮🙅 (#7075)
🙅🚮␡`openmct.components`␡🚮🙅

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2023-09-21 14:05:35 -07:00
482f1f68dd Have annotations work with domain objects that have dots (#7065)
* migrating to new structure - wip

* notebooks work, now to plots and images

* resolve conflicts

* fix search

* add to readme

* spelling

* fix unit test

* add search by view for big search speedup

* spelling

* fix out of order search

* improve reliability of plot tagging tests
2023-09-21 13:50:08 -07:00
05c7a81630 Fix mojibake (#7073)
Add charset preamble to generated css
2023-09-21 01:01:30 +00:00
b8949db767 Memory leak fixes for several views (#7057)
* Change the mount utility to use Vue's createApp and defineComponent methods

* Fix display layout memory leaks caused by `getSelectionContext`

* fix some display layout leaks due to use of slots

* Fix imagery memory leak (removed span tag). NOTE: CompassRose svg leaks memory - must test on firefox to see if this is a Chrome leak.

* Fix ActionsAPI action collection and applicable actions leak.

* Fix flexible layout memory leaks - remove listeners on unmount. NOTE: One type of overlay plot (Rover Yaw) is still leaking.

* pass in the el on mount

* e2e test config and spec changes

* Remove mounting of limit lines. Use components directly

* test: remove `.only()`

* Fix display layout memory leaks

* Enable passing tests

* e2e README and appActions should be what master has.

* lint: add word to cspell list

* lint: fixes

* lint:fix

* fix: revert `el` change

* fix: remove empty span

* fix: creating shapes in displayLayout

* fix: avoid `splice` as it loses reactivity

* test: reduce timeout time

* quick fixes

* add prod mode and convert the test config to select the correct mode

* Fix webpack prod config

* Add launch flag for exposing window.gc

* never worked

* explicit naming

* rename

* We don't need to destroy view providers

* test: increase timeout time

* test: unskip all mem tests

* fix(vue-loader): disable static hoisting

* chore: run `test:perf:memory`

* Don't destroy view providers

* Move context menu once listener to beforeUnmount instead.

* Disconnect all resize observers on unmount

* Delete Test vue component

* Use beforeUnmount and remove splice(0) in favor of [] for emptying arrays

* re-structure

* fix: unregister listener in pane.vue

* test: tweak timeouts

* chore: lint:fix

* test: unskip perf tests

* fix: unregister events properly

* fix: unregister listener

* fix: unregister listener

* fix: unregister listener

* fix: use `unmounted()`

* fix: unregister listeners

* fix: unregister listener properly

* chore: lint:fix

* test: fix imagery layer toggle test

* test: increase timeout

* Don't use anonymous functions for listeners

* Destroy objects and event listeners properly

* Delete config stores that are created by components

* Use the right unmount hook. Destroy mounted view on unmount.

* Use unmounted, not beforeUnmounted

* Lint fixes

* Fix time strip memory leak

* Undo unneeded change for memory leaks.

* chore: combine common webpack configs

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-09-20 10:34:05 -07:00
61e7050391 chore(deps-dev): bump typescript from 5.1.3 to 5.2.2 (#7007)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.1.3 to 5.2.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.1.3...v5.2.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-09-18 18:45:24 +00:00
3f51516da9 chore(deps-dev): bump eslint-config-prettier from 8.8.0 to 9.0.0 (#6897)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.8.0 to 9.0.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.8.0...v9.0.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 18:24:20 +00:00
541a022f36 Embedding images in notebook entries (#7048)
* initial drag drop, wip

* images work as snapshots, but need to disable navigate to actions

* embed image name

* works now with images, need to be refactor so can duplicate code for entries too

* works dropping on entries too

* handle remote images too

* add e2e test

* spelling

* address most PR comments
2023-09-18 10:56:49 -07:00
c7b5ecbd68 Allow Data Visualization in inspector based on current selection (#7052)
* visualize data in inspector per selection

---------

Co-authored-by: Khalid Adil <khalidadil29@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-09-15 12:30:58 -07:00
6776cc308f PascalCase files (#6955)
* PascalCase files

* git mv for file name change

* renamed files

* merge changes from master

* fix: template name

* sort imports

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-09-14 09:55:44 -07:00
95ac919ddf chore(deps): bump docker/login-action from 2 to 3 (#7053)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 16:17:23 -07:00
2a1064cbab [CI] Stabilize visual tests, remove appAction, and update pane buttons (#7033)
* Add a VISUAL_URL constant and remove all vestiges of hide inspector and tree

* hide timer and add concurrency

* turn off concurrency

* factor out old appAction

* Add expand button to panes

* remove old slow annotations

* fix fault

* update domcontentloaded

* missed refactor

* driveby: setTimeBounds private

* add comments to the percyCSS

* suggest MISSION_TIME

* more notes

* regen

* clean up test

* driveby: clean up order

* restructure

* add new suite now that i'ts hidden

* use mission time everywhere possible

* driveby

* rerun generatedata

* comments

* lintfix
2023-09-11 23:33:46 +00:00
8e917b2679 Remove large series models from reactive data in plots (#6961)
* remove series object from highlights

* remove series models from legend reactive data

* drawing all annotations at once is way faster

* fix multi annotations

* lots of reactive things depending on config

* make annotation lookup faster

* lint

* readd perf test

* address PR comments

* fix highlight typo

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-09-06 09:32:36 -07:00
0be106f29e Fix and re-enable disabled unit test suites (#6990)
* fix: register event listeners etc in `created()` hook

* fix: initialize `stalenessSubscription` before composition load and in `created()` hook

* refactor(test): make `openmct` const

* refactor: update overlayPlot spec to Vue 3 and fix tests

* refactor: fix eslint errors

* refactor: move initialization steps to `created()` hook

* test: re-enable and fix stackedPlot test suite

* fix: `hideTree=true` hides the tree again

* fix: add back in check on mount

* test: fix Layout tests

* fix: BarGraph test

* fix: plot inspector tests

* fix: reenable grand search tests

* fix: inspectorStyles test suite

* fix: re-enable most timeline tests

* fix: no need to hideTree in appactions

* fix: re-enable more tests

* test: re-enable more tests

* test: re-enable most plot tests

* chore: `lint:fix`

* test: re-enable timelist suite

* fix(#7016): timers count down or up to a target date

* test: add regression tests to cover disabled unit tests

* refactor: lint:fix

* refactor: no need for momentjs here

* fix: timerAction missed refactor

* fix: ensure timestamp is always UTC string

* test: use role selectors

* docs: add instructions for clock override in e2e

* docs: update

* Update readme

* lint

* spelling fixes

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-09-05 08:53:03 +00:00
9f7b3b9225 fix(#7022): remove ProgressBar artifacts from Notifications (#7024)
* fix: check for null or undefined

* refactor: `lint:fix`

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-09-04 12:51:32 +00:00
e9b94c308b chore: pin vue package versions (#7032) 2023-09-03 15:14:54 +00:00
64740e133f chore(deps-dev): bump eslint from 8.43.0 to 8.48.0 (#7010)
Bumps [eslint](https://github.com/eslint/eslint) from 8.43.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.43.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 23:33:24 +00:00
c27ad469f6 feat(eslint): sort import rule (#6939)
* feat(eslint): sort import rule

* chore(deps): pin dep

* refactor: sort imports

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-08-31 13:40:00 -07:00
e09a7aebae feat(linting): concurrent linting (#6969) 2023-08-30 23:12:06 +00:00
b87459dfd7 ProgressBar null not undefined (#6953)
* ProgressBar null not undefined

* notification banner null

* update progress dialog

* docs: update type

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-08-29 23:49:31 +00:00
ca06a6a047 docs: update staticRootPlugin README (#7014) 2023-08-29 23:09:28 +02:00
95e3ab25a4 fix(dialog): empty description (#6986)
* fix(dialog): empty description

* tests(e2e): adds roleview test

* tests(e2e): test in beforeEach

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-28 15:54:49 -07:00
f9db6433a1 docs(readme): indent correctly (#6996)
* fix(readme): indent correctly

* fix(readme): review

* fix(readme): review

* chore(docs): revise

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* docs: tidy up a bit

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-08-28 19:59:25 +00:00
cbac2c1c82 docs(readme): note sections (#6997)
* fix(readme): note sections

* fix: notes

* fix: notes

* fix(readme): better markdown

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-28 19:50:20 +00:00
a8678aa739 Imagery layer checkbox should match layer visiblity (#7003)
Set layer visibility to false if layer visibility cannot be persisted
2023-08-28 10:32:37 -07:00
244e3b7938 [Aborts] Abort Telemetry Collections requests on Navigation, Add abort functionality to getLimits (#6872)
* debug

* abort any pending requests on router "change:path" event, this should catch cases where the UI is bogged down and doesnt destroy the tc first

* english

* cant always be on

* adding abort to limits requests

* finally-ing off the promise

* need to just return the object not the property

* sticking with the try/catch structure we use elsewhere

* removing abort on nav, as views should be calling destroy

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-08-24 21:17:58 +00:00
42b13c4dfb Fix couchdb setup and add a note on how to remove the container (#6915)
* discrete steps

* update script to remove couchdb

* address comments and add shellcheck linting

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-22 11:11:07 -07:00
351800b32a chore(npm): dont generate lockfile (#6970)
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-08-21 15:39:52 -07:00
6db390a71a Add strategy latest and timeContext to auto flow tabular and gauge views (#6960) 2023-08-21 14:09:39 -07:00
9ece4e55dc chore(package.json): add fields (#6971)
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-08-21 20:32:07 +00:00
0a497483f2 fix(html): minor fixes from validation (#6962)
* fix(html): minor fixes from validation

* chore(html): Update index.html

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-21 09:58:06 -07:00
a52577e729 feat(tooling): adds nvm (#6938)
* feat(tooling): adds nvm

* fix(ci): nodev16 -> nodev18

* chore(node): dont modify ci config

* feat(nvm): add lts

* docs(readme): add section on nvm

* fix(docs): revise section

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-08-19 13:16:26 -07:00
a495e86231 fix(#6516): Progress Bar does not show progress percentage (#6952)
MCT 6516

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-18 22:54:58 +00:00
bada228b8f Ensure that dynamically created vue components are destroyed. (#6948) 2023-08-17 23:24:02 +00:00
3f80b53ea6 [Tooltips] Fixes for dictionary objects and self-referential objects (#6916)
* Fix getTelemetryPath to handle cases where parent is the same as the child, handle yamcs aggregate telemetry, and fix how identifiers are passed in

* Cleanup getTelemetryPath

* Switch to filter instead of forEach

* Get path item names

* Remove tooltips on scroll of tree

* Remove handing for scroll

* Allow break-words

* Cleanup
2023-08-17 16:18:25 +00:00
99a3e3fc32 Recent objects do not update when object names are changed (#6927)
* fix tree name issue

* add name to key, and name observers to recent objects

* no need to change key

* make more of app reactive to name changes

* fix browse bar and document title

* listen in properties for name changes

* add tests for renaming

* yeah spelling linter

* add semantic tags to forms and fixup tests

* change purpose

* actually delete the listener

* ensuring deletion

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-16 21:38:09 +00:00
2d92223e16 fix(package.json): add author (#6941)
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-08-16 14:10:24 -07:00
f21685e216 fix(e2e): Stabilize ITC tests (#6933)
* fix(ITC): initialize ITC in `created()` hook

* fix(e2e): stabilize ITC tests

* docs: add JSDocs

* refactor: lint:fix

* test(e2e): add comment and assertion

* refactor: lint:fix
2023-08-16 19:02:09 +00:00
6c92e31036 fix(#6942): Toggling FlexibleLayout toolbar options reflects immediately in the view (#6943)
* fix: restore reactivity of config settings

- move initialization steps to `created()` hook

- remove unnecessary `:key` binds

- fix comments

* refactor: clean up

* refactor: clean up

* refactor: lint:fix

* test(e2e): add regression test and cleanup suite

* refactor: consistency is key!

* test(fix): fix unit tests, further cleanup
2023-08-16 17:52:23 +00:00
82b1760b0e chore: bump version to 3.1.0-next and update docs (#6921)
* chore: bump version to `3.1.0-next`

* docs: update version.md

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-08-16 16:15:30 +00:00
87feb0db34 Condition sets now provide the timeContext they're using when sending requests (#6929)
* Send in the timeContext for requests

* Fix failing test

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-08-15 17:32:30 +00:00
c53073b339 Fix remote clock subscription (#6919)
* If there are no listeners for this clock then don't bother subscribing after getting the domain object details

* Comment explaining the fix
2023-08-14 21:51:52 +00:00
57743e5918 fix: use loadDelay generator setting in subscriptions as well (#6918)
* refactor: use `getBounds()` instead of `bounds()`

* fix: use `loadDelay` in generator subscription

* refactor: fix up e2e test

* fix: remove `.only()`

* refactor: lint

* Start to fix up conditionSet test with comments

* test: edit conditionSet to add delay value

* test: tests the case where telemetry is available

* fix: remove `.only()`

* test: add comments, clarify assertion

* refactor: lint:fix

* test: fix conditionSet default condition name test

* test: add assertions to stabilize tags tests

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-08-14 19:04:01 +00:00
f3b819a786 chore: add vue3 to eslint, fix errors, and modify lint script (#6910) 2023-08-14 17:03:19 +00:00
50694f600c Light refactor of visual tests (#5585) 2023-08-11 17:18:08 -07:00
10f3e13e4d chore: modify cspell config and fix all typos (#6908) 2023-08-10 16:20:16 +00:00
9be9c5e28e Check for null in DuplicateAction (#6904)
check for null before checking before hasOwnProperty
2023-08-09 11:38:17 -07:00
58aeac94ac Feat(tooling): add cspell (#6892)
* feat(tooling): add cspell

* fix: pin dep

* ci(linting): add spelling
2023-08-09 08:34:45 -07:00
1e3097f54b chore: bump Playwright to 1.36.2 (#6901)
* chore: bump Playwright to `1.36.2`

* chore: remove `playwright/core` dependency

* chore: temporarily disable cacheing step

* chore: temp disable cacheing for e2e-couchdb run

* chore: restore cacheing step

* chore: remove `--prefer-offline` option
2023-08-08 10:44:16 -07:00
6a9ff91d93 Dismiss the independent time conductor popup on unmount (#6859)
* Don't set conductor popup to null unless the view is being destroyed

* Replace beforeDestroy with beforeUnmount

* Propagate plot tick widths to timeline view

* Check if conductor popup exists before trying to remove it from the dom

* Fix imagery e2e test

* Revert accidental commit

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-07 23:19:13 +00:00
accfbc96ab Fix Plan View duplicate scrollbars (#6865)
* Closes #6864
- CSS fixes to remove problematic duplicate overflow handling.

* fix(e2e): stabilize autoscale test

* fix(e2e): mark overlay plot tagging test as slow

* fix(e2e): stabilize ITC e2e test

* fix(e2e): don't use hard wait

* fix: remove .only 😳

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-07 22:48:29 +00:00
9942bbbc0f chore: move indexTest to kebab-case (#6860) 2023-08-06 12:54:36 -07:00
4287cd5413 [CI] Update docker login step to work across forks and non-nasa-users (#6891)
Continue on error
2023-08-05 15:05:40 -07:00
ee6ca11558 Only load annotations in fixed time mode or frozen (#6866)
* fix annotations load to not happen on start

* remove range checking per annotated point

* back to local variable

* reduce tagging size to improve reliability of test

* remove .only

* remove .only

* reduce hz rate for functional test and keep high frequency test in performance

* remove console.debugs

* this test runs pretty fast now

* fix network request tests to match new behavior
2023-08-03 09:40:52 -07:00
676bb81eab Synchronize timers between multiple users (#6885)
* created a throttle util and using it in timer plugin to throttle refreshing the timer domain object

* Simplify timer logic

* Clarify code a little

* refactor: lint:fix

* Fix linting issue

---------

Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-08-02 16:30:51 -07:00
c6305697c0 Set the raw series limits so that we can get the raw series limits (#6877)
* Set the raw series limits so that we can get the raw series limits

* fix: `toRaw()` the other gets/sets/deletes

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-08-02 09:50:03 -07:00
0421936874 fix: suppress deprecation warnings to once per unique args (#6875) 2023-08-02 09:11:41 -07:00
95e686038d fix: toggling markers, alarm markers, marker style + update Vue.extend() usage to Vue 3 (#6868)
* fix: update to `defineComponent` from `Vue.extend()`
* fix: unwrap Proxy arg before WeakMap.get()
* refactor: `defineComponent` not needed here
2023-08-01 14:07:59 -07:00
f705bf9a61 Wait for bounds change to reset telemetry collection data (#6857)
* Reset and re-request telemetry only after receiving bounds following a mode change

* Don't check for tick - just in case the mode is set without bounds

* Use the imagery view timeContext to get related telemetry.

---------

Co-authored-by: Khalid Adil <khalidadil29@gmail.com>
2023-07-31 18:15:08 +00:00
50559ac502 Don't allow editing line more when not editing display layout (#6858) 2023-07-31 10:16:52 -07:00
f0ef93dd3f 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
2023-07-31 11:57:11 -05:00
3ae14cf786 Revert "[CI] Temporarily disable some tests" (#6853)
* Revert "[CI] Temporarily disable some tests (#6806)"

This reverts commit 85974fc5f1.

* fix(e2e): fix visual tests

* refactor: lint:fix

* fix: revert localStorage data changes

---------

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-07-28 17:20:06 -07:00
194eb43607 fix(#6854): [LADTableSet] prevent compositions from becoming reactive (#6855)
* fix: prevent compositions from becoming reactive
2023-07-28 12:35:11 -07:00
3c2b032526 Plan rendering inside a timestrip (#6852)
* Use the width and height of the container of the plan to set the activity widths and now markers

* Use the right parent to determine height and width

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-07-28 10:24:48 -07:00
d4e51cbaf1 Use the current timestamp from the global clock (#6851)
* Use the current timestamp from the global clock. Use mode changes to set if the view is fixed time or real time

* Reload the page after adding a plan and then change the url params.
2023-07-28 09:37:11 -07:00
7c58b19c3e Switch staleness provider for SWG to use modeChanged instead of clock (#6845)
* Switch staleness provider for SWG to use modeChanged instead of clock
2023-07-28 05:04:42 +00:00
16e1ac2529 Fixes for e2e tests following the Vue 3 compat upgrade (#6837)
* clock, timeConductor and appActions fixes

* Ensure realtime uses upstream context when available
Eliminate ambiguity when looking for time conductor locator

* Fix log plot e2e tests

* Fix displayLayout e2e tests

* Specify global time conductor to fix issues with duplicate selectors with independent time contexts

* a11y: ARIA for conductor and independent time conductor

* a11y: fix label collisions, specify 'Menu' in label

* Add watch mode

* fix(e2e): update appActions and tests to use a11y locators for ITC

* Don't remove the itc popup from the DOM. Just show/hide it once it's added the first time.

* test(e2e): disable one imagery test due to known bug

* Add fixme to tagging tests, issue described in 6822

* Fix locator for time conductor popups

* Improve how time bounds are set in independent time conductor.
Fix tests for flexible layout and timestrip

* Fix some tests for itc for display layouts

* Fix Inspector tabs remounting on change

* fix autoscale test and snapshot

* Fix telemetry table test

* Fix timestrip test

* e2e: move test info annotations to within test

* 6826: Fixes padStart error due to using it on a number rather than a string

* fix(e2e): update snapshots

* fix(e2e): fix restricted notebook locator

* fix(restrictedNotebook): fix issue causing sections not to update on lock

* fix(restrictedNotebook): fix issue causing snapshots to not be able to be deleted from a locked page

- Using `this.$delete(arr, index)` does not update the `length` property on the underlying target object, so it can lead to bizarre issues where your array is of length 4 but it has 3 objects in it.

* fix: replace all instances of `$delete` with `Array.splice()` or `delete`

* fix(e2e): fix grand search test

* fix(#3117): can remove item from displayLayout via tree context menu while viewing another item

* fix: remove typo 

* Wait for background image to load

* fix(#6832): timelist events can tick down

* fix: ensure that menuitems have the raw objects so emits work

* fix: assign new arrays instead of editing state in-place

* refactor(timelist): use `getClock()` instead of `clock()`

* Revert "refactor(timelist): use `getClock()` instead of `clock()`"

This reverts commit d888553112.

* refactor(timelist): use new timeAPI

* Stop ticking when the independent time context is disabled (#6833)

* Turn off the clock ticket for independent time conductor when it is disabled

* Fix linting issues

---------

Co-authored-by: Khalid Adil <khalidadil29@gmail.com>

* test: update couchdb notebook test

* fix: codeQL warnings

* fix(tree-item): infinite spinner issue

- Using `indexOf()` with an object was failing due to some items in the tree being Proxy-wrapped and others not. So instead, use `findIndex()` with a predicate that compares the navigationPaths of both objects

* [Timer] Remove "refresh" call, it is not needed (#6841)

* removing an unneccessary refresh that waas causing many get requests
* lets just pretend this never happened

* fix(mct-tree): maintain reactivity of all tree items

* Hide change role button in the indicator in cases where there is only… (#6840)

Hide change role button in the indicator in cases where there is only a single role available for the current user

---------

Co-authored-by: Shefali <simplyrender@gmail.com>
Co-authored-by: Khalid Adil <khalidadil29@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: David Tsay <david.e.tsay@nasa.gov>
Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
2023-07-28 02:06:41 +00:00
4885c816dc Migrate to Vue 3 Migration Build (#6767)
* Replacing all instances of the new Vue() component creation pattern
* In Vue 3, components cannot be created on the fly and mounted off-DOM. The suggested fix from Vue is to use createApp, but in the context of Open MCT this means dozens of Vue apps being created and destroyed at any given moment. Instead, we have used a community hack for creating individual components.
* beforeDestroy() -> beforeUnmount()
* destroyed() -> unmounted()
* The addition of deep: true option on Array listeners is now required to detect Array changes
* Open MCT is now mounted on a child div instead of directly on document.body


---------

Co-authored-by: Scott Bell <scott@traclabs.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-07-19 11:22:23 -07:00
42b545917c [Time] Conductors and API Enhancements (#6768)
* Fixed #4975 - Compact Time Conductor styling
* Fixed #5773 - Ubiquitous global clock
* Mode functionality added to TimeAPI
* TimeAPI modified to always have a ticking clock
* Mode dropdown added to independent and regular time conductors
* Overall conductor appearance modifications and enhancements
* TimeAPI methods deprecated with warnings
* Significant updates to markup, styling and behavior of main Time Conductor and independent version.


---------

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
Co-authored-by: Shefali <simplyrender@gmail.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Scott Bell <scott@traclabs.com>
2023-07-18 17:32:05 -07:00
85974fc5f1 [CI] Temporarily disable some tests (#6806)
Temporarily disable some tests
2023-07-17 14:03:47 -07:00
761d4ce7e4 chore: bump version to 3.0.0-SNAPSHOT (#6800) 2023-07-15 08:26:56 -07:00
5b1298f221 Adds limits subscription to the Telemetry API (#6735)
* Add subscription for limits for domain objects
---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2023-07-14 17:09:05 -07:00
662d14354c Suppress role selection if no roles available (#6802) 2023-07-14 16:22:25 -07:00
e386036dbf Enhance telemetry tables to allow in place updates for data (#6694)
* cherry-pick(#6602) : [ExportAsJson] Multiple Aliases in Export and Co… (#6658)

cherry-pick(#6602) : [ExportAsJson] Multiple Aliases in Export and Conditional Styles Fixes (#6602)

Fixes issues that prevent import and export from being completed successfully. Specifically:

* if multiple aliases are detected, the first is created as a new object and and added to it's parent's composition, any subsequent aliases of the same object will not be recreated, but the originally created one will be added to the current parent's composition, creating an alias.

* Also, there are cases were conditionSetIdentifiers are stored in an object keyed by an item id in the configuration.objectstyles object, this fix will handle these as well.

* Replaces an errant `return` statement with a `continue` statement to prevent early exit from a recursive function.

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>

* chore: bump version to `2.2.3` (#6685)

* Add configuration detection to update table rows in place

* Fix typo for datum access

* First add new rows to the table and then update rows in place

* Each row much be checked for in place updates and inserted as needed

* Fix typo. Remove unused code.

* Update datum only. And don't allow undefined values for columns

* Fix typo

* Rename function for clarity

* Use telemetry metadata to indicate datum property to use for in place updates

* Fix typo for method call

* Fix typo for return value

* fullDatum is the datum BEFORE normalizing.

---------

Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-07-14 14:51:23 -07:00
6e79e5e2b0 [Timelist] Fixed Time use Now as start time - 5772 (#6497)
* Selectively filter activities only for realtime

* Remove unnecessary logic

* Adjust hideAll and showAll flags for non-realtime mode

* Filter out past events for fixed time

* Set the timestamp on bounds change

* Cleanup

* Removed duplicated listing since handled by different method

* Inverted variable

* removed setting showAll flag

* Remove unusued showAll value

* Removed noCurrent state and isCurrent logic check based on noCurrent

* Set formatted start / end to utc mode to synchronize with current time counductor value

* Add missed file

* Lint fixes

* Formatter improvements to use the Time API and lint fix

* Updated test to use Time API formatter instead of moment directly

* Linting fix to pluginSpec

* Prettier one line

---------

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-07-14 15:19:33 -05:00
32529ff6b2 Role selection for operator status roles (#6706)
* Add additional test roles to example user

* Add session storage and role to user indicator

* Update example user provider

* Added selection dialog to overlays and implemented for operator status

* Display role in user indicator

* Updates to broadcast channel lifecycle

* Update comment

* Comment width

* UserAPI role updates and UserIndicator improvement

* Moved prompt to UserIndicator

* Reconnect channel on error and UserIndicator updates

* Updates to status api canPRovideStatusForRole

* Cleanup

* Store status roles in an array instead of a singular value

* Added success notification and cleanup

* Lint

* Removed unused role param from status api call

* Remove default status role from example user plugin

* Removed status.getStatusRoleForCurrentUser

* Cleanup

* Cleanup

* Moved roleChannel to private field

* Separated input value from active role value

* More flight like status role names and parameter names

* Update statusRole parameter name

* Update default selection for roles if input is not chosen

* Update OperatorStatusIndicator install to hide if an observer

* console.log

* Return null instead of undefined

* Remove unneccesary filter on allRoles

* refactor: format with prettier

* Undid merge error

* Merge conflict extra line

* Copyright statement

* RoleChannelProvider to RoleChannel

* Throw error on no provider

* Change RoleChannel to ActiveRoleSynchronizer and update method calls to match

* iconClass to alert

* Add role selection step to beforeEach

* example-role to flight

* Dismiss overlay from exampleUser plugin which affected menu api positioning

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-07-14 19:10:58 +00:00
92329b3d8e Tree item abort (#6757)
* adding abortSignal back to composition load
* suppress AbortError console.errors from couch, delay requests for test to trigger abort
---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2023-07-14 17:49:10 +00:00
cde8fbbb0d [Tooltips] Add tooltips on hover (#6756)
* Add tooltip api, extend object api to add telemetry composition lookups, and add tooltips to gauges/notebook embeds/plot legends/object frames/object names/time strips/recent objects/search results/object tree

* Add tooltips to telemetry/lad tables

* Styling normalization, sanding and polishing.

* Add tooltips for Conditional widgets and Tab Views

* Add tests

* Switch to using enum-ish consts for tooltip locations

* Trim LAD table row name to account for spacing required by linting rules

---------

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
2023-07-13 21:37:59 -07:00
795d7a7ec7 Fix couchdbsearchfolder and allow clocky reports (#6770)
* Fix CouchDBSearchFolder plugin to have unique identifiers.
Allow ttt-reports to be viewed as web pages

* Remove ttt-report type from WebPage view provider. This is being moved to the viper-openmct repo instead

* Adds check for classList

* Add WebPage to the components list

* Remove uuid and use the folder name as the identifier instead

* Remove focused test

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
2023-07-13 19:50:52 +00:00
5031010a00 Add role attribution to notebook entries and export (#6793)
Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
2023-07-13 19:09:00 +00:00
ac22bebe76 Batch Couch DB create calls (#6779)
* Implement persistence batching for Couch DB

* Add tests for persistence batching

---------

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-07-12 04:36:00 +00:00
d08ea62932 Toggle between showing aggregate stacked plot legend or per-plot legend (#6758)
* New option to show/hide stacked plot aggregate legend - defaulted to not show.
Use the Plot component in the StackedPlotItem component for simplicity and show/hide sub-legends as needed.

* Fix position and expanded classes when children are showing their legends

* Fix broken tests and ensure gridlines and cursorguides work.

* Adds e2e test for new legend configuration for stacked plot

* Address review comments - Remove commented out code, optimize property lookup, fix bug with staleness

* Remove the isStale icon in the legend when a plot is inside a stacked plot.

---------

Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
2023-07-11 23:16:46 +00:00
293f25df19 [CI] Update Github Actions to combine deploysentinel PR reports and driveby (#6784)
* include git hash

* skip a test
2023-07-11 14:31:23 -07:00
9c22bcfb3e [CI] Fix couchdb e2e trigger and run nightly, part 3 (#6782)
* Run nightly, fix triggers

* contains

* driveby: remove github reporter

* update tests to match

* redo opened logic

* don't run pr:e2e and pr:platform
2023-07-08 13:03:14 -07:00
3b0e05ed14 chore(deps-dev): bump sanitize-html from 2.10.0 to 2.11.0 (#6766)
Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.10.0 to 2.11.0.
- [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apostrophecms/sanitize-html/compare/2.10.0...2.11.0)

---
updated-dependencies:
- dependency-name: sanitize-html
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 11:39:24 -07:00
ff7f55574d chore(deps-dev): bump flatbush from 4.1.0 to 4.2.0 (#6762)
Bumps [flatbush](https://github.com/mourner/flatbush) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/mourner/flatbush/releases)
- [Commits](https://github.com/mourner/flatbush/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: flatbush
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 08:12:02 +00:00
58f869b21b chore(deps-dev): bump webpack from 5.86.0 to 5.88.0 (#6764)
Bumps [webpack](https://github.com/webpack/webpack) from 5.86.0 to 5.88.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.86.0...v5.88.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 23:47:38 +00:00
834a19f996 chore(deps-dev): bump sass from 1.63.3 to 1.63.4 (#6743)
Bumps [sass](https://github.com/sass/dart-sass) from 1.63.3 to 1.63.4.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.63.3...1.63.4)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-06-22 13:07:33 -07:00
1d7cd64652 chore(deps-dev): bump @babel/eslint-parser from 7.21.8 to 7.22.5 (#6747)
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.21.8 to 7.22.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.5/eslint/babel-eslint-parser)

---
updated-dependencies:
- dependency-name: "@babel/eslint-parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 16:09:44 +00:00
68ed7bf0e5 chore(deps-dev): bump eslint-plugin-vue from 9.14.1 to 9.15.0 (#6746)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.14.1 to 9.15.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.14.1...v9.15.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 16:23:11 -07:00
4b39ef3235 chore(deps): bump docker/login-action from 1 to 2 (#6754)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 16:15:46 -07:00
b685b9582e [CI]Add docker and npm caching (#6748) 2023-06-21 20:54:14 +00:00
d8ac209a96 Fix race condition in image annotations loading and drawing them on the canvas (#6751)
fix race condition between annotation loading and drawing the annotations
2023-06-21 20:20:35 +02:00
f254d4f078 chore: bump version to 2.2.6-SNAPSHOT (#6752)
Co-authored-by: John Hill <john.c.hill@nasa.gov>
2023-06-21 10:16:36 -07:00
c75a82dca5 chore(deps-dev): bump eslint from 8.42.0 to 8.43.0 (#6744)
Bumps [eslint](https://github.com/eslint/eslint) from 8.42.0 to 8.43.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.42.0...v8.43.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 16:54:20 +00:00
9423591e4d chore(deps-dev): bump sass-loader from 13.3.1 to 13.3.2 (#6728)
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 13.3.1 to 13.3.2.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v13.3.1...v13.3.2)

---
updated-dependencies:
- dependency-name: sass-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 15:57:01 +00:00
5a7174bf2a Annotations for imagery prototype (#6624) 2023-06-20 17:12:45 +00:00
d305443445 chore(deps-dev): bump @types/jasmine from 4.3.1 to 4.3.4 (#6745)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 4.3.1 to 4.3.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine)

---
updated-dependencies:
- dependency-name: "@types/jasmine"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 09:39:27 -07:00
bd5cb8139c Fix controls scope to only the current image (#6710)
* de-dupe method

* there can be only one... input per label

* there can be only one... id but we need none

* there can be only one... input

* create test and add multiple images to display

* WIP test written but not passing

* fix test

* Update e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* Update e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>

* remove await from synchronous code

* linting

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-06-16 22:14:38 +00:00
022dffd419 Timelist bug fixes (#6661)
* Ensure timelist scrolling happens correctly for clock as well as fixed time

* If an activity has already started, show the duration as time to/since the end of the activity

* Addresses review comments: Reverse +/- indicators, removes milliseconds from times.

* Fix linting issues

* Add e2e test for timelist display

* Scroll to 'now' if available
2023-06-16 19:45:59 +00:00
4c5de37cff [Build] Update package engine version range to block on node 20 (#6736)
We have a dependency which is not
2023-06-16 08:03:56 -07:00
fb5bbde154 Batch annotation requests (#6719)
* batching, but query is messed up

* batching requests

* remove debug statement

* add test

* revert couchdb change
2023-06-15 17:08:34 -07:00
9a01cee5fa feat: Annotation API changes to support Geospatial (Map) annotations (#6703)
* feat: `getAnnotations` can take an `abortSignal`

* feat: add `MAP` annotationType

* fix: handle `MAP` annotations in search results

* fix: have `loadAnnotationForTargetObject` take an `abortSignal`

* fix(#5646): abort pending annotations requests on nav away from notebooks or plots

* fix: handle AbortErrors gracefully

* fix: remove redundant `MAP` annotation type

* docs: add comment

* fix: navigate before selection for geospatial results

* feat: comparators for annotation target equality

- Adds `addTargetComparator()` to the Annotation API, allowing plugins to define additional comparators for certain annotation types.
- Update usage of `_.isEqual()` for targets to use the `areAnnotationTargetsEqual()` method, which uses any additional comparators before falling back to a deep equality check.
- Handle aborted `getAnnotations()` calls gracefully in the AnnotationInspectorView

* test: add unit tests for target comparators

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-06-14 19:33:26 +00:00
8b2d3b0622 chore(deps-dev): bump sass from 1.62.1 to 1.63.3 (#6729)
Bumps [sass](https://github.com/sass/dart-sass) from 1.62.1 to 1.63.3.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.62.1...1.63.3)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 21:23:06 +00:00
60df9e79c1 chore(deps-dev): bump @percy/cli from 1.24.2 to 1.26.0 (#6727)
Bumps [@percy/cli](https://github.com/percy/cli/tree/HEAD/packages/cli) from 1.24.2 to 1.26.0.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.26.0/packages/cli)

---
updated-dependencies:
- dependency-name: "@percy/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 20:27:43 +00:00
5a1e544a4c chore(deps-dev): bump webpack-dev-server from 4.13.3 to 4.15.1 (#6723)
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.13.3 to 4.15.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.13.3...v4.15.1)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 20:16:09 +00:00
040ef0b998 chore(deps-dev): bump webpack from 5.85.1 to 5.86.0 (#6726)
Bumps [webpack](https://github.com/webpack/webpack) from 5.85.1 to 5.86.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.85.1...v5.86.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 03:30:43 +00:00
f77287530b chore(deps-dev): bump vue-eslint-parser from 9.3.0 to 9.3.1 (#6722)
Bumps [vue-eslint-parser](https://github.com/vuejs/vue-eslint-parser) from 9.3.0 to 9.3.1.
- [Release notes](https://github.com/vuejs/vue-eslint-parser/releases)
- [Commits](https://github.com/vuejs/vue-eslint-parser/compare/v9.3.0...v9.3.1)

---
updated-dependencies:
- dependency-name: vue-eslint-parser
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 20:22:28 -07:00
3cc93c0656 Add time context for telemetry collections (#6543)
* add time context for telemetry collections

* move time context to options

* clean up jsdoc

* clean up jsdoc

* Update src/api/telemetry/TelemetryAPI.js

* clean up comments

* use time context bounds if defined for start and end

* refactor: format with prettier
2023-06-09 17:21:44 +00:00
d71287b318 chore(deps-dev): bump mini-css-extract-plugin from 2.7.5 to 2.7.6 (#6702)
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 2.7.5 to 2.7.6.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.5...v2.7.6)

---
updated-dependencies:
- dependency-name: mini-css-extract-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 20:02:59 -07:00
943a40680f chore(deps-dev): bump sass-loader from 13.2.2 to 13.3.1 (#6714)
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 13.2.2 to 13.3.1.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v13.2.2...v13.3.1)

---
updated-dependencies:
- dependency-name: sass-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 17:10:13 -07:00
351e6a0fbf chore(deps-dev): bump css-loader from 6.7.3 to 6.8.1 (#6712)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 6.7.3 to 6.8.1.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.7.3...v6.8.1)

---
updated-dependencies:
- dependency-name: css-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 17:02:22 -07:00
1f514dde3d chore(deps-dev): bump webpack from 5.85.0 to 5.85.1 (#6717)
Bumps [webpack](https://github.com/webpack/webpack) from 5.85.0 to 5.85.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.85.0...v5.85.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 15:31:15 -07:00
47121cfbe8 chore(deps-dev): bump typescript from 5.0.4 to 5.1.3 (#6715)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.4 to 5.1.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.0.4...v5.1.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 15:15:12 -07:00
44c4d4ff47 chore(deps-dev): bump eslint from 8.41.0 to 8.42.0 (#6713)
Bumps [eslint](https://github.com/eslint/eslint) from 8.41.0 to 8.42.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.41.0...v8.42.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 15:03:24 -07:00
dc1d046822 chore(deps-dev): bump style-loader from 3.3.2 to 3.3.3 (#6698)
Bumps [style-loader](https://github.com/webpack-contrib/style-loader) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases)
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v3.3.2...v3.3.3)

---
updated-dependencies:
- dependency-name: style-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 21:47:13 +00:00
cdb20b9950 chore(deps-dev): bump webpack-merge from 5.8.0 to 5.9.0 (#6701)
Bumps [webpack-merge](https://github.com/survivejs/webpack-merge) from 5.8.0 to 5.9.0.
- [Changelog](https://github.com/survivejs/webpack-merge/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/survivejs/webpack-merge/commits)

---
updated-dependencies:
- dependency-name: webpack-merge
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 09:48:10 -07:00
a9158a90d5 Support filtering by severity for events tables (#6672)
* hide tab if not editing and fix issue where configuration is null

* show filters tab if editing

* works with dropdown

* add a none filter to remove 'filters applied' styling'

* pass appropriate comparator

* openmct side is ready

* clear filter still not working

* fix clearing of procedures

* add filters

* add some basic documentation

* add some basic documentation

* add some basic documentation

* fix grammar issues and convert away from amd pattern

* convert to permanent links

* refactor: format with prettier

* add aria labels for selects
2023-06-01 14:26:14 -07:00
07373817b0 chore(deps-dev): bump webpack from 5.84.0 to 5.85.0 (#6704)
Bumps [webpack](https://github.com/webpack/webpack) from 5.84.0 to 5.85.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.84.0...v5.85.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 12:59:47 -07:00
9247951456 chore: bump version to 2.2.5-SNAPSHOT (#6705)
chore: bump snapshot version to 2.2.5-SNAPSHOT
2023-05-31 16:50:41 -07:00
47c5863edf chore(deps-dev): bump @percy/cli from 1.24.0 to 1.24.2 (#6699)
Bumps [@percy/cli](https://github.com/percy/cli/tree/HEAD/packages/cli) from 1.24.0 to 1.24.2.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.24.2/packages/cli)

---
updated-dependencies:
- dependency-name: "@percy/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 23:32:56 +00:00
295bfe9294 chore(deps-dev): bump eslint-plugin-vue from 9.13.0 to 9.14.1 (#6696)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.13.0 to 9.14.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.13.0...v9.14.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 23:16:31 +00:00
1c6214fe79 chore(deps-dev): bump eslint from 8.40.0 to 8.41.0 (#6700)
Bumps [eslint](https://github.com/eslint/eslint) from 8.40.0 to 8.41.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.40.0...v8.41.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 15:54:37 -07:00
4cab97cb4b chore(deps-dev): bump sinon from 15.0.1 to 15.1.0 (#6683)
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.0.1 to 15.1.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.0.1...v15.1.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-24 17:57:44 +00:00
0bafdad605 chore(deps-dev): bump webpack from 5.81.0 to 5.84.0 (#6692)
Bumps [webpack](https://github.com/webpack/webpack) from 5.81.0 to 5.84.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.81.0...v5.84.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-24 17:45:50 +00:00
4d375ec765 chore(deps-dev): bump webpack-cli from 5.0.2 to 5.1.1 (#6653)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 5.0.2 to 5.1.1.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.0.2...webpack-cli@5.1.1)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-24 10:35:28 -07:00
47b44cebba chore(deps-dev): bump jasmine-core from 4.5.0 to 5.0.0 (#6666)
Bumps [jasmine-core](https://github.com/jasmine/jasmine) from 4.5.0 to 5.0.0.
- [Release notes](https://github.com/jasmine/jasmine/releases)
- [Changelog](https://github.com/jasmine/jasmine/blob/main/RELEASE.md)
- [Commits](https://github.com/jasmine/jasmine/compare/v4.5.0...v5.0.0)

---
updated-dependencies:
- dependency-name: jasmine-core
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-24 16:22:50 +00:00
fea68381a7 fix: unlisten to annotation event beforeDestroy (#6690)
* fix: unlisten to annotation event beforeDestroy

* refactor: `npm run lint:fix`

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
2023-05-24 09:29:19 +00:00
356c90ca45 chore(deps-dev): bump @babel/eslint-parser from 7.19.1 to 7.21.8 (#6648)
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.19.1 to 7.21.8.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.21.8/eslint/babel-eslint-parser)

---
updated-dependencies:
- dependency-name: "@babel/eslint-parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 18:21:33 +00:00
7e12a45960 chore(deps-dev): bump vue-eslint-parser from 9.2.1 to 9.3.0 (#6671)
Bumps [vue-eslint-parser](https://github.com/vuejs/vue-eslint-parser) from 9.2.1 to 9.3.0.
- [Release notes](https://github.com/vuejs/vue-eslint-parser/releases)
- [Commits](https://github.com/vuejs/vue-eslint-parser/compare/v9.2.1...v9.3.0)

---
updated-dependencies:
- dependency-name: vue-eslint-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-19 14:34:42 -07:00
804dbf0cab chore: add prettier (3/3): update .git-blame-ignore-revs file (#6684)
Update `.git-blame-ignore-revs` file
2023-05-18 22:08:13 +00:00
caa7bc6fae chore: add prettier (2/3): apply formatting, re-enable lint ci step (#6682)
* style: apply prettier formatting

* fix: re-enable lint ci check
2023-05-18 21:54:46 +00:00
172e0b23fd chore: add prettier (1/3): add packages, configurations, fix lint issues (#6382)
* fix: remove redundant eslint rules

* chore: bump `prettier` to v2.8.7

* docs: vue files to use html comments for licenses

- Prettier's Vue parser freaks out if it sees a *.js style comment in a *.vue file.

* docs: more licenses for vue files

* fix: don't ignore *.vue files

* fix: use defaults for tabWidth and printWidth

* simplify .prettierignore

* enforce a printWidth of 100

* fix: use `eslint-plugin-prettier`, remove conflicting rules

* test: fix gauge tests (for real)

* test: fix notebook test selectors

* test: fix restrictedNotebook test selectors

* test: remove useless assignment

* lint: __dirname as global

* lint: revert eslint config + whitespace changes, commit new config

* style: remove unnecessary string concat of literals

* test: fix missed gauge test

* fix: use new eslint rules

* feat: add blank `.git-blame-ignore-revs` file

* docs: update to mention Prettier and format.

* Revert "test: fix gauge tests (for real)"

This reverts commit 6afad450389edc2f16ff0d00c9524621a7ba53bc.

* Revert "test: fix notebook test selectors"

This reverts commit 17fe1cbbff02e9298f041b5ea0fea5494fe54d94.

* Revert "test: fix restrictedNotebook test selectors"

This reverts commit 97e0ede826b7dd61c5443845443d806a56f3f305.

* Revert "test: fix missed gauge test"

This reverts commit e2398fc38ca94beff2066cc253173412ad47f8b9.

* test: fix gauge tests (no formatting)

* test: update notebook e2e selectors (no formatting)

* test: update restrictedNotebook e2e selectors (no formatting)

* fix: temporarily disable lint check
2023-05-18 21:29:20 +00:00
5df7971438 [Plots] Fix wrapping of Y Axis when height is small (#6264)
* New branch to fix y-axis icons

* test: fix locator

---------

Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-05-17 18:32:05 +00:00
b39d5e8bcc chore(deps-dev): bump eslint-plugin-vue from 9.11.0 to 9.13.0 (#6674)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.11.0 to 9.13.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.11.0...v9.13.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 15:45:50 -07:00
c5188397e4 chore: bump version to 2.2.4-SNAPSHOT (#6673)
chore: bump version to 2.2.4-SNAPSHOT
2023-05-16 13:50:58 -07:00
225fa22c72 Fix Locator in Move and Link dialogs (#6663)
Closes #6654
- Corrected form builder configurations.
2023-05-16 09:50:42 -07:00
2c3b6fa540 [ExportAsJson] Multiple Aliases in Export and Conditional Styles Fixes (#6602)
Fixes issues that prevent import and export from being completed successfully. Specifically:

* if multiple aliases are detected, the first is created as a new object and and added to it's parent's composition, any subsequent aliases of the same object will not be recreated, but the originally created one will be added to the current parent's composition, creating an alias.

* Also, there are cases were conditionSetIdentifiers are stored in an object keyed by an item id in the configuration.objectstyles object, this fix will handle these as well.

* Replaces an errant `return` statement with a `continue` statement to prevent early exit from a recursive function.

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2023-05-11 17:11:09 +00:00
496ab4d5a3 chore(deps-dev): bump vue-eslint-parser from 9.1.0 to 9.2.1 (#6651)
Bumps [vue-eslint-parser](https://github.com/vuejs/vue-eslint-parser) from 9.1.0 to 9.2.1.
- [Release notes](https://github.com/vuejs/vue-eslint-parser/releases)
- [Commits](https://github.com/vuejs/vue-eslint-parser/compare/v9.1.0...v9.2.1)

---
updated-dependencies:
- dependency-name: vue-eslint-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 16:48:39 +00:00
aad9e51262 chore(deps-dev): bump eslint from 8.39.0 to 8.40.0 (#6650)
Bumps [eslint](https://github.com/eslint/eslint) from 8.39.0 to 8.40.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.39.0...v8.40.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 15:06:29 -07:00
ba4353aacb fix: Gantt Chart displays draft status of Plan in composition (#6642)
* fix: setStatus when add/replace a plan in composition

* test: add regression test

* chore: lint:fix

* test: add visual tests for plan and gantt chart drafts
2023-05-05 23:48:34 +00:00
9f079255f1 Free findSubscriptionProvider! (#6547)
free `findSubscriptionProvider`
2023-05-05 16:41:07 -07:00
f5eacc504b [Couchdb] Update couchdb init script and bump version to latest (#6643)
* chatty

* bad linebreak

* bump to 3.3.2

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-05-05 19:24:54 +00:00
26fa1653e3 Synchronize versions of common devDependencies with openmct-yamcs (#6627)
* Update @babel/eslint-parser, eslint, webpack, webpack-cli versions

* Increase eventemitter3 version from 1.2.0 to 4.0.7

* Downgrade eventemitter3 to 1.2.0

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-05-05 17:27:01 +00:00
b7c68f715b [LAD Table][Browse Bar] Visual test and title attributes for actions (#6640) 2023-05-03 18:11:01 -07:00
549a579bf3 fix: remove pr:e2e:couchdb label on run completion (#6628)
* fix: trigger e2e-couchdb run on sync

* fix: remove `e2e-couchdb` label if present after run

* fix: remove `synchronize` trigger

- this is intended behavior

* refactor: update GHA to use octokit action

* docs: add note about GHA warnings

* fix: remove `pr:e2e` label after run

* fix: use github-script
2023-05-03 10:24:41 -07:00
fe677fa359 [LAD Tables] Persist view modified configuration (#6637)
* chore: bump version to `2.2.2` (#6615)

* persisting lad configuration in the view when it changes

---------

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-05-02 16:19:23 -07:00
1bbc3789ec chore(deps-dev): bump sass from 1.62.0 to 1.62.1 (#6630) 2023-05-02 12:20:00 -07:00
636849885b chore(deps-dev): bump webpack from 5.80.0 to 5.81.0 (#6634)
Bumps [webpack](https://github.com/webpack/webpack) from 5.80.0 to 5.81.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.80.0...v5.81.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-02 09:02:46 -07:00
6f2b20eee9 Retain styling on condition widgets when adding or removing a url (#6625)
* fix spelling error
* apply changes after dynamic component updates
* remove * listener
* react to url change
* es6 mode
* fix html structure
* Closes #6614
- CSS fixes for revised widget approach.
* include url prop for vue component reactivity
* disable a tag overriding font color
* provide a reactive object for component reactivity

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
2023-04-28 20:17:14 +00:00
e38821cc1f chore(deps-dev): bump @percy/cli from 1.23.0 to 1.24.0 (#6618)
Bumps [@percy/cli](https://github.com/percy/cli/tree/HEAD/packages/cli) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.24.0/packages/cli)

---
updated-dependencies:
- dependency-name: "@percy/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 16:26:37 -07:00
4345d216f7 chore(deps-dev): bump karma-chrome-launcher from 3.1.1 to 3.2.0 (#6619)
Bumps [karma-chrome-launcher](https://github.com/karma-runner/karma-chrome-launcher) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/karma-runner/karma-chrome-launcher/releases)
- [Changelog](https://github.com/karma-runner/karma-chrome-launcher/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma-chrome-launcher/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: karma-chrome-launcher
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 22:43:41 +00:00
84a12c7833 chore(deps-dev): bump karma from 6.3.20 to 6.4.2 (#6616)
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.20 to 6.4.2.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.20...v6.4.2)

---
updated-dependencies:
- dependency-name: karma
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 22:30:58 +00:00
ad8445114f chore(deps-dev): bump webpack-cli from 5.0.0 to 5.0.2 (#6622)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 5.0.0 to 5.0.2.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.0.0...webpack-cli@5.0.2)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 15:10:04 -07:00
bcd50dfa35 chore(deps-dev): bump webpack from 5.79.0 to 5.80.0 (#6620)
Bumps [webpack](https://github.com/webpack/webpack) from 5.79.0 to 5.80.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.79.0...v5.80.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 14:40:29 -07:00
a798ddf05e chore(deps-dev): bump eslint from 8.37.0 to 8.39.0 (#6617)
Bumps [eslint](https://github.com/eslint/eslint) from 8.37.0 to 8.39.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.37.0...v8.39.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 09:29:54 -07:00
7af7e68779 refactor: add appActions and stabilize overlayPlot and plotRendering e2e test suites (#6612)
* test: add appActions, stabilize overlayPlot test

- Adds `waitForPlotsToRender`, a function that waits for all active `.plot` elements on the page to load and draw their series data
- Adds `getCanvasPixels`, a function that takes a canvas selector and retrieves an array of canvas pixel data.
- Modifies `getCanvasPixels` to use `page.evaluateHandle()` so that the canvas handle lifetime exists throughout the test (this was causing flakiness before)

* test: refactor and stabilize `plotRendering` tests

* test: remove redundant test suite

* test: stabilize plot legend color swatch test

* docs: mention `waitForPlotsToLoad()` in e2e docs

* refactor: have getCanvasPixels return actual rgba values

* docs: fix typo

* test: use appAction and fix reload wait condition

* docs: add additional context for `waitForPlotsToRender()`

* refactor: one-liner

* docs: tidy up docs
2023-04-20 14:36:58 -07:00
c200999659 test(e2e): fix overlay plot element preview test flake (#6609)
test: wait for plot to be drawn before assertions
2023-04-19 13:40:44 -07:00
ddeeff4822 Fix test flake and playwright version in couchdb circleci test (#6608)
* test: wait for `domcontentloaded` on reload

* chore: playwright `1.32.3` in circleci couchdb test

* test: simplify(why was this creating a clock??)
2023-04-19 19:11:09 +00:00
5610846147 chore(deps-dev): bump @deploysentinel/playwright from 0.3.3 to 0.3.4 (#6606)
Bumps @deploysentinel/playwright from 0.3.3 to 0.3.4.

---
updated-dependencies:
- dependency-name: "@deploysentinel/playwright"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 17:17:57 +00:00
88fde47932 Add @types/lodash to dependabot semver ignore list (#6604)
Add lodash types to ignore list
2023-04-19 09:23:16 -07:00
2a0faba35f chore(deps-dev): bump eslint-plugin-vue from 9.10.0 to 9.11.0 (#6597)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.10.0 to 9.11.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.10.0...v9.11.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 16:41:58 -07:00
a47abf5f96 chore(deps-dev): bump webpack-dev-server from 4.11.1 to 4.13.3 (#6596)
* chore(deps-dev): bump webpack-dev-server from 4.11.1 to 4.13.3

Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.11.1 to 4.13.3.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.11.1...v4.13.3)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: disable webpack overlay for runtime errors

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-04-18 16:33:43 -07:00
968eee6698 chore: bump Playwright to v1.32.3 (#6511)
* chore: bump Playwright to v1.32.1

* test: fix locators, remove unnecessary awaits

* chore: bump Playwright in ci workflows

* test: better selectors for yAxis configs

- fix tests

* chore: bump Playwright to 1.32.3

* refactor: ensure openmct starts after plugins install

* fix: wait for domcontentloaded on initial nav

* test: fix autoscale snapshot test

* test: fix `--max-failures` argname typo

* test: update old locators

* test(fix): add missing await

* test: fix typo 😅
2023-04-18 22:32:29 +00:00
43d56a68bb Bump for 2.2.3 (#6600)
Update package.json

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2023-04-18 21:13:05 +00:00
f055a8a0c7 fix(e2e): remove unnecessary wait for networkidle and fix selectors (#6370) 2023-04-18 20:25:43 +00:00
2820237d60 Fixes the way we start and stop couchdb on bare metal CI agents (#6589) 2023-04-17 14:26:13 -07:00
dbdc9bb4e2 fix(#6549): [StaticRootPlugin] Remap non-empty root namespaces and non-root namespaces correctly (#6583)
* fix: preserve truthy namespaces and unmapped values

- Fixes the issue of the Static Root provider overriding existing namespaces, such as those from a telemetry dictionary
- Fixes the issue of keys of child objects NOT present in the idMapping (such as those from a telemetry dictionary) being overwritten as undefined
- TODO: This will not work for objects exported from an environment that has the "MyItems" namespace defined to anything other than an empty string. Need to figure out how to handle this.

* fix: handle the case of rootId having a namespace !== ""

* refactor: use `parseKeyString`

* fix: StaticRootPlugin object mapping for non-empty namespaces

* fix: use index, fix location identifiers

* tets: add non-empty namespace tests (wip)

* refactor: rename and move test files

* test: update StaticModelProvider tests

* fix: remap to identifiers for config, not keystring

---------

Co-authored-by: Khalid Adil <khalidadil29@gmail.com>
2023-04-14 18:31:04 -05:00
a9a98380f2 test(visual): add theme to notification banner test name (#6450)
* test(visual): add theme to notification banner test name

* test: rename file

* test: switch to small example plan

* test: snapshot object-view only

* test: fix selectors

* refactor: chain locators together
2023-04-13 10:02:56 -07:00
e3ab085dd5 chore(deps-dev): bump webpack from 5.78.0 to 5.79.0 (#6588)
Bumps [webpack](https://github.com/webpack/webpack) from 5.78.0 to 5.79.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.78.0...v5.79.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-12 15:38:59 -07:00
519135527b chore(deps-dev): bump sass from 1.61.0 to 1.62.0 (#6587)
Bumps [sass](https://github.com/sass/dart-sass) from 1.61.0 to 1.62.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.61.0...1.62.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-12 13:44:16 -07:00
fc37f6e05b Move Dependabot to weekly to reduce frequency of changes and reduce CI Bill (#6585)
Update dependabot.yml
2023-04-12 11:11:41 -07:00
ab1df89396 chore(deps-dev): bump webpack from 5.77.0 to 5.78.0 (#6559)
Bumps [webpack](https://github.com/webpack/webpack) from 5.77.0 to 5.78.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.77.0...v5.78.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 12:25:59 -07:00
9ee5ab96f3 chore(deps-dev): bump sass from 1.59.3 to 1.61.0 (#6569)
Bumps [sass](https://github.com/sass/dart-sass) from 1.59.3 to 1.61.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.59.3...1.61.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 12:09:45 -07:00
8b2c6e3fb3 chore(deps-dev): bump @percy/cli from 1.22.0 to 1.23.0 (#6578)
Bumps [@percy/cli](https://github.com/percy/cli/tree/HEAD/packages/cli) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.23.0/packages/cli)

---
updated-dependencies:
- dependency-name: "@percy/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 08:15:48 -07:00
b8b0a08eeb Add Code Coverage Doc and some other drive-bys (#5724) 2023-04-10 12:25:17 -07:00
633b6be2fd chore(deps-dev): bump typescript from 4.9.5 to 5.0.4 (#6574)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.5 to 5.0.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.5...v5.0.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 11:21:16 -07:00
4963aff8a0 Only decrement and save if there is composition but no child object reference (#6568)
Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
2023-04-07 06:17:52 +00:00
6786be54fa Add safari as well as iOS safari browserlist check (#6567)
* Add safari as well as iOS safari browserlist check

* Update package.json

* math
2023-04-06 16:51:28 -07:00
b081389e68 chore(deps-dev): bump @percy/cli from 1.21.0 to 1.22.0 (#6565)
Bumps [@percy/cli](https://github.com/percy/cli/tree/HEAD/packages/cli) from 1.21.0 to 1.22.0.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.22.0/packages/cli)

---
updated-dependencies:
- dependency-name: "@percy/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-06 14:34:59 -07:00
7a3ec3a241 Fix ExportAsJSONAction to not lose layout configurations on linked objects (#6562) 2023-04-05 23:03:23 -07:00
c0c383bf18 First attempt at DeploySentinel and fix couchdb notebook tests (#6398)
* First attempt

* Remove commented pattern

* Add deploysentinel to github action

* drive by

* Stablization

* remove only

* entries now selected on creation

* select previous entry on deletion

* add deletion test

* wip

* fix adding focus selection

* remove previous entry selection logic

* null check for event

* address review comments

* address review comments

* refactor tests a bit

* typo

* Add some determinism to avoid console errors

* refactor and use methods

* stabilize

* remove debug

* remove only

* combine clean commands

* comments

* change to expects

* test: await toBeHidden() assertion

* test: use `myItemsFolderName` instead of 'My Items'

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-04-05 06:25:28 -07:00
fe1c99de12 First attempt at DeploySentinel and fix couchdb notebook tests (#6398)
* First attempt

* Remove commented pattern

* Add deploysentinel to github action

* drive by

* Stablization

* remove only

* entries now selected on creation

* select previous entry on deletion

* add deletion test

* wip

* fix adding focus selection

* remove previous entry selection logic

* null check for event

* address review comments

* address review comments

* refactor tests a bit

* typo

* Add some determinism to avoid console errors

* refactor and use methods

* stabilize

* remove debug

* remove only

* combine clean commands

* comments

* change to expects

* test: await toBeHidden() assertion

* test: use `myItemsFolderName` instead of 'My Items'

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
2023-04-05 06:24:57 -07:00
2e60da0401 Ensure annotations on empty entries in notebook are not lost (#6525)
* entries now selected on creation

* select previous entry on deletion

* add deletion test

* wip

* fix adding focus selection

* remove previous entry selection logic

* null check for event

* address review comments

* address review comments

* refactor tests a bit

* typo

* remove clicking on entries
2023-04-04 14:37:38 -07:00
bc3a5408b4 fix(#6503): Recently Viewed Items - Disable button if no items (#6533)
* add e2e test

* fix: remove slow function

* test: After deactivating the button, new objects must be inserted and the button becomes active again

* test: ensure clear recent objects button is active or inactive

* add an event to notify when an object is inserted in the recents list

* add an event to notify when an object is inserted in the recents list

* fix: adjusting function name and add validation for triggering the event

* fix: add event to disable button only when user click ok to clear list of recents

* test: fix failing e2e + better assertions

---------

Co-authored-by: Jesse Mazzella <jessemazzella@gmail.com>
2023-04-03 23:56:03 +00:00
344bf8eed3 [CI] Stop taking patch releases for moment-timezone (#6553)
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-04-03 17:20:09 +00:00
cbb3368937 chore: bump version to 2.2.2-SNAPSHOT (#6552)
Update package.json
2023-04-03 09:06:24 -07:00
b7a671d392 Allow Restricted Notebooks to export text (#6542)
* Refactor string to stream

* add to restricted notebooks and allow for blank users

* forgot to add notebook

* use better types and fix test

* move streamToString

* add export group

* catch blank pages
2023-04-01 07:08:22 +02:00
4f10a93ef5 Use node-version: 'lts/gallium' (#6540)
* Update e2e-couchdb.yml

* this really doesn't like it

---------

Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-03-31 11:55:20 -07:00
f8186e4b4e chore(deps-dev): bump karma-sourcemap-loader from 0.3.8 to 0.4.0 (#6290)
Bumps [karma-sourcemap-loader](https://github.com/demerzel3/karma-sourcemap-loader) from 0.3.8 to 0.4.0.
- [Release notes](https://github.com/demerzel3/karma-sourcemap-loader/releases)
- [Changelog](https://github.com/demerzel3/karma-sourcemap-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/demerzel3/karma-sourcemap-loader/commits/0.4.0)

---
updated-dependencies:
- dependency-name: karma-sourcemap-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-31 02:53:09 -07:00
4e0c364d89 chore(deps-dev): bump sass-loader from 13.2.1 to 13.2.2 (#6513)
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 13.2.1 to 13.2.2.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v13.2.1...v13.2.2)

---
updated-dependencies:
- dependency-name: sass-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-31 04:04:35 +00:00
f3bed9c651 chore(deps-dev): bump webpack from 5.76.3 to 5.77.0 (#6520)
Bumps [webpack](https://github.com/webpack/webpack) from 5.76.3 to 5.77.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.76.3...v5.77.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 20:54:11 -07:00
4d93907d58 chore(deps-dev): bump eslint-plugin-compat from 4.1.1 to 4.1.2 (#6352)
Bumps [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/amilajack/eslint-plugin-compat/releases)
- [Changelog](https://github.com/amilajack/eslint-plugin-compat/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amilajack/eslint-plugin-compat/compare/v4.1.1...v4.1.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-compat
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-03-30 15:37:59 -07:00
6f656a6783 [Build]Remove Node14LTS from supported versions and update our pipelines (#6527)
* bump minimumum and pin drivebys

* move to 16 and remove 14

* remove 14

* update to latest
2023-03-30 20:53:44 +00:00
767fb6c5fd fix: remove redundant request on FaultManagement mount (#6502)
* fix: remove redundant update request

* fix: handle case where request returns no faults

* test: fix fault management tests

* docs: clean up FaultManagement API types

---------

Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
2023-03-30 18:43:55 +00:00
b0a0b4bb58 chore(deps-dev): bump eslint from 8.36.0 to 8.37.0 (#6521)
Bumps [eslint](https://github.com/eslint/eslint) from 8.36.0 to 8.37.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.36.0...v8.37.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-03-30 11:15:36 -07:00
340f4a9e79 chore(deps-dev): bump @percy/cli from 1.17.0 to 1.21.0 (#6439)
Bumps [@percy/cli](https://github.com/percy/cli/tree/HEAD/packages/cli) from 1.17.0 to 1.21.0.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.21.0/packages/cli)

---
updated-dependencies:
- dependency-name: "@percy/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
2023-03-30 11:05:32 -07:00
3007b28b0f Simple text export of Notebook (#6510)
* add simple prototype

* tags and metadata now exported

* add form for options

* revert notebook

* add simple e2e test

* add test stubs

* death to debug
2023-03-30 19:44:12 +02:00
20789601b4 Add contextual domain object back for contextual row actions (#6524)
* re-enable historical row action
2023-03-30 10:08:09 -07:00
a56cfed732 Remove ticker and rely solely on the clock ticks to update the timelist durations (#6495)
* Remove ticker for timelist and rename a function for readability

* Use formatting for remote clock if available.

* throttle updates to the timestamp and listing activities

---------

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2023-03-29 15:16:52 -07:00
1269 changed files with 169279 additions and 121731 deletions

View File

@ -1,76 +1,81 @@
version: 2.1
orbs:
node: circleci/node@5.2.0
browser-tools: circleci/browser-tools@1.3.0
executors:
pw-focal-development:
docker:
- image: mcr.microsoft.com/playwright:v1.29.0-focal
- image: mcr.microsoft.com/playwright:v1.48.1-focal
environment:
NODE_ENV: development # Needed to ensure 'dist' folder created and devDependencies installed
PERCY_POSTINSTALL_BROWSER: 'true' # Needed to store the percy browser in cache deps
PERCY_LOGLEVEL: 'debug' # Enable DEBUG level logging for Percy (Issue: https://github.com/nasa/openmct/issues/5742)
parameters:
BUST_CACHE:
description: "Set this with the CircleCI UI Trigger Workflow button (boolean = true) to bust the cache!"
default: false
type: boolean
PERCY_PARALLEL_TOTAL: 2
ubuntu:
machine:
image: ubuntu-2204:current
docker_layer_caching: true
commands:
build_and_install:
description: "All steps used to build and install. Will use cache if found"
description: 'All steps used to build and install.'
parameters:
node-version:
type: string
steps:
- checkout
- restore_cache_cmd:
node-version: << parameters.node-version >>
- node/install:
install-npm: true
node-version: << parameters.node-version >>
- run: npm install --prefer-offline --no-audit --progress=false
restore_cache_cmd:
description: "Custom command for restoring cache with the ability to bust cache. When BUST_CACHE is set to true, jobs will not restore cache"
parameters:
node-version:
type: string
steps:
- when:
condition:
equal: [false, << pipeline.parameters.BUST_CACHE >> ]
steps:
- restore_cache:
key: deps-{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
save_cache_cmd:
description: "Custom command for saving cache."
parameters:
node-version:
type: string
steps:
- save_cache:
key: deps-{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
paths:
- ~/.npm
- node_modules
- node/install-packages
generate_and_store_version_and_filesystem_artifacts:
description: "Track important packages and files"
description: 'Track important packages and files'
steps:
- run: |
mkdir /tmp/artifacts
printenv NODE_ENV >> /tmp/artifacts/NODE_ENV.txt
[[ $EUID -ne 0 ]] && (sudo mkdir -p /tmp/artifacts && sudo chmod 777 /tmp/artifacts) || (mkdir -p /tmp/artifacts && chmod 777 /tmp/artifacts)
printenv NODE_ENV >> /tmp/artifacts/NODE_ENV.txt || true
npm -v >> /tmp/artifacts/npm-version.txt
node -v >> /tmp/artifacts/node-version.txt
ls -latR >> /tmp/artifacts/dir.txt
- store_artifacts:
path: /tmp/artifacts/
download_verify_codecov_cli:
description: 'Download and verify Codecov CLI'
steps:
- run:
name: Download and verify Codecov CLI
command: |
# Download Codecov CLI
curl -Os https://cli.codecov.io/latest/linux/codecov
# Import Codecov's GPG key
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
# Download and verify the SHA256SUM and its signature
curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
# Verify the checksum
shasum -a 256 -c codecov.SHA256SUM
# Make the codecov executable
[[ $EUID -ne 0 ]] && sudo chmod +x codecov || chmod +x codecov
./codecov --help
generate_e2e_code_cov_report:
description: "Generate e2e code coverage artifacts and publish to codecov.io. Needed to that we can ignore the exit code status of the npm run test"
description: 'Generate e2e code coverage artifacts and publish to codecov.io. Needed to that we can ignore the exit code status of the npm run test'
parameters:
suite:
type: string
steps:
- run: npm run cov:e2e:report || true
- run: npm run cov:e2e:<<parameters.suite>>:publish
orbs:
node: circleci/node@4.9.0
browser-tools: circleci/browser-tools@1.3.0
- download_verify_codecov_cli
- run:
name: Upload coverage report to Codecov
command: |
./codecov --verbose upload-process --disable-search \
-t $CODECOV_TOKEN \
-n 'e2e-<<parameters.suite>>'-${CIRCLE_WORKFLOW_ID} \
-F e2e-<<parameters.suite>> \
-f ./coverage/e2e/lcov.info
jobs:
npm-audit:
parameters:
@ -102,32 +107,52 @@ jobs:
node-version: <<parameters.node-version>>
- browser-tools/install-chrome:
replace-existing: false
- run: npm run test
- run: npm run cov:unit:publish
- save_cache_cmd:
node-version: <<parameters.node-version>>
- run:
command: |
mkdir -p dist/reports/tests/
TESTFILES=$(circleci tests glob "src/**/*Spec.js")
echo "$TESTFILES" | circleci tests run --command="xargs npm run test" --verbose
- download_verify_codecov_cli
- run:
name: Upload coverage report to Codecov
command: |
./codecov --verbose upload-process --disable-search \
-t $CODECOV_TOKEN \
-n 'unit-test'-${CIRCLE_WORKFLOW_ID} \
-F unit \
-f ./coverage/unit/lcov.info
- store_test_results:
path: dist/reports/tests/
- store_artifacts:
path: coverage
- when:
condition:
equal: [42, 42] # Always generate version artifacts regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_and_store_version_and_filesystem_artifacts
e2e-test:
parameters:
node-version:
type: string
suite: #stable or full
suite: #ci or full
type: string
executor: pw-focal-development
parallelism: 4
parallelism: 8
steps:
- build_and_install:
node-version: <<parameters.node-version>>
node-version: lts/hydrogen
- when: #Only install chrome-beta when running the 'full' suite to save $$$
condition:
equal: [ "full", <<parameters.suite>> ]
equal: ['full', <<parameters.suite>>]
steps:
- run: npx playwright install chrome-beta
- run: SHARD="$((${CIRCLE_NODE_INDEX}+1))"; npm run test:e2e:<<parameters.suite>> -- --shard=${SHARD}/${CIRCLE_NODE_TOTAL}
- run:
command: |
mkdir test-results
TESTFILES=$(circleci tests glob "e2e/**/*.spec.js")
echo "$TESTFILES" | circleci tests run --command="xargs npm run test:e2e:<<parameters.suite>>" --verbose --split-by=timings
- when:
condition:
equal: [42, 42] # Always run codecov reports regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_e2e_code_cov_report:
suite: <<parameters.suite>>
- store_test_results:
@ -138,81 +163,167 @@ jobs:
path: coverage
- store_artifacts:
path: html-test-results
- when:
condition:
equal: [42, 42] # Always generate version artifacts regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_and_store_version_and_filesystem_artifacts
e2e-mobile:
executor: pw-focal-development
steps:
- build_and_install:
node-version: lts/hydrogen
- run: npm run test:e2e:mobile
- when:
condition:
equal: [42, 42] # Always run codecov reports regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_e2e_code_cov_report:
suite: full
- store_test_results:
path: test-results/results.xml
- store_artifacts:
path: test-results
- store_artifacts:
path: coverage
- store_artifacts:
path: html-test-results
- when:
condition:
equal: [42, 42] # Always generate version artifacts regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_and_store_version_and_filesystem_artifacts
e2e-couchdb:
executor: ubuntu
steps:
- build_and_install:
node-version: lts/hydrogen
- run: npx playwright@1.48.1 install #Necessary for bare ubuntu machine
- run: |
export $(cat src/plugins/persistence/couch/.env.ci | xargs)
docker compose -f src/plugins/persistence/couch/couchdb-compose.yaml up --detach
sleep 3
bash src/plugins/persistence/couch/setup-couchdb.sh
- run: sh src/plugins/persistence/couch/replace-localstorage-with-couchdb-indexhtml.sh #Replace LocalStorage Plugin with CouchDB
- run: npm run test:e2e:couchdb
- when:
condition:
equal: [42, 42] # Always run codecov reports regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_e2e_code_cov_report:
suite: full #add to full suite
- store_test_results:
path: test-results/results.xml
- store_artifacts:
path: test-results
- store_artifacts:
path: coverage
- store_artifacts:
path: html-test-results
- when:
condition:
equal: [42, 42] # Always generate version artifacts regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_and_store_version_and_filesystem_artifacts
mem-test:
executor: pw-focal-development
steps:
- build_and_install:
node-version: lts/hydrogen
- run: npm run test:perf:memory
- store_test_results:
path: test-results/results.xml
- store_artifacts:
path: test-results
- store_artifacts:
path: html-test-results
- when:
condition:
equal: [42, 42] # Always run codecov reports regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_and_store_version_and_filesystem_artifacts
perf-test:
parameters:
node-version:
type: string
executor: pw-focal-development
steps:
- build_and_install:
node-version: <<parameters.node-version>>
- run: npm run test:perf
node-version: lts/hydrogen
- run: npm run test:perf:localhost
- run: npm run test:perf:contract
- store_test_results:
path: test-results/results.xml
- store_artifacts:
path: test-results
- store_artifacts:
path: html-test-results
- when:
condition:
equal: [42, 42] # Always run codecov reports regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_and_store_version_and_filesystem_artifacts
visual-test:
visual-a11y:
parameters:
node-version:
type: string
suite:
type: string # ci or full
executor: pw-focal-development
parallelism: 2
steps:
- build_and_install:
node-version: <<parameters.node-version>>
- run: npm run test:e2e:visual
node-version: lts/iron
- run: SHARD="$((${CIRCLE_NODE_INDEX}+1))"; npm run test:e2e:visual:<<parameters.suite>> -- --shard=${SHARD}/${CIRCLE_NODE_TOTAL}
- store_test_results:
path: test-results/results.xml
- store_artifacts:
path: test-results
- store_artifacts:
path: html-test-results
- when:
condition:
equal: [42, 42] # Always generate version artifacts regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2
steps:
- generate_and_store_version_and_filesystem_artifacts
workflows:
overall-circleci-commit-status: #These jobs run on every commit
jobs:
- lint:
name: node14-lint
node-version: lts/fermium
name: node22-lint
node-version: '22'
- unit-test:
name: node18-chrome
node-version: "18"
node-version: lts/hydrogen
- e2e-test:
name: e2e-stable
node-version: lts/gallium
suite: stable
- perf-test:
node-version: lts/gallium
- visual-test:
node-version: lts/gallium
name: e2e-ci
suite: ci
- e2e-mobile
- visual-a11y:
name: visual-a11y-ci
suite: ci
- perf-test
- mem-test
the-nightly: #These jobs do not run on PRs, but against master at night
jobs:
- unit-test:
name: node14-chrome-nightly
node-version: lts/fermium
- unit-test:
name: node16-chrome-nightly
node-version: lts/gallium
name: node22-chrome-nightly
node-version: '22'
- unit-test:
name: node18-chrome
node-version: "18"
node-version: lts/hydrogen
- npm-audit:
node-version: lts/gallium
node-version: lts/hydrogen
- e2e-test:
name: e2e-full-nightly
node-version: lts/gallium
suite: full
- perf-test:
node-version: lts/gallium
- visual-test:
node-version: lts/gallium
- e2e-mobile
- perf-test
- mem-test
- visual-a11y:
name: visual-a11y-nightly
suite: full
- e2e-couchdb
triggers:
- schedule:
cron: "0 0 * * *"
cron: '0 0 * * *'
filters:
branches:
only:

500
.cspell.json Normal file
View File

@ -0,0 +1,500 @@
{
"version": "0.2",
"language": "en,en-us",
"words": [
"gress",
"doctoc",
"minmax",
"openmct",
"datasources",
"Sinewave",
"deregistration",
"unregisters",
"codecov",
"carryforward",
"Chacon",
"Straub",
"OWASP",
"Testathon",
"Testathons",
"testathon",
"npmjs",
"treeitem",
"timespan",
"Timespan",
"spinbutton",
"popout",
"textbox",
"tablist",
"Telem",
"codecoverage",
"browserless",
"networkidle",
"nums",
"mgmt",
"faultname",
"gantt",
"sharded",
"MMOC",
"codegen",
"viewports",
"updatesnapshots",
"browsercontexts",
"miminum",
"testcase",
"testsuite",
"domcontentloaded",
"Tracefile",
"lcov",
"linecov",
"Browserless",
"webserver",
"yamcs",
"quickstart",
"subobject",
"autosize",
"Horz",
"vehicula",
"Praesent",
"pharetra",
"Duis",
"eget",
"arcu",
"elementum",
"mauris",
"Donec",
"nunc",
"quis",
"Proin",
"elit",
"Nunc",
"Aenean",
"mollis",
"hendrerit",
"Vestibulum",
"placerat",
"velit",
"augue",
"Quisque",
"mattis",
"lectus",
"rutrum",
"Fusce",
"tincidunt",
"nibh",
"blandit",
"urna",
"Nullam",
"congue",
"enim",
"Morbi",
"bibendum",
"Vivamus",
"imperdiet",
"Pellentesque",
"cursus",
"Aliquam",
"orci",
"Suspendisse",
"amet",
"justo",
"Etiam",
"vestibulum",
"ullamcorper",
"Cras",
"aliquet",
"Mauris",
"Nulla",
"scelerisque",
"viverra",
"metus",
"condimentum",
"varius",
"nulla",
"sapien",
"Curabitur",
"tristique",
"Nonsectetur",
"convallis",
"accumsan",
"lacus",
"posuere",
"turpis",
"egestas",
"feugiat",
"tortor",
"faucibus",
"euismod",
"pathing",
"testcases",
"Noneditable",
"listitem",
"Gantt",
"timelist",
"timestrip",
"networkevents",
"fetchpriority",
"persistable",
"Persistable",
"persistability",
"Persistability",
"testdata",
"Testdata",
"metdata",
"timeconductor",
"contenteditable",
"autoscale",
"Autoscale",
"prepan",
"sinewave",
"cyanish",
"driv",
"searchbox",
"datetime",
"timeframe",
"recents",
"recentobjects",
"gsearch",
"Disp",
"Cloc",
"noselect",
"requestfailed",
"viewlarge",
"Imageurl",
"thumbstrip",
"checkmark",
"Unshelve",
"autosized",
"chacskaylo",
"numberfield",
"OPENMCT",
"Autoflow",
"Timelist",
"faultmanagement",
"GEOSPATIAL",
"geospatial",
"plotspatial",
"annnotation",
"keystrings",
"undelete",
"sometag",
"containee",
"composability",
"mutables",
"Mutables",
"composee",
"handleoutsideclick",
"Datetime",
"Perc",
"autodismiss",
"filetree",
"deeptailor",
"keystring",
"reindex",
"unlisten",
"symbolsfont",
"ellipsize",
"TIMESYSTEM",
"Metadatas",
"unsub",
"callbacktwo",
"unsubscribetwo",
"telem",
"unemitted",
"granually",
"timesystem",
"metadatas",
"iteratees",
"metadatum",
"printj",
"sprintf",
"unlisteners",
"amts",
"reregistered",
"hudsonfoo",
"onclone",
"autoflow",
"xdescribe",
"mockmct",
"Autoflowed",
"plotly",
"relayout",
"Plotly",
"Yaxis",
"showlegend",
"textposition",
"xaxis",
"automargin",
"fixedrange",
"yaxis",
"Axistype",
"showline",
"bglayer",
"autorange",
"hoverinfo",
"dotful",
"Dotful",
"cartesianlayer",
"scatterlayer",
"textfont",
"ampm",
"cdef",
"horz",
"STYLEABLE",
"styleable",
"afff",
"shdw",
"braintree",
"vals",
"Subobject",
"Shdw",
"Movebar",
"inspectable",
"Stringformatter",
"sclk",
"Objectpath",
"Keystring",
"duplicatable",
"composees",
"Composees",
"Composee",
"callthrough",
"objectpath",
"createable",
"noneditable",
"Classname",
"classname",
"selectedfaults",
"accum",
"newpersisted",
"Metadatum",
"MCWS",
"YAMCS",
"frameid",
"containerid",
"mmgis",
"PERC",
"curval",
"viewbox",
"mutablegauge",
"Flatbush",
"flatbush",
"Indicies",
"Marqueed",
"NSEW",
"nsew",
"vrover",
"gimbled",
"Pannable",
"unsynced",
"Unsynced",
"pannable",
"autoscroll",
"TIMESTRIP",
"TWENTYFOUR",
"FULLSIZE",
"intialize",
"Timestrip",
"spyon",
"Unlistener",
"multipane",
"DATESTRING",
"akhenry",
"Niklas",
"Hertzen",
"Kash",
"Nouroozi",
"Bostock",
"BOSTOCK",
"Arnout",
"Kazemier",
"Karolis",
"Narkevicius",
"Ashkenas",
"Madhavan",
"Iskren",
"Ivov",
"Chernev",
"Borshchov",
"painterro",
"sheetjs",
"Yuxi",
"ACITON",
"localstorage",
"Linkto",
"Painterro",
"Editability",
"filteredsnapshots",
"Fromimage",
"muliple",
"notebookstorage",
"Andpage",
"pixelize",
"Quickstart",
"indexhtml",
"youradminpassword",
"chttpd",
"sourcefiles",
"USERPASS",
"XPUT",
"adipiscing",
"eiusmod",
"tempor",
"incididunt",
"labore",
"dolore",
"aliqua",
"perspiciatis",
"iteree",
"submodels",
"symlog",
"Plottable",
"antisymlog",
"docstrings",
"webglcontextlost",
"gridlines",
"Xaxis",
"Crosshairs",
"telemetrylimit",
"xscale",
"yscale",
"untracks",
"swatched",
"NULLVALUE",
"unobserver",
"unsubscriber",
"drap",
"Averager",
"averager",
"movecolumnfromindex",
"callout",
"Konqueror",
"unmark",
"hitarea",
"Hitarea",
"Unmark",
"controlbar",
"reactified",
"perc",
"DHMS",
"timespans",
"timeframes",
"Timesystems",
"Hilite",
"datetimes",
"momentified",
"ucontents",
"TIMELIST",
"Timeframe",
"Guirk",
"resizeable",
"iframing",
"Btns",
"Ctrls",
"Chakra",
"Petch",
"propor",
"phoneandtablet",
"desktopandtablet",
"Imgs",
"UNICODES",
"datatable",
"csvg",
"cpath",
"cellipse",
"xlink",
"cstyle",
"bfill",
"ctitle",
"eicon",
"interactability",
"AFFORDANCES",
"affordance",
"scrollcontainer",
"Icomoon",
"icomoon",
"configurability",
"btns",
"AUTOFLOW",
"DATETIME",
"infobubble",
"thumbsbubble",
"codehilite",
"vscroll",
"bgsize",
"togglebutton",
"Hacskaylo",
"noie",
"fullscreen",
"horiz",
"menubutton",
"SNAPSHOTTING",
"snapshotting",
"PAINTERRO",
"ptro",
"PLOTLY",
"gridlayer",
"xtick",
"ytick",
"subobjects",
"Ucontents",
"Userand",
"Userbefore",
"brdr",
"ALPH",
"Recents",
"Qbert",
"Infobubble",
"haslink",
"VPID",
"vpid",
"updatedtest",
"KHTML",
"Chromezilla",
"Safarifox",
"deregistering",
"hundredtized",
"dhms",
"unthrottled",
"Codecov",
"dont",
"mediump",
"sinonjs",
"generatedata",
"grandsearch",
"websockets",
"swgs",
"memlab",
"devmode",
"blockquote",
"blockquotes",
"Blockquote",
"Blockquotes",
"oger",
"lcovonly",
"gcov",
"WCAG",
"stackedplot",
"Andale",
"unnormalized",
"checksnapshots",
"specced",
"composables",
"countup",
"darkmatter",
"Undeletes",
"SSSZ",
"pageerror"
],
"dictionaries": ["npm", "softwareTerms", "node", "html", "css", "bash", "en_US", "en-gb", "misc"],
"ignorePaths": [
"package.json",
"dist/**",
"package-lock.json",
"node_modules",
"coverage",
"*.log",
"html-test-results",
"test-results"
]
}

192
.eslintrc.cjs Normal file
View File

@ -0,0 +1,192 @@
const LEGACY_FILES = ['example/**'];
/** @type {import('eslint').Linter.Config} */
const config = {
env: {
browser: true,
es2024: true,
jasmine: true,
amd: true,
node: true
},
globals: {
_: 'readonly',
__webpack_public_path__: 'writeable',
__OPENMCT_VERSION__: 'readonly',
__OPENMCT_BUILD_DATE__: 'readonly',
__OPENMCT_REVISION__: 'readonly',
__OPENMCT_BUILD_BRANCH__: 'readonly'
},
plugins: ['prettier', 'unicorn', 'simple-import-sort'],
extends: [
'eslint:recommended',
'plugin:compat/recommended',
'plugin:vue/vue3-recommended',
'plugin:you-dont-need-lodash-underscore/compatible',
'plugin:prettier/recommended',
'plugin:no-unsanitized/DOM'
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false,
allowImportExportEverywhere: true,
ecmaVersion: 'latest',
ecmaFeatures: {
impliedStrict: true
},
sourceType: 'module'
},
rules: {
'simple-import-sort/imports': 'warn',
'simple-import-sort/exports': 'warn',
'vue/no-deprecated-dollar-listeners-api': 'warn',
'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',
'you-dont-need-lodash-underscore/flatten': 'off',
'you-dont-need-lodash-underscore/get': 'off',
'no-bitwise': 'error',
curly: 'error',
eqeqeq: 'error',
'guard-for-in': 'error',
'no-extend-native': 'error',
'no-inner-declarations': 'off',
'no-use-before-define': ['error', 'nofunc'],
'no-caller': 'error',
'no-irregular-whitespace': 'error',
'no-new': 'error',
'no-shadow': 'error',
'no-undef': 'error',
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'none'
}
],
'no-console': 'off',
'new-cap': [
'error',
{
capIsNew: false,
properties: false
}
],
'dot-notation': 'error',
// https://eslint.org/docs/rules/no-case-declarations
'no-case-declarations': 'error',
// https://eslint.org/docs/rules/max-classes-per-file
'max-classes-per-file': ['error', 1],
// https://eslint.org/docs/rules/no-eq-null
'no-eq-null': 'error',
// https://eslint.org/docs/rules/no-eval
'no-eval': 'error',
// https://eslint.org/docs/rules/no-implicit-globals
'no-implicit-globals': 'error',
// https://eslint.org/docs/rules/no-implied-eval
'no-implied-eval': 'error',
// https://eslint.org/docs/rules/no-lone-blocks
'no-lone-blocks': 'error',
// https://eslint.org/docs/rules/no-loop-func
'no-loop-func': 'error',
// https://eslint.org/docs/rules/no-new-func
'no-new-func': 'error',
// https://eslint.org/docs/rules/no-new-wrappers
'no-new-wrappers': 'error',
// https://eslint.org/docs/rules/no-octal-escape
'no-octal-escape': 'error',
// https://eslint.org/docs/rules/no-proto
'no-proto': 'error',
// https://eslint.org/docs/rules/no-return-await
'no-return-await': 'error',
// https://eslint.org/docs/rules/no-script-url
'no-script-url': 'error',
// https://eslint.org/docs/rules/no-self-compare
'no-self-compare': 'error',
// https://eslint.org/docs/rules/no-sequences
'no-sequences': 'error',
// https://eslint.org/docs/rules/no-unmodified-loop-condition
'no-unmodified-loop-condition': 'error',
// https://eslint.org/docs/rules/no-useless-call
'no-useless-call': 'error',
// https://eslint.org/docs/rules/no-nested-ternary
'no-nested-ternary': 'error',
// https://eslint.org/docs/rules/no-useless-computed-key
'no-useless-computed-key': 'error',
// https://eslint.org/docs/rules/no-var
'no-var': 'error',
// https://eslint.org/docs/rules/one-var
'one-var': ['error', 'never'],
// https://eslint.org/docs/rules/default-case-last
'default-case-last': 'error',
// https://eslint.org/docs/rules/default-param-last
'default-param-last': 'error',
// https://eslint.org/docs/rules/grouped-accessor-pairs
'grouped-accessor-pairs': 'error',
// https://eslint.org/docs/rules/no-constructor-return
'no-constructor-return': 'error',
// https://eslint.org/docs/rules/array-callback-return
'array-callback-return': 'error',
// https://eslint.org/docs/rules/no-invalid-this
'no-invalid-this': 'error', // Believe this one actually surfaces some bugs
// https://eslint.org/docs/rules/func-style
'func-style': ['error', 'declaration'],
// https://eslint.org/docs/rules/no-unused-expressions
'no-unused-expressions': 'error',
// https://eslint.org/docs/rules/no-useless-concat
'no-useless-concat': 'error',
// https://eslint.org/docs/rules/radix
radix: 'error',
// https://eslint.org/docs/rules/require-await
'require-await': 'error',
// https://eslint.org/docs/rules/no-alert
'no-alert': 'error',
// https://eslint.org/docs/rules/no-useless-constructor
'no-useless-constructor': 'error',
// https://eslint.org/docs/rules/no-duplicate-imports
'no-duplicate-imports': 'error',
// https://eslint.org/docs/rules/no-implicit-coercion
'no-implicit-coercion': 'error',
//https://eslint.org/docs/rules/no-unneeded-ternary
'no-unneeded-ternary': 'error',
'unicorn/filename-case': [
'error',
{
cases: {
pascalCase: true
},
ignore: ['^.*\\.(js|cjs|mjs)$']
}
],
'vue/first-attribute-linebreak': 'error',
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/no-mutating-props': 'off' // TODO: Remove this rule and fix resulting errors
},
overrides: [
{
files: LEGACY_FILES,
rules: {
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
varsIgnorePattern: 'controller'
}
],
'no-nested-ternary': 'off',
'no-var': 'off',
'one-var': 'off'
}
}
]
};
module.exports = config;

View File

@ -1,271 +0,0 @@
const LEGACY_FILES = ["example/**"];
module.exports = {
"env": {
"browser": true,
"es6": true,
"jasmine": true,
"amd": true
},
"globals": {
"_": "readonly"
},
"extends": [
"eslint:recommended",
"plugin:compat/recommended",
"plugin:vue/recommended",
"plugin:you-dont-need-lodash-underscore/compatible"
],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@babel/eslint-parser",
"requireConfigFile": false,
"allowImportExportEverywhere": true,
"ecmaVersion": 2015,
"ecmaFeatures": {
"impliedStrict": true
}
},
"rules": {
"you-dont-need-lodash-underscore/omit": "off",
"you-dont-need-lodash-underscore/throttle": "off",
"you-dont-need-lodash-underscore/flatten": "off",
"you-dont-need-lodash-underscore/get": "off",
"no-bitwise": "error",
"curly": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"no-extend-native": "error",
"no-inner-declarations": "off",
"no-use-before-define": ["error", "nofunc"],
"no-caller": "error",
"no-irregular-whitespace": "error",
"no-new": "error",
"no-shadow": "error",
"no-undef": "error",
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "none"
}
],
"no-console": "off",
"no-trailing-spaces": "error",
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"asyncArrow": "always",
"named": "never"
}
],
"array-bracket-spacing": "error",
"space-in-parens": "error",
"space-before-blocks": "error",
"comma-dangle": "error",
"eol-last": "error",
"new-cap": [
"error",
{
"capIsNew": false,
"properties": false
}
],
"dot-notation": "error",
"indent": ["error", 4],
// https://eslint.org/docs/rules/no-case-declarations
"no-case-declarations": "error",
// https://eslint.org/docs/rules/max-classes-per-file
"max-classes-per-file": ["error", 1],
// https://eslint.org/docs/rules/no-eq-null
"no-eq-null": "error",
// https://eslint.org/docs/rules/no-eval
"no-eval": "error",
// https://eslint.org/docs/rules/no-floating-decimal
"no-floating-decimal": "error",
// https://eslint.org/docs/rules/no-implicit-globals
"no-implicit-globals": "error",
// https://eslint.org/docs/rules/no-implied-eval
"no-implied-eval": "error",
// https://eslint.org/docs/rules/no-lone-blocks
"no-lone-blocks": "error",
// https://eslint.org/docs/rules/no-loop-func
"no-loop-func": "error",
// https://eslint.org/docs/rules/no-new-func
"no-new-func": "error",
// https://eslint.org/docs/rules/no-new-wrappers
"no-new-wrappers": "error",
// https://eslint.org/docs/rules/no-octal-escape
"no-octal-escape": "error",
// https://eslint.org/docs/rules/no-proto
"no-proto": "error",
// https://eslint.org/docs/rules/no-return-await
"no-return-await": "error",
// https://eslint.org/docs/rules/no-script-url
"no-script-url": "error",
// https://eslint.org/docs/rules/no-self-compare
"no-self-compare": "error",
// https://eslint.org/docs/rules/no-sequences
"no-sequences": "error",
// https://eslint.org/docs/rules/no-unmodified-loop-condition
"no-unmodified-loop-condition": "error",
// https://eslint.org/docs/rules/no-useless-call
"no-useless-call": "error",
// https://eslint.org/docs/rules/wrap-iife
"wrap-iife": "error",
// https://eslint.org/docs/rules/no-nested-ternary
"no-nested-ternary": "error",
// https://eslint.org/docs/rules/switch-colon-spacing
"switch-colon-spacing": "error",
// https://eslint.org/docs/rules/no-useless-computed-key
"no-useless-computed-key": "error",
// https://eslint.org/docs/rules/rest-spread-spacing
"rest-spread-spacing": ["error"],
// https://eslint.org/docs/rules/no-var
"no-var": "error",
// https://eslint.org/docs/rules/one-var
"one-var": ["error", "never"],
// https://eslint.org/docs/rules/default-case-last
"default-case-last": "error",
// https://eslint.org/docs/rules/default-param-last
"default-param-last": "error",
// https://eslint.org/docs/rules/grouped-accessor-pairs
"grouped-accessor-pairs": "error",
// https://eslint.org/docs/rules/no-constructor-return
"no-constructor-return": "error",
// https://eslint.org/docs/rules/array-callback-return
"array-callback-return": "error",
// https://eslint.org/docs/rules/no-invalid-this
"no-invalid-this": "error", // Believe this one actually surfaces some bugs
// https://eslint.org/docs/rules/func-style
"func-style": ["error", "declaration"],
// https://eslint.org/docs/rules/no-unused-expressions
"no-unused-expressions": "error",
// https://eslint.org/docs/rules/no-useless-concat
"no-useless-concat": "error",
// https://eslint.org/docs/rules/radix
"radix": "error",
// https://eslint.org/docs/rules/require-await
"require-await": "error",
// https://eslint.org/docs/rules/no-alert
"no-alert": "error",
// https://eslint.org/docs/rules/no-useless-constructor
"no-useless-constructor": "error",
// https://eslint.org/docs/rules/no-duplicate-imports
"no-duplicate-imports": "error",
// https://eslint.org/docs/rules/no-implicit-coercion
"no-implicit-coercion": "error",
//https://eslint.org/docs/rules/no-unneeded-ternary
"no-unneeded-ternary": "error",
// https://eslint.org/docs/rules/semi
"semi": ["error", "always"],
// https://eslint.org/docs/rules/no-multi-spaces
"no-multi-spaces": "error",
// https://eslint.org/docs/rules/key-spacing
"key-spacing": ["error", {
"afterColon": true
}],
// https://eslint.org/docs/rules/keyword-spacing
"keyword-spacing": ["error", {
"before": true,
"after": true
}],
// https://eslint.org/docs/rules/comma-spacing
// Also requires one line code fix
"comma-spacing": ["error", {
"after": true
}],
//https://eslint.org/docs/rules/no-whitespace-before-property
"no-whitespace-before-property": "error",
// https://eslint.org/docs/rules/object-curly-newline
"object-curly-newline": ["error", {
"consistent": true,
"multiline": true
}],
// https://eslint.org/docs/rules/object-property-newline
"object-property-newline": "error",
// https://eslint.org/docs/rules/brace-style
"brace-style": "error",
// https://eslint.org/docs/rules/no-multiple-empty-lines
"no-multiple-empty-lines": ["error", {"max": 1}],
// https://eslint.org/docs/rules/operator-linebreak
"operator-linebreak": ["error", "before", {"overrides": {"=": "after"}}],
// https://eslint.org/docs/rules/padding-line-between-statements
"padding-line-between-statements": ["error", {
"blankLine": "always",
"prev": "multiline-block-like",
"next": "*"
}, {
"blankLine": "always",
"prev": "*",
"next": "return"
}],
// https://eslint.org/docs/rules/space-infix-ops
"space-infix-ops": "error",
// https://eslint.org/docs/rules/space-unary-ops
"space-unary-ops": ["error", {
"words": true,
"nonwords": false
}],
// https://eslint.org/docs/rules/arrow-spacing
"arrow-spacing": "error",
// https://eslint.org/docs/rules/semi-spacing
"semi-spacing": ["error", {
"before": false,
"after": true
}],
"vue/html-indent": [
"error",
4,
{
"attribute": 1,
"baseIndent": 0,
"closeBracket": 0,
"alignAttributesVertically": true,
"ignores": []
}
],
"vue/html-self-closing": ["error",
{
"html": {
"void": "never",
"normal": "never",
"component": "always"
},
"svg": "always",
"math": "always"
}
],
"vue/max-attributes-per-line": ["error", {
"singleline": 1,
"multiline": 1,
}],
"vue/first-attribute-linebreak": "error",
"vue/multiline-html-element-content-newline": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/multi-word-component-names": "off", // TODO enable, align with conventions
"vue/no-mutating-props": "off"
},
"overrides": [
{
"files": LEGACY_FILES,
"rules": {
"no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none",
"varsIgnorePattern": "controller"
}
],
"no-nested-ternary": "off",
"no-var": "off",
"one-var": "off"
}
}
]
};

16
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,16 @@
# git-blame ignored revisions
# To configure, run:
# git config blame.ignoreRevsFile .git-blame-ignore-revs
# Requires Git > 2.23
# See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt
# vue-eslint update 2019
14a0f84c1bcd56886d7c9e4e6afa8f7d292734e5
# eslint changes 2022
d80b6923541704ab925abf0047cbbc58735c27e2
# Copyright year update 2022
4a9744e916d24122a81092f6b7950054048ba860
# Copyright year update 2023
8040b275fcf2ba71b42cd72d4daa64bb25c19c2d
# Apply `prettier` formatting
caa7bc6faebc204f67aedae3e35fb0d0d3ce27a7

View File

@ -8,14 +8,15 @@ Closes <!--- Insert Issue Number(s) this PR addresses. Start by typing # will op
* [ ] Have you followed the guidelines in our [Contributing document](https://github.com/nasa/openmct/blob/master/CONTRIBUTING.md)?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/nasa/openmct/pulls) for the same update/change?
* [ ] Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.
* [ ] Is this a [notable change](../docs/src/process/release.md) that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?
### Author Checklist
* [ ] Changes address original issue?
* [ ] Tests included and/or updated with changes?
* [ ] Command line build passes?
* [ ] Has this been smoke tested?
* [ ] Have you associated this PR with a `type:` label? Note: this is not necessarily the same as the original issue.
* [ ] Have you associated a milestone with this PR? Note: leave blank if unsure.
* [ ] Testing instructions included in associated issue OR is this a dependency/testcase change?
### Reviewer Checklist
@ -25,5 +26,3 @@ Closes <!--- Insert Issue Number(s) this PR addresses. Start by typing # will op
* [ ] Changes appear not to be breaking changes?
* [ ] Appropriate automated tests included?
* [ ] Code style and in-line documentation are appropriate?
* [ ] Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
* [ ] Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

View File

@ -1 +1,5 @@
name: 'Custom CodeQL config'
paths-ignore:
# Ignore e2e tests and framework
- e2e

View File

@ -1,35 +1,42 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
interval: 'weekly'
open-pull-requests-limit: 10
rebase-strategy: 'disabled'
labels:
- "pr:e2e"
- "type:maintenance"
- "dependencies"
- "pr:daveit"
- "pr:platform"
- 'pr:daveit'
- 'pr:e2e'
- 'type:maintenance'
- 'dependencies'
- 'pr:platform'
ignore:
#We have to source the playwright container which is not detected by Dependabot
- dependency-name: "@playwright/test"
- dependency-name: "playwright-core"
- dependency-name: '@playwright/test'
- dependency-name: 'playwright-core'
#Lots of noise in these type patch releases.
- dependency-name: "@babel/eslint-parser"
update-types: ["version-update:semver-patch"]
- dependency-name: "eslint-plugin-vue"
update-types: ["version-update:semver-patch"]
- dependency-name: "babel-loader"
update-types: ["version-update:semver-patch"]
- dependency-name: "sinon"
update-types: ["version-update:semver-patch"]
- package-ecosystem: "github-actions"
directory: "/"
- dependency-name: '@babel/eslint-parser'
update-types: ['version-update:semver-patch']
- dependency-name: 'eslint-plugin-vue'
update-types: ['version-update:semver-patch']
- dependency-name: 'babel-loader'
update-types: ['version-update:semver-patch']
- dependency-name: 'sinon'
update-types: ['version-update:semver-patch']
- dependency-name: 'moment-timezone'
update-types: ['version-update:semver-patch']
- dependency-name: '@types/lodash'
update-types: ['version-update:semver-patch']
- dependency-name: 'marked'
update-types: ['version-update:semver-patch']
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
rebase-strategy: 'disabled'
labels:
- "type:maintenance"
- "dependencies"
- "pr:daveit"
- 'pr:daveit'
- 'type:maintenance'
- 'dependencies'

26
.github/release.yml vendored Normal file
View File

@ -0,0 +1,26 @@
changelog:
categories:
- title: 💥 Notable Changes
labels:
- notable_change
- title: 🏕 Features
labels:
- type:feature
- title: 🎉 Enhancements
labels:
- type:enhancement
exclude:
labels:
- type:feature
- title: 🔧 Maintenance
labels:
- type:maintenance
- title: ⚡ Performance
labels:
- performance
- title: 👒 Dependencies
labels:
- dependencies
- title: 🐛 Bug Fixes
labels:
- "*"

View File

@ -27,18 +27,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: javascript
queries: security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View File

@ -1,38 +1,99 @@
name: "e2e-couchdb"
name: 'e2e-couchdb'
on:
push:
branches: master
workflow_dispatch:
pull_request:
types:
- labeled
- opened
env:
OPENMCT_DATABASE_NAME: openmct
COUCH_ADMIN_USER: admin
COUCH_ADMIN_PASSWORD: password
COUCH_BASE_LOCAL: http://localhost:5984
COUCH_NODE_NAME: nonode@nohost
schedule:
- cron: '0 0 * * *'
jobs:
e2e-couchdb:
if: ${{ github.event.label.name == 'pr:e2e:couchdb' }}
if: contains(github.event.pull_request.labels.*.name, 'pr:e2e:couchdb') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event.action == 'opened'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- run : docker-compose -f src/plugins/persistence/couch/couchdb-compose.yaml up --detach
- run : sleep 3 # wait until CouchDB has started (TODO: there must be a better way)
- run : bash src/plugins/persistence/couch/setup-couchdb.sh
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- run: npx playwright@1.29.0 install
- run: npm install
- run: sh src/plugins/persistence/couch/replace-localstorage-with-couchdb-indexhtml.sh
- run: npm run test:e2e:couchdb
- run: ls -latr
node-version: 'lts/hydrogen'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci --no-audit --progress=false
- name: Login to DockerHub
uses: docker/login-action@v3
continue-on-error: true
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: npx playwright@1.48.1 install
- name: Start CouchDB Docker Container and Init with Setup Scripts
run: |
export $(cat src/plugins/persistence/couch/.env.ci | xargs)
docker compose -f src/plugins/persistence/couch/couchdb-compose.yaml up --detach
sleep 3
bash src/plugins/persistence/couch/setup-couchdb.sh
bash src/plugins/persistence/couch/replace-localstorage-with-couchdb-indexhtml.sh
- name: Run CouchDB Tests
env:
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha }}
run: npm run test:e2e:couchdb
- name: Generate Code Coverage Report
run: npm run cov:e2e:report
- name: Publish Results to Codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/e2e/lcov.info
flags: e2e-full
fail_ci_if_error: true
verbose: true
- name: Archive test results
uses: actions/upload-artifact@v3
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: e2e-couchdb-test-results
path: test-results
overwrite: true
- name: Archive html test results
uses: actions/upload-artifact@v3
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: e2e-couchdb-html-test-results
path: html-test-results
overwrite: true
- name: Remove pr:e2e:couchdb label (if present)
if: always()
uses: actions/github-script@v6
with:
script: |
const { owner, repo, number } = context.issue;
const labelToRemove = 'pr:e2e:couchdb';
try {
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: number,
name: labelToRemove
});
} catch (error) {
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`);
}

63
.github/workflows/e2e-flakefinder.yml vendored Normal file
View File

@ -0,0 +1,63 @@
name: 'pr:e2e:flakefinder'
on:
# push:
# branches: master
workflow_dispatch:
# pull_request:
# types:
# - labeled
# - opened
# schedule:
# - cron: '0 0 * * *'
jobs:
e2e-flakefinder:
if: contains(github.event.pull_request.labels.*.name, 'pr:e2e:flakefinder') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event.action == 'opened'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/hydrogen'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npx playwright@1.48.1 install
- run: npm ci --no-audit --progress=false
- name: Run E2E Tests (Repeated 10 Times)
run: npm run test:e2e:ci -- --retries=0 --repeat-each=10 --max-failures=50
- name: Archive test results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: e2e-flakefinder-test-results
path: test-results
overwrite: true
- name: Remove pr:e2e:flakefinder label (if present)
if: always()
uses: actions/github-script@v6
with:
script: |
const { owner, repo, number } = context.issue;
const labelToRemove = 'pr:e2e:flakefinder';
try {
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: number,
name: labelToRemove
});
} catch (error) {
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`);
}

60
.github/workflows/e2e-perf.yml vendored Normal file
View File

@ -0,0 +1,60 @@
name: 'e2e-perf'
on:
push:
branches: master
workflow_dispatch:
pull_request:
types:
- labeled
- opened
schedule:
- cron: '0 0 * * *'
jobs:
e2e-full:
if: contains(github.event.pull_request.labels.*.name, 'pr:e2e:perf') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/hydrogen'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npx playwright@1.48.1 install
- run: npm ci --no-audit --progress=false
- run: npm run test:perf:localhost
- run: npm run test:perf:contract
- run: npm run test:perf:memory
- name: Archive test results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: e2e-perf-test-results
path: test-results
overwrite: true
- name: Remove pr:e2e:perf label (if present)
if: always()
uses: actions/github-script@v6
with:
script: |
const { owner, repo, number } = context.issue;
const labelToRemove = 'pr:e2e:perf';
try {
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: number,
name: labelToRemove
});
} catch (error) {
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`);
}

View File

@ -1,62 +1,70 @@
name: "e2e-pr"
name: 'e2e-pr'
on:
push:
branches: master
workflow_dispatch:
pull_request:
types:
- labeled
- opened
schedule:
- cron: '0 0 * * *'
jobs:
e2e-full:
if: ${{ github.event.label.name == 'pr:e2e' }}
if: contains(github.event.pull_request.labels.*.name, 'pr:e2e') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- name: Trigger Success
uses: actions/github-script@v6
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: "nasa",
repo: "openmct",
body: 'Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/' + context.runId
})
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
node-version: 'lts/hydrogen'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
node-version: '16'
- run: npx playwright@1.29.0 install
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npx playwright@1.47.2 install
- run: npx playwright install chrome-beta
- run: npm install
- run: npm run test:e2e:full
- run: npm ci --no-audit --progress=false
- run: npm run test:e2e:full -- --max-failures=40
- run: npm run cov:e2e:report || true
- shell: bash
env:
SUPER_SECRET: ${{ secrets.CODECOV_TOKEN }}
run: |
npm run cov:e2e:full:publish
- name: Archive test results
uses: actions/upload-artifact@v3
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: e2e-pr-test-results
path: test-results
- name: Test success
if: ${{ success() }}
overwrite: true
- name: Remove pr:e2e label (if present)
if: always()
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: "nasa",
repo: "openmct",
body: 'Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
})
- name: Test failure
if: ${{ failure() }}
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: "nasa",
repo: "openmct",
body: 'Failure ❌ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
})
const { owner, repo, number } = context.issue;
const labelToRemove = 'pr:e2e';
try {
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: number,
name: labelToRemove
});
} catch (error) {
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`);
}

View File

@ -1,21 +0,0 @@
name: "e2e"
on:
workflow_dispatch:
inputs:
version:
description: 'Which branch do you want to test?' # Limited to branch for now
required: false
default: 'master'
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.version }}
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install
- name: Run the e2e tests
run: npm run test:e2e:ci

View File

@ -11,11 +11,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: npm install
node-version: lts/hydrogen
- run: npm ci
- run: |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
npm whoami
@ -26,12 +26,12 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: lts/hydrogen
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm ci
- run: npm publish --access=public --tag unstable
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -1,13 +1,19 @@
name: "pr-platform"
name: 'pr-platform'
on:
push:
branches: master
workflow_dispatch:
pull_request:
types: [ labeled ]
types:
- labeled
- opened
schedule:
- cron: '0 0 * * *'
jobs:
e2e-full:
if: ${{ github.event.label.name == 'pr:platform' }}
pr-platform:
if: contains(github.event.pull_request.labels.*.name, 'pr:platform') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
@ -16,19 +22,49 @@ jobs:
- macos-latest
- windows-latest
node_version:
- 14
- 16
- 18
- lts/iron
- lts/hydrogen
architecture:
- x64
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
- run: npm install
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-
- run: npm ci --no-audit --progress=false
- run: npm test
- run: npm run lint -- --quiet
- name: Remove pr:platform label (if present)
if: always()
uses: actions/github-script@v6
with:
script: |
const { owner, repo, number } = context.issue;
const labelToRemove = 'pr:platform';
try {
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: number,
name: labelToRemove
});
} catch (error) {
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`);
}

View File

@ -3,17 +3,19 @@ name: PRCop
on:
pull_request:
types:
- labeled
- unlabeled
- milestoned
- demilestoned
- opened
- reopened
- edited
- synchronize
- ready_for_review
- review_requested
- review_request_removed
- edited
pull_request_review_comment:
types:
- created
env:
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}
jobs:
prcop:
runs-on: ubuntu-latest
@ -22,5 +24,17 @@ jobs:
- name: Linting Pull Request
uses: makaroni4/prcop@v1.0.35
with:
config-file: ".github/workflows/prcop-config.json"
config-file: '.github/workflows/prcop-config.json'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check-type-label:
name: Check type Label
runs-on: ubuntu-latest
steps:
- if: contains( env.LABELS, 'type:' ) == false
run: exit 1
check-milestone:
name: Check Milestone
runs-on: ubuntu-latest
steps:
- if: github.event.pull_request.milestone == null && contains( env.LABELS, 'no milestone' ) == false
run: exit 1

7
.gitignore vendored
View File

@ -15,6 +15,9 @@
*.idea
*.iml
# VSCode
.vscode/settings.json
# Build output
target
dist
@ -45,5 +48,5 @@ index.html.bak
coverage
codecov
# :(
package-lock.json
# Don't commit MacOS screenshots
*-darwin.png

View File

@ -23,8 +23,5 @@
!openmct.js
!SECURITY.md
# Add e2e tests to npm package
!/e2e/**/*
# ... except our test-data folder files.
/e2e/test-data/*.json
# Dont include the example html
dist/index.html

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
lts/*

27
.prettierignore Normal file
View File

@ -0,0 +1,27 @@
# Docs
*.md
# Build output
target
dist
# Mac OS X Finder
.DS_Store
# Node dependencies
node_modules
# npm-debug log
npm-debug.log
# karma reports
report.*.json
# e2e test artifacts
test-results
html-test-results
# codecov artifacts
.nyc_output
coverage
codecov

6
.prettierrc Normal file
View File

@ -0,0 +1,6 @@
{
"trailingComma": "none",
"singleQuote": true,
"printWidth": 100,
"endOfLine": "auto"
}

13
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint",
"rvest.vs-code-prettier-eslint"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": ["octref.vetur"]
}

View File

@ -1,176 +0,0 @@
/* global __dirname module */
/*
This is the OpenMCT common webpack file. It is imported by the other three webpack configurations:
- webpack.prod.js - the production configuration for OpenMCT (default)
- webpack.dev.js - the development configuration for OpenMCT
- webpack.coverage.js - imports webpack.dev.js and adds code coverage
There are separate npm scripts to use these configurations, though simply running `npm install`
will use the default production configuration.
*/
const path = require("path");
const packageDefinition = require("../package.json");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const { VueLoaderPlugin } = require("vue-loader");
let gitRevision = "error-retrieving-revision";
let gitBranch = "error-retrieving-branch";
try {
gitRevision = require("child_process")
.execSync("git rev-parse HEAD")
.toString()
.trim();
gitBranch = require("child_process")
.execSync("git rev-parse --abbrev-ref HEAD")
.toString()
.trim();
} catch (err) {
console.warn(err);
}
const projectRootDir = path.resolve(__dirname, "..");
/** @type {import('webpack').Configuration} */
const config = {
context: projectRootDir,
entry: {
openmct: "./openmct.js",
generatorWorker: "./example/generator/generatorWorker.js",
couchDBChangesFeed:
"./src/plugins/persistence/couch/CouchChangesFeed.js",
inMemorySearchWorker: "./src/api/objects/InMemorySearchWorker.js",
espressoTheme: "./src/plugins/themes/espresso-theme.scss",
snowTheme: "./src/plugins/themes/snow-theme.scss"
},
output: {
globalObject: "this",
filename: "[name].js",
path: path.resolve(projectRootDir, "dist"),
library: "openmct",
libraryTarget: "umd",
publicPath: "",
hashFunction: "xxhash64",
clean: true
},
resolve: {
alias: {
"@": path.join(projectRootDir, "src"),
legacyRegistry: path.join(projectRootDir, "src/legacyRegistry"),
saveAs: "file-saver/src/FileSaver.js",
csv: "comma-separated-values",
EventEmitter: "eventemitter3",
bourbon: "bourbon.scss",
"plotly-basic": "plotly.js-basic-dist",
"plotly-gl2d": "plotly.js-gl2d-dist",
"d3-scale": path.join(
projectRootDir,
"node_modules/d3-scale/dist/d3-scale.min.js"
),
printj: path.join(
projectRootDir,
"node_modules/printj/dist/printj.min.js"
),
styles: path.join(projectRootDir, "src/styles"),
MCT: path.join(projectRootDir, "src/MCT"),
testUtils: path.join(projectRootDir, "src/utils/testUtils.js"),
objectUtils: path.join(
projectRootDir,
"src/api/objects/object-utils.js"
),
"kdbush": path.join(projectRootDir, "node_modules/kdbush/kdbush.min.js"),
utils: path.join(projectRootDir, "src/utils")
}
},
plugins: [
new webpack.DefinePlugin({
__OPENMCT_VERSION__: `'${packageDefinition.version}'`,
__OPENMCT_BUILD_DATE__: `'${new Date()}'`,
__OPENMCT_REVISION__: `'${gitRevision}'`,
__OPENMCT_BUILD_BRANCH__: `'${gitBranch}'`
}),
new VueLoaderPlugin(),
new CopyWebpackPlugin({
patterns: [
{
from: "src/images/favicons",
to: "favicons"
},
{
from: "./index.html",
transform: function (content) {
return content.toString().replace(/dist\//g, "");
}
},
{
from: "src/plugins/imagery/layers",
to: "imagery"
}
]
}),
new MiniCssExtractPlugin({
filename: "[name].css",
chunkFilename: "[name].css"
})
],
module: {
rules: [
{
test: /\.(sc|sa|c)ss$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader"
},
{
loader: "resolve-url-loader"
},
{
loader: "sass-loader",
options: { sourceMap: true }
}
]
},
{
test: /\.vue$/,
use: "vue-loader"
},
{
test: /\.html$/,
type: "asset/source"
},
{
test: /\.(jpg|jpeg|png|svg)$/,
type: "asset/resource",
generator: {
filename: "images/[name][ext]"
}
},
{
test: /\.ico$/,
type: "asset/resource",
generator: {
filename: "icons/[name][ext]"
}
},
{
test: /\.(woff|woff2?|eot|ttf)$/,
type: "asset/resource",
generator: {
filename: "fonts/[name][ext]"
}
}
]
},
stats: "errors-warnings",
performance: {
// We should eventually consider chunking to decrease
// these values
maxEntrypointSize: 27000000,
maxAssetSize: 27000000
}
};
module.exports = config;

188
.webpack/webpack.common.mjs Normal file
View File

@ -0,0 +1,188 @@
/*
This is the OpenMCT common webpack file. It is imported by the other three webpack configurations:
- webpack.prod.mjs - the production configuration for OpenMCT (default)
- webpack.dev.mjs - the development configuration for OpenMCT
- webpack.coverage.mjs - imports webpack.dev.js and adds code coverage
There are separate npm scripts to use these configurations, though simply running `npm install`
will use the default production configuration.
*/
import { execSync } from 'node:child_process';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import { VueLoaderPlugin } from 'vue-loader';
import webpack from 'webpack';
import { merge } from 'webpack-merge';
let gitRevision = 'error-retrieving-revision';
let gitBranch = 'error-retrieving-branch';
const { version } = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url)));
try {
gitRevision = execSync('git rev-parse HEAD').toString().trim();
gitBranch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
} catch (err) {
console.warn(err);
}
const projectRootDir = fileURLToPath(new URL('../', import.meta.url));
/** @type {import('webpack').Configuration} */
const config = {
context: projectRootDir,
devServer: {
client: {
progress: true,
overlay: {
// Disable overlay for runtime errors.
// See: https://github.com/webpack/webpack-dev-server/issues/4771
runtimeErrors: false
}
}
},
entry: {
openmct: './openmct.js',
generatorWorker: './example/generator/generatorWorker.js',
couchDBChangesFeed: './src/plugins/persistence/couch/CouchChangesFeed.js',
inMemorySearchWorker: './src/api/objects/InMemorySearchWorker.js',
espressoTheme: './src/plugins/themes/espresso-theme.scss',
snowTheme: './src/plugins/themes/snow-theme.scss',
darkmatterTheme: './src/plugins/themes/darkmatter-theme.scss'
},
output: {
globalObject: 'this',
filename: '[name].js',
path: path.resolve(projectRootDir, 'dist'),
library: {
name: 'openmct',
type: 'umd',
export: 'default'
},
publicPath: '',
hashFunction: 'xxhash64',
clean: true
},
resolve: {
alias: {
'@': path.join(projectRootDir, 'src'),
legacyRegistry: path.join(projectRootDir, 'src/legacyRegistry'),
csv: 'comma-separated-values',
bourbon: 'bourbon.scss',
'plotly-basic': 'plotly.js-basic-dist-min',
'plotly-gl2d': 'plotly.js-gl2d-dist-min',
printj: 'printj/printj.mjs',
styles: path.join(projectRootDir, 'src/styles'),
MCT: path.join(projectRootDir, 'src/MCT'),
testUtils: path.join(projectRootDir, 'src/utils/testUtils.js'),
objectUtils: path.join(projectRootDir, 'src/api/objects/object-utils.js'),
utils: path.join(projectRootDir, 'src/utils'),
vue: 'vue/dist/vue.esm-bundler'
}
},
plugins: [
new webpack.DefinePlugin({
__OPENMCT_VERSION__: `'${version}'`,
__OPENMCT_BUILD_DATE__: `'${new Date()}'`,
__OPENMCT_REVISION__: `'${gitRevision}'`,
__OPENMCT_BUILD_BRANCH__: `'${gitBranch}'`,
__VUE_OPTIONS_API__: true, // enable/disable Options API support, default: true
__VUE_PROD_DEVTOOLS__: false // enable/disable devtools support in production, default: false
}),
new VueLoaderPlugin(),
new CopyWebpackPlugin({
patterns: [
{
from: 'src/images/favicons',
to: 'favicons'
},
{
from: './index.html',
transform: function (content) {
return content.toString().replace(/dist\//g, '');
}
},
{
from: 'src/plugins/imagery/layers',
to: 'imagery'
}
]
}),
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[name].css'
}),
// Add a UTF-8 BOM to CSS output to avoid random mojibake
new webpack.BannerPlugin({
test: /.*Theme\.css$/,
raw: true,
banner: '@charset "UTF-8";'
})
],
module: {
rules: [
{
test: /\.(sc|sa|c)ss$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader'
},
{
loader: 'resolve-url-loader'
},
{
loader: 'sass-loader',
options: { sourceMap: true }
}
]
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
compilerOptions: {
hoistStatic: false,
whitespace: 'preserve'
}
}
},
{
test: /\.html$/,
type: 'asset/source'
},
{
test: /\.(jpg|jpeg|png|svg)$/,
type: 'asset/resource',
generator: {
filename: 'images/[name][ext]'
}
},
{
test: /\.ico$/,
type: 'asset/resource',
generator: {
filename: 'icons/[name][ext]'
}
},
{
test: /\.(woff|woff2?|eot|ttf)$/,
type: 'asset/resource',
generator: {
filename: 'fonts/[name][ext]'
}
}
]
},
stats: 'errors-warnings',
performance: {
// We should eventually consider chunking to decrease
// these values
maxEntrypointSize: 27000000,
maxAssetSize: 27000000
}
};
export default config;

View File

@ -1,37 +0,0 @@
/* global module */
/*
This file extends the webpack.dev.js config to add babel istanbul coverage.
OpenMCT Continuous Integration servers use this configuration to add code coverage
information to pull requests.
*/
const config = require("./webpack.dev");
// eslint-disable-next-line no-undef
const CI = process.env.CI === "true";
config.devtool = CI ? false : undefined;
config.devServer.hot = false;
config.module.rules.push({
test: /\.js$/,
exclude: /(Spec\.js$)|(node_modules)/,
use: {
loader: "babel-loader",
options: {
retainLines: true,
// eslint-disable-next-line no-undef
plugins: [
[
"babel-plugin-istanbul",
{
extension: [".js", ".vue"]
}
]
]
}
}
});
module.exports = config;

View File

@ -0,0 +1,31 @@
/*
This file extends the webpack.dev.mjs config to add babel istanbul coverage.
OpenMCT Continuous Integration servers use this configuration to add code coverage
information to pull requests.
*/
import config from './webpack.dev.mjs';
config.devtool = 'inline-source-map';
config.devServer.hot = false;
config.module.rules.push({
test: /\.js$/,
exclude: /(Spec\.js$)|(node_modules)/,
use: {
loader: 'babel-loader',
options: {
retainLines: true,
plugins: [
[
'babel-plugin-istanbul',
{
extension: ['.js', '.vue']
}
]
]
}
}
});
export default config;

View File

@ -1,59 +0,0 @@
/* global __dirname module */
/*
This configuration should be used for development purposes. It contains full source map, a
devServer (which be invoked using by `npm start`), and a non-minified Vue.js distribution.
If OpenMCT is to be used for a production server, use webpack.prod.js instead.
*/
const path = require("path");
const webpack = require("webpack");
const { merge } = require("webpack-merge");
const common = require("./webpack.common");
const projectRootDir = path.resolve(__dirname, "..");
module.exports = merge(common, {
mode: "development",
watchOptions: {
// Since we use require.context, webpack is watching the entire directory.
// We need to exclude any files we don't want webpack to watch.
// See: https://webpack.js.org/configuration/watch/#watchoptions-exclude
ignored: [
"**/{node_modules,dist,docs,e2e}", // All files in node_modules, dist, docs, e2e,
"**/{*.yml,Procfile,webpack*.js,babel*.js,package*.json,tsconfig.json}", // Config files
"**/*.{sh,md,png,ttf,woff,svg}", // Non source files
"**/.*" // dotfiles and dotfolders
]
},
resolve: {
alias: {
vue: path.join(projectRootDir, "node_modules/vue/dist/vue.js")
}
},
plugins: [
new webpack.DefinePlugin({
__OPENMCT_ROOT_RELATIVE__: '"dist/"'
})
],
devtool: "eval-source-map",
devServer: {
devMiddleware: {
writeToDisk: (filePathString) => {
const filePath = path.parse(filePathString);
const shouldWrite = !filePath.base.includes("hot-update");
return shouldWrite;
}
},
watchFiles: ["**/*.css"],
static: {
directory: path.join(__dirname, "..", "/dist"),
publicPath: "/dist",
watch: false
},
client: {
progress: true,
overlay: true
}
}
});

49
.webpack/webpack.dev.mjs Normal file
View File

@ -0,0 +1,49 @@
/*
This configuration should be used for development purposes. It contains full source map, a
devServer (which be invoked using by `npm start`), and a non-minified Vue.js distribution.
If OpenMCT is to be used for a production server, use webpack.prod.mjs instead.
*/
import { fileURLToPath } from 'node:url';
import path from 'path';
import webpack from 'webpack';
import { merge } from 'webpack-merge';
import common from './webpack.common.mjs';
export default merge(common, {
mode: 'development',
watchOptions: {
// Since we use require.context, webpack is watching the entire directory.
// We need to exclude any files we don't want webpack to watch.
// See: https://webpack.js.org/configuration/watch/#watchoptions-exclude
ignored: [
'**/{node_modules,dist,docs,e2e}', // All files in node_modules, dist, docs, e2e,
'**/{*.yml,Procfile,webpack*.js,babel*.js,package*.json,tsconfig.json}', // Config files
'**/*.{sh,md,png,ttf,woff,svg}', // Non source files
'**/.*' // dotfiles and dotfolders
]
},
plugins: [
new webpack.DefinePlugin({
__OPENMCT_ROOT_RELATIVE__: '"dist/"'
})
],
devtool: 'eval-source-map',
devServer: {
devMiddleware: {
writeToDisk: (filePathString) => {
const filePath = path.parse(filePathString);
const shouldWrite = !filePath.base.includes('hot-update');
return shouldWrite;
}
},
watchFiles: ['src/**/*.css', 'example/**/*.css'],
static: {
directory: fileURLToPath(new URL('../dist', import.meta.url)),
publicPath: '/dist',
watch: false
}
}
});

View File

@ -1,27 +0,0 @@
/* global __dirname module */
/*
This configuration should be used for production installs.
It is the default webpack configuration.
*/
const path = require("path");
const webpack = require("webpack");
const { merge } = require("webpack-merge");
const common = require("./webpack.common");
const projectRootDir = path.resolve(__dirname, "..");
module.exports = merge(common, {
mode: "production",
resolve: {
alias: {
vue: path.join(projectRootDir, "node_modules/vue/dist/vue.min.js")
}
},
plugins: [
new webpack.DefinePlugin({
__OPENMCT_ROOT_RELATIVE__: '""'
})
],
devtool: "source-map"
});

19
.webpack/webpack.prod.mjs Normal file
View File

@ -0,0 +1,19 @@
/*
This configuration should be used for production installs.
It is the default webpack configuration.
*/
import webpack from 'webpack';
import { merge } from 'webpack-merge';
import common from './webpack.common.mjs';
export default merge(common, {
mode: 'production',
plugins: [
new webpack.DefinePlugin({
__OPENMCT_ROOT_RELATIVE__: '""'
})
],
devtool: 'source-map'
});

389
API.md
View File

@ -2,7 +2,7 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**
- [Building Applications With Open MCT](#developing-applications-with-open-mct)
- [Developing Applications With Open MCT](#developing-applications-with-open-mct)
- [Scope and purpose of this document](#scope-and-purpose-of-this-document)
- [Building From Source](#building-from-source)
- [Starting an Open MCT application](#starting-an-open-mct-application)
@ -26,7 +26,7 @@
- [Value Hints](#value-hints)
- [The Time Conductor and Telemetry](#the-time-conductor-and-telemetry)
- [Telemetry Providers](#telemetry-providers)
- [Telemetry Requests and Responses.](#telemetry-requests-and-responses)
- [Telemetry Requests and Responses](#telemetry-requests-and-responses)
- [Request Strategies **draft**](#request-strategies-draft)
- [`latest` request strategy](#latest-request-strategy)
- [`minmax` request strategy](#minmax-request-strategy)
@ -44,8 +44,10 @@
- [Clocks](#clocks)
- [Defining and registering clocks](#defining-and-registering-clocks)
- [Getting and setting active clock](#getting-and-setting-active-clock)
- [Stopping an active clock](#stopping-an-active-clock)
- [⚠️ \[DEPRECATED\] Stopping an active clock](#-deprecated-stopping-an-active-clock)
- [Clock Offsets](#clock-offsets)
- [Time Modes](#time-modes)
- [Time Mode Helper Methods](#time-mode-helper-methods)
- [Time Events](#time-events)
- [List of Time Events](#list-of-time-events)
- [The Time Conductor](#the-time-conductor)
@ -92,6 +94,9 @@ well as assets such as html, css, and images necessary for the UI.
## Starting an Open MCT application
> [!WARNING]
> Open MCT provides a development server via `webpack-dev-server` (`npm start`). **This should be used for development purposes only and should never be deployed to a production environment**.
To start a minimally functional Open MCT application, it is necessary to
include the Open MCT distributable, enable some basic plugins, and bootstrap
the application. The tutorials walk through the process of getting Open MCT up
@ -376,6 +381,7 @@ openmct.composition.addProvider({
The `addProvider` function accepts a Composition Provider object as its sole
argument. A Composition Provider is a javascript object exposing two functions:
- `appliesTo`: A `function` that accepts a `domainObject` argument, and returns
a `boolean` value indicating whether this composition provider applies to the
given object.
@ -588,32 +594,111 @@ MinMax queries are issued by plots, and may be issued by other types as well. T
#### Telemetry Formats
Telemetry format objects define how to interpret and display telemetry data.
They have a simple structure:
They have a simple structure, provided here as a TypeScript interface:
- `key`: A `string` that uniquely identifies this formatter.
- `format`: A `function` that takes a raw telemetry value, and returns a
human-readable `string` representation of that value. It has one required
argument, and three optional arguments that provide context and can be used
for returning scaled representations of a value. An example of this is
representing time values in a scale such as the time conductor scale. There
are multiple ways of representing a point in time, and by providing a minimum
scale value, maximum scale value, and a count, it's possible to provide more
useful representations of time given the provided limitations.
- `value`: The raw telemetry value in its native type.
- `minValue`: An **optional** argument specifying the minimum displayed
value.
- `maxValue`: An **optional** argument specifying the maximum displayed
value.
- `count`: An **optional** argument specifying the number of displayed
values.
- `parse`: A `function` that takes a `string` representation of a telemetry
value, and returns the value in its native type. **Note** parse might receive an already-parsed value. This function should be idempotent.
- `validate`: A `function` that takes a `string` representation of a telemetry
value, and returns a `boolean` value indicating whether the provided string
can be parsed.
```ts
interface Formatter {
key: string; // A string that uniquely identifies this formatter.
format: (
value: any, // The raw telemetry value in its native type.
minValue?: number, // An optional argument specifying the minimum displayed value.
maxValue?: number, // An optional argument specifying the maximum displayed value.
count?: number // An optional argument specifying the number of displayed values.
) => string; // Returns a human-readable string representation of the provided value.
parse: (
value: string | any // A string representation of a telemetry value or an already-parsed value.
) => any; // Returns the value in its native type. This function should be idempotent.
validate: (value: string) => boolean; // Takes a string representation of a telemetry value and returns a boolean indicating whether the provided string can be parsed.
}
```
##### Built-in Formats
Open MCT on its own defines a handful of built-in formats:
###### **Number Format (default):**
Applied to data with `format: 'number'`
```js
valueMetadata = {
format: 'number'
// ...
};
```
```ts
interface NumberFormatter extends Formatter {
parse: (x: any) => number;
format: (x: number) => string;
validate: (value: any) => boolean;
}
```
###### **String Format**
Applied to data with `format: 'string'`
```js
valueMetadata = {
format: 'string'
// ...
};
```
```ts
interface StringFormatter extends Formatter {
parse: (value: any) => string;
format: (value: string) => string;
validate: (value: any) => boolean;
}
```
###### **Enum Format**
Applied to data with `format: 'enum'`
```js
valueMetadata = {
format: 'enum',
enumerations: [
{
value: 1,
string: 'APPLE'
},
{
value: 2,
string: 'PEAR',
},
{
value: 3,
string: 'ORANGE'
}]
// ...
};
```
Creates a two-way mapping between enum string and value to be used in the `parse` and `format` methods.
Ex:
- `formatter.parse('APPLE') === 1;`
- `formatter.format(1) === 'APPLE';`
```ts
interface EnumFormatter extends Formatter {
parse: (value: string) => string;
format: (value: number) => string;
validate: (value: any) => boolean;
}
```
##### Registering Formats
Formats implement the following interface (provided here as TypeScript for simplicity):
Formats are registered with the Telemetry API using the `addFormat` function. eg.
```javascript
@ -635,7 +720,7 @@ openmct.telemetry.addFormat({
A single telemetry point is considered a Datum, and is represented by a standard
javascript object. Realtime subscriptions (obtained via **subscribe**) will
invoke the supplied callback once for each telemetry datum recieved. Telemetry
invoke the supplied callback once for each telemetry datum received. Telemetry
requests (obtained via **request**) will return a promise for an array of
telemetry datums.
@ -660,7 +745,7 @@ section.
Limit evaluators allow a telemetry integrator to define which limits exist for a
telemetry endpoint and how limits should be applied to telemetry from a given domain object.
A limit evaluator can implement the `evalute` method which is used to define how limits
A limit evaluator can implement the `evaluate` method which is used to define how limits
should be applied to telemetry and the `getLimits` method which is used to specify
what the limit values are for different limit levels.
@ -685,8 +770,9 @@ state of the application, and emits events to inform listeners when the state ch
Because the data displayed tends to be time domain data, Open MCT must always
have at least one time system installed and activated. When you download Open
MCT, it will be pre-configured to use the UTC time system, which is installed and activated, along with other default plugins, in `index.html`. Installing and activating a time system is simple, and is covered
[in the next section](#defining-and-registering-time-systems).
MCT, it will be pre-configured to use the UTC time system, which is installed and activated,
along with other default plugins, in `index.html`. Installing and activating a time system
is simple, and is covered [in the next section](#defining-and-registering-time-systems).
### Time Systems and Bounds
@ -737,28 +823,37 @@ numbers in UTC terrestrial time.
#### Getting and Setting the Active Time System
Once registered, a time system can be activated by calling `timeSystem` with
the timeSystem `key` or an instance of the time system. If you are not using a
[clock](#clocks), you must also specify valid [bounds](#time-bounds) for the
timeSystem.
Once registered, a time system can be activated by calling `setTimeSystem` with
the timeSystem `key` or an instance of the time system. You can also specify
valid [bounds](#time-bounds) for the timeSystem.
```javascript
openmct.time.timeSystem('utc', bounds);
openmct.time.setTimeSystem('utc', bounds);
```
The current time system can be retrieved as well by calling `getTimeSystem`.
```javascript
openmct.time.getTimeSystem();
```
A time system can be immediately activated after registration:
```javascript
openmct.time.addTimeSystem(utcTimeSystem);
openmct.time.timeSystem(utcTimeSystem, bounds);
openmct.time.setTimeSystem(utcTimeSystem, bounds);
```
Setting the active time system will trigger a [`'timeSystem'`](#time-events)
event. If you supplied bounds, a [`'bounds'`](#time-events) event will be triggered afterwards with your newly supplied bounds.
Setting the active time system will trigger a [`'timeSystemChanged'`](#time-events)
event. If you supplied bounds, a [`'boundsChanged'`](#time-events) event will be triggered afterwards with your newly supplied bounds.
> ⚠️ **Deprecated**
>
> - The method `timeSystem()` is deprecated. Please use `getTimeSystem()` and `setTimeSystem()` as a replacement.
#### Time Bounds
The TimeAPI provides a getter/setter for querying and setting time bounds. Time
The TimeAPI provides a getter and setter for querying and setting time bounds. Time
bounds are simply an object with a `start` and an end `end` attribute.
- `start`: A `number` representing a moment in time in the active [Time System](#defining-and-registering-time-systems).
@ -768,26 +863,35 @@ telemetry views.
This will be used as the end of the time period displayed by time-responsive
telemetry views.
If invoked with bounds, it will set the new time bounds system-wide. If invoked
without any parameters, it will return the current application-wide time bounds.
New bounds can be set system wide by calling `setBounds` with [bounds](#time-bounds).
``` javascript
const ONE_HOUR = 60 * 60 * 1000;
let now = Date.now();
openmct.time.bounds({start: now - ONE_HOUR, now);
openmct.time.setBounds({start: now - ONE_HOUR, now);
```
To respond to bounds change events, listen for the [`'bounds'`](#time-events)
Calling `getBounds` will return the current application-wide time bounds.
``` javascript
openmct.time.getBounds();
```
To respond to bounds change events, listen for the [`'boundsChanged'`](#time-events)
event.
> ⚠️ **Deprecated**
>
> - The method `bounds()` is deprecated and will be removed in a future release. Please use `getBounds()` and `setBounds()` as a replacement.
### Clocks
The Time API can be set to follow a clock source which will cause the bounds
to be updated automatically whenever the clock source "ticks". A clock is simply
an object that supports registration of listeners and periodically invokes its
listeners with a number. Open MCT supports registration of new clock sources that
tick on almost anything. A tick occurs when the clock invokes callback functions
registered by its listeners with a new time value.
The Time API requires a clock source which will cause the bounds to be updated
automatically whenever the clock source "ticks". A clock is simply an object that
supports registration of listeners and periodically invokes its listeners with a
number. Open MCT supports registration of new clock sources that tick on almost
anything. A tick occurs when the clock invokes callback functions registered by its
listeners with a new time value.
An example of a clock source is the [LocalClock](https://github.com/nasa/openmct/blob/master/src/plugins/utcTimeSystem/LocalClock.js)
which emits the current time in UTC every 100ms. Clocks can tick on anything. For
@ -855,23 +959,32 @@ An example clock implementation is provided in the form of the [LocalClock](http
#### Getting and setting active clock
Once registered a clock can be activated by calling the `clock` function on the
Once registered a clock can be activated by calling the `setClock` function on the
Time API passing in the key or instance of a registered clock. Only one clock
may be active at once, so activating a clock will deactivate any currently
active clock. [`clockOffsets`](#clock-offsets) must be specified when changing a clock.
active clock and start the new clock. [`clockOffsets`](#clock-offsets) must be specified when changing a clock.
Setting the clock triggers a [`'clock'`](#time-events) event, followed by a [`'clockOffsets'`](#time-events) event, and then a [`'bounds'`](#time-events) event as the offsets are applied to the clock's currentValue().
Setting the clock triggers a [`'clockChanged'`](#time-events) event, followed by a [`'clockOffsetsChanged'`](#time-events) event, and then a [`'boundsChanged'`](#time-events) event as the offsets are applied to the clock's currentValue().
```
openmct.time.clock(someClock, clockOffsets);
openmct.time.setClock(someClock, clockOffsets);
```
Upon being activated, the time API will listen for tick events on the clock by calling `clock.on`.
The currently active clock (if any) can be retrieved by calling the same
function without any arguments.
The currently active clock can be retrieved by calling `getClock`.
#### Stopping an active clock
```
openmct.time.getClock();
```
> ⚠️ **Deprecated**
>
> - The method `clock()` is deprecated and will be removed in a future release. Please use `getClock()` and `setClock()` as a replacement.
#### ⚠️ [DEPRECATED] Stopping an active clock
_As of July 2023, this method will be deprecated. Open MCT will always have a ticking clock._
The `stopClock` method can be used to stop an active clock, and to clear it. It
will stop the clock from ticking, and set the active clock to `undefined`.
@ -880,12 +993,15 @@ will stop the clock from ticking, and set the active clock to `undefined`.
openmct.time.stopClock();
```
> ⚠️ **Deprecated**
>
> - The method `stopClock()` is deprecated and will be removed in a future release.
#### Clock Offsets
When a clock is active, the time bounds of the application will be updated
automatically each time the clock "ticks". The bounds are calculated based on
the current value provided by the active clock (via its `tick` event, or its
`currentValue()` method).
When in Real-time [mode](#time-modes), the time bounds of the application will be updated automatically each time the
clock "ticks". The bounds are calculated based on the current value provided by
the active clock (via its `tick` event, or its `currentValue()` method).
Unlike bounds, which represent absolute time values, clock offsets represent
relative time spans. Offsets are defined as an object with two properties:
@ -896,21 +1012,78 @@ value provided by a clock's tick callback, or its `currentValue()` function.
- `end`: A `number` that must be >= 0 and which is used to calculate the end
bounds on each clock tick.
The `clockOffsets` function can be used to get or set clock offsets. For example,
The `setClockOffsets` function can be used to get or set clock offsets. For example,
to show the last fifteen minutes in a ms-based time system:
```javascript
var FIFTEEN_MINUTES = 15 * 60 * 1000;
openmct.time.clockOffsets({
openmct.time.setClockOffsets({
start: -FIFTEEN_MINUTES,
end: 0
})
```
The `getClockOffsets` method will return the currently set clock offsets.
```javascript
openmct.time.getClockOffsets()
```
**Note:** Setting the clock offsets will trigger an immediate bounds change, as
new bounds will be calculated based on the `currentValue()` of the active clock.
Clock offsets are only relevant when a clock source is active.
Clock offsets are only relevant when in Real-time [mode](#time-modes).
> ⚠️ **Deprecated**
>
> - The method `clockOffsets()` is deprecated and will be removed in a future release. Please use `getClockOffsets()` and `setClockOffsets()` as a replacement.
### Time Modes
There are two time modes in Open MCT, "Fixed" and "Real-time". In Real-time mode the
time bounds of the application will be updated automatically each time the clock "ticks".
The bounds are calculated based on the current value provided by the active clock. In
Fixed mode, the time bounds are set for a specified time range. When Open MCT is first
initialized, it will be in Real-time mode.
The `setMode` method can be used to set the current time mode. It accepts a mode argument,
`'realtime'` or `'fixed'` and it also accepts an optional [offsets](#clock-offsets)/[bounds](#time-bounds) argument dependent
on the current mode.
``` javascript
openmct.time.setMode('fixed');
openmct.time.setMode('fixed', bounds); // with optional bounds
```
or
``` javascript
openmct.time.setMode('realtime');
openmct.time.setMode('realtime', offsets); // with optional offsets
```
The `getMode` method will return the current time mode, either `'realtime'` or `'fixed'`.
``` javascript
openmct.time.getMode();
```
#### Time Mode Helper Methods
There are two methods available to determine the current time mode in Open MCT programmatically,
`isRealTime` and `isFixed`. Each one will return a boolean value based on the current mode.
``` javascript
if (openmct.time.isRealTime()) {
// do real-time stuff
}
```
``` javascript
if (openmct.time.isFixed()) {
// do fixed-time stuff
}
```
### Time Events
@ -919,7 +1092,7 @@ The Time API is a standard event emitter; you can register callbacks for events
For example:
``` javascript
openmct.time.on('bounds', function callback (newBounds, tick) {
openmct.time.on('boundsChanged', function callback (newBounds, tick) {
// Do something with new bounds
});
```
@ -928,7 +1101,7 @@ openmct.time.on('bounds', function callback (newBounds, tick) {
The events emitted by the Time API are:
- `bounds`: emitted whenever the bounds change. The callback will be invoked
- `boundsChanged`: emitted whenever the bounds change. The callback will be invoked
with two arguments:
- `bounds`: A [bounds](#getting-and-setting-bounds) bounds object
representing a new time period bound by the specified start and send times.
@ -943,15 +1116,25 @@ The events emitted by the Time API are:
If `tick` is false,then the bounds change was not due to an automatic tick,
and a query for historical data may be necessary, depending on your data
caching strategy, and how significantly the start bound has changed.
- `timeSystem`: emitted whenever the active time system changes. The callback will be invoked with a single argument:
- `timeSystemChanged`: emitted whenever the active time system changes. The callback will be invoked with a single argument:
- `timeSystem`: The newly active [time system](#defining-and-registering-time-systems).
- `clock`: emitted whenever the clock changes. The callback will be invoked
- `clockChanged`: emitted whenever the clock changes. The callback will be invoked
with a single argument:
- `clock`: The newly active [clock](#clocks), or `undefined` if an active
clock has been deactivated.
- `clockOffsets`: emitted whenever the active clock offsets change. The
- `clockOffsetsChanged`: emitted whenever the active clock offsets change. The
callback will be invoked with a single argument:
- `clockOffsets`: The new [clock offsets](#clock-offsets).
- `modeChanged`: emitted whenever the time [mode](#time-modes) changed. The callback will
be invoked with one argument:
- `mode`: A string representation of the current time mode, either `'realtime'` or `'fixed'`.
> ⚠️ **Deprecated Events** (These will be removed in a future release):
>
> - `bounds` → `boundsChanged`
> - `timeSystem` → `timeSystemChanged`
> - `clock` → `clockChanged`
> - `clockOffsets` → `clockOffsetsChanged`
### The Time Conductor
@ -1008,7 +1191,7 @@ An example time conductor configuration is provided below. It sets up some
default options for the [UTCTimeSystem](https://github.com/nasa/openmct/blob/master/src/plugins/utcTimeSystem/UTCTimeSystem.js)
and [LocalTimeSystem](https://github.com/nasa/openmct/blob/master/src/plugins/localTimeSystem/LocalTimeSystem.js),
in both fixed mode, and for the [LocalClock](https://github.com/nasa/openmct/blob/master/src/plugins/utcTimeSystem/LocalClock.js)
source. In this configutation, the local clock supports both the UTCTimeSystem
source. In this configuration, the local clock supports both the UTCTimeSystem
and LocalTimeSystem. Configuration for fixed bounds mode is specified by omitting
a clock key.
@ -1018,7 +1201,7 @@ const ONE_MINUTE = 60 * 1000;
openmct.install(openmct.plugins.Conductor({
menuOptions: [
// 'Fixed' bounds mode configuation for the UTCTimeSystem
// 'Fixed' bounds mode configuration for the UTCTimeSystem
{
timeSystem: 'utc',
bounds: {start: Date.now() - 30 * ONE_MINUTE, end: Date.now()},
@ -1090,7 +1273,7 @@ Returns the currently set text as a `string`.
[the built-in glyphs](https://nasa.github.io/openmct/style-guide/#/browse/styleguide:home/glyphs?view=styleguide.glyphs)
may be used here, or a custom CSS class can be provided. Returns the currently defined CSS
class as a `string`.
- `.statusClass([className])`: Gets or sets the CSS class used to determine status. Accepts an __optional__
- `.statusClass([className])`: Gets or sets the CSS class used to determine status. Accepts an **optional**
`string` parameter to be used to set a status class applied to the indicator. May be used to apply
different colors to indicate status.
@ -1132,3 +1315,69 @@ View provider Example:
}
}
```
## User API
Open MCT provides a User API which can be used to define providers for user information. The API
can be used to manage user information and roles.
### Example
Open MCT provides an example [user](example/exampleUser/exampleUserCreator.js) and [user provider](example/exampleUser/ExampleUserProvider.js) which
can be used as a starting point for creating a custom user provider.
## Visibility-Based Rendering in View Providers
To enhance performance and resource efficiency in OpenMCT, a visibility-based rendering feature has been added. This feature is designed to defer the execution of rendering logic for views that are not currently visible. It ensures that views are only updated when they are in the viewport, similar to how modern browsers handle rendering of inactive tabs but optimized for the OpenMCT tabbed display. It also works when views are scrolled outside the viewport (e.g., in a Display Layout).
### Overview
The show function is responsible for the rendering of a view. An [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) is used internally to determine whether the view is visible. This observer drives the visibility-based rendering feature, accessed via the `renderWhenVisible` function provided in the `viewOptions` parameter.
### Implementing Visibility-Based Rendering
The `renderWhenVisible` function is passed to the show function as part of the `viewOptions` object. This function can be used for all rendering logic that would otherwise be executed within a `requestAnimationFrame` call. When called, `renderWhenVisible` will either execute the provided function immediately (via `requestAnimationFrame`) if the view is currently visible, or defer its execution until the view becomes visible.
Additionally, `renderWhenVisible` returns a boolean value indicating whether the provided function was executed immediately (`true`) or deferred (`false`).
Monitoring of visibility begins after the first call to `renderWhenVisible` is made.
Heres the signature for the show function:
`show(element, isEditing, viewOptions)`
- `element` (HTMLElement) - The DOM element where the view should be rendered.
- `isEditing` (boolean) - Indicates whether the view is in editing mode.
- `viewOptions` (Object) - An object with configuration options for the view, including:
- `renderWhenVisible` (Function) - This function wraps the `requestAnimationFrame` and only triggers the provided render logic when the view is visible in the viewport.
### Example
An OpenMCT view provider might implement the show function as follows:
```js
// Define your view provider
const myViewProvider = {
// ... other properties and methods ...
show: function (element, isEditing, viewOptions) {
// Callback for rendering view content
const renderCallback = () => {
// Your view rendering logic goes here
};
// Use the renderWhenVisible function to ensure rendering only happens when view is visible
const wasRenderedImmediately = viewOptions.renderWhenVisible(renderCallback);
// Optionally handle the immediate rendering return value
if (wasRenderedImmediately) {
console.debug('🪞 Rendering triggered immediately as the view is visible.');
} else {
console.debug('🛑 Rendering has been deferred until the view becomes visible.');
}
}
};
```
Note that `renderWhenVisible` defers rendering while the view is not visible and caters to the latest execution call. This provides responsiveness for dynamic content while ensuring performance optimizations.
Ensure your view logic is prepared to handle potentially multiple deferrals if using this API, as only the last call to renderWhenVisible will be queued for execution upon the view becoming visible.

View File

@ -24,7 +24,7 @@ The short version:
Open MCT uses git for software version control, and for branching and
merging. The central repository is at
https://github.com/nasa/openmct.git.
<https://github.com/nasa/openmct.git>.
### Roles
@ -116,6 +116,7 @@ the pull request containing the reviewer checklist (from below) and complete
the merge back to the master branch.
Additionally:
* Every pull request must link to the issue that it addresses. Eg. “Addresses #1234” or “Closes #1234”. This is the responsibility of the pull requests __author__. If no issue exists, [create one](https://github.com/nasa/openmct/issues/new/choose).
* Every __author__ must include testing instructions. These instructions should identify the areas of code affected, and some minimal test steps. If addressing a bug, reproduction steps should be included, if they were not included in the original issue. If reproduction steps were included on the original issue, and are sufficient, refer to them.
* A pull request that closes an issue should say so in the description. Including the text “Closes #1234” will cause the linked issue to be automatically closed when the pull request is merged. This is the responsibility of the pull requests __author__.
@ -132,14 +133,15 @@ changes.
### Code Standards
JavaScript sources in Open MCT must satisfy the ESLint rules defined in
this repository. This is verified by the command line build.
JavaScript sources in Open MCT must satisfy the [ESLint](https://eslint.org/) rules defined in
this repository. [Prettier](https://prettier.io/) is used in conjunction with ESLint to enforce code style
via automated formatting. These are verified by the command line build.
#### Code Guidelines
The following guidelines are provided for anyone contributing source code to the Open MCT project:
1. Write clean code. Heres a good summary - https://github.com/ryanmcdermott/clean-code-javascript.
1. Write clean code. Heres a good summary - <https://github.com/ryanmcdermott/clean-code-javascript>.
1. Include JSDoc for any exposed API (e.g. public methods, classes).
1. Include non-JSDoc comments as-needed for explaining private variables,
methods, or algorithms when they are non-obvious. Otherwise code
@ -159,17 +161,21 @@ The following guidelines are provided for anyone contributing source code to the
(e.g. as arguments to a forEach call). Anonymous functions should always be arrow functions.
1. Named functions are preferred over functions assigned to variables.
eg.
```JavaScript
function renameObject(object, newName) {
Object.name = newName;
}
```
is preferable to
```JavaScript
const rename = (object, newName) => {
Object.name = newName;
}
```
1. Avoid deep nesting (especially of functions), except where necessary
(e.g. due to closure scope).
1. End with a single new-line character.
@ -182,19 +188,24 @@ The following guidelines are provided for anyone contributing source code to the
* Finally, the returned value. A single return statement at the end of the function should be used, except where an early return would improve code clarity.
1. Avoid the use of "magic" values.
eg.
```JavaScript
const UNAUTHORIZED = 401;
if (responseCode === UNAUTHORIZED)
```
is preferable to
```JavaScript
if (responseCode === 401)
```
1. Use the ternary operator only for simple cases such as variable assignment. Nested ternaries should be avoided in all cases.
1. Test specs should reside alongside the source code they test, not in a separate directory.
1. Unit Test specs should reside alongside the source code they test, not in a separate directory.
1. Organize code by feature, not by type.
eg.
```
```txt
- telemetryTable
- row
TableRow.js
@ -206,8 +217,10 @@ The following guidelines are provided for anyone contributing source code to the
plugin.js
pluginSpec.js
```
is preferable to
```
```txt
- telemetryTable
- components
TableRow.vue
@ -219,47 +232,10 @@ The following guidelines are provided for anyone contributing source code to the
plugin.js
pluginSpec.js
```
Deviations from Open MCT code style guidelines require two-party agreement,
typically from the author of the change and its reviewer.
### Test Standards
Automated testing shall occur whenever changes are merged into the main
development branch and must be confirmed alongside any pull request.
Automated tests are tests which exercise plugins, API, and utility classes.
Tests are subject to code review along with the actual implementation, to
ensure that tests are applicable and useful.
Examples of useful tests:
* Tests which replicate bugs (or their root causes) to verify their
resolution.
* Tests which reflect details from software specifications.
* Tests which exercise edge or corner cases among inputs.
* Tests which verify expected interactions with other components in the
system.
#### Guidelines
* 100% statement coverage is achievable and desirable.
* Do blackbox testing. Test external behaviors, not internal details. Write tests that describe what your plugin is supposed to do. How it does this doesn't matter, so don't test it.
* Unit test specs for plugins should be defined at the plugin level. Start with one test spec per plugin named pluginSpec.js, and as this test spec grows too big, break it up into multiple test specs that logically group related tests.
* Unit tests for API or for utility functions and classes may be defined at a per-source file level.
* Wherever possible only use and mock public API, builtin functions, and UI in your test specs. Do not directly invoke any private functions. ie. only call or mock functions and objects exposed by openmct.* (eg. openmct.telemetry, openmct.objectView, etc.), and builtin browser functions (fetch, requestAnimationFrame, setTimeout, etc.).
* Where builtin functions have been mocked, be sure to clear them between tests.
* Test at an appropriate level of isolation. Eg.
* If youre testing a view, you do not need to test the whole application UI, you can just fetch the view provider using the public API and render the view into an element that you have created.
* You do not need to test that the view switcher works, there should be separate tests for that.
* You do not need to test that telemetry providers work, you can mock openmct.telemetry.request() to feed test data to the view.
* Use your best judgement when deciding on appropriate scope.
* Automated tests for plugins should start by actually installing the plugin being tested, and then test that installing the plugin adds the desired features and behavior to Open MCT, observing the above rules.
* All variables used in a test spec, including any instances of the Open MCT API should be declared inside of an appropriate block scope (not at the root level of the source file), and should be initialized in the relevant beforeEach block. `beforeEach` is preferable to `beforeAll` to avoid leaking of state between tests.
* A `afterEach` or `afterAll` should be used to do any clean up necessary to prevent leakage of state between test specs. This can happen when functions on `window` are wrapped, or when the URL is changed. [A convenience function](https://github.com/nasa/openmct/blob/master/src/utils/testing.js#L59) is provided for resetting the URL and clearing builtin spies between tests.
* If writing unit tests for legacy Angular code be sure to follow [best practices in order to avoid memory leaks](https://www.thecodecampus.de/blog/avoid-memory-leaks-angularjs-unit-tests/).
#### Examples
* [Example of an automated test spec for an object view plugin](https://github.com/nasa/openmct/blob/master/src/plugins/telemetryTable/pluginSpec.js)
* [Example of an automated test spec for API](https://github.com/nasa/openmct/blob/master/src/api/time/TimeAPISpec.js)
### Commit Message Standards
Commit messages should:
@ -295,13 +271,13 @@ these standards.
## Issue Reporting
Issues are tracked at https://github.com/nasa/openmct/issues.
Issues are tracked at <https://github.com/nasa/openmct/issues>.
Issue severity is categorized as follows (in ascending order):
* _Trivial_: Minimal impact on the usefulness and functionality of the software; a "nice-to-have." Visual impact without functional impact,
* _Medium_: Some impairment of use, but simple workarounds exist
* _Critical_: Significant loss of functionality or impairment of use. Display of telemetry data is not affected though.
* _Critical_: Significant loss of functionality or impairment of use. Display of telemetry data is not affected though. Complex workarounds exist.
* _Blocker_: Major functionality is impaired or lost, threatening mission success. Display of telemetry data is impaired or blocked by the bug, which could lead to loss of situational awareness.
## Check Lists
@ -310,22 +286,4 @@ The following check lists should be completed and attached to pull requests
when they are filed (author checklist) and when they are merged (reviewer
checklist).
### Author Checklist
[Within PR Template](.github/PULL_REQUEST_TEMPLATE.md)
### Reviewer Checklist
* [ ] Changes appear to address issue?
* [ ] Changes appear not to be breaking changes?
* [ ] Appropriate unit tests included?
* [ ] Code style and in-line documentation are appropriate?
* [ ] Commit messages meet standards?
* [ ] Has associated issue been labelled `unverified`? (only applicable if this PR closes the issue)
* [ ] Has associated issue been labelled `bug`? (only applicable if this PR is for a bug fix)
* [ ] List of Acceptance Tests Performed.
Write out a small list of tests performed with just enough detail for another developer on the team
to execute.
i.e. ```When Clicking on Add button, new `object` appears in dropdown.```

View File

@ -1,6 +1,6 @@
# Open MCT License
Open MCT, Copyright (c) 2014-2023, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
Open MCT, Copyright (c) 2014-2024, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

149
README.md
View File

@ -1,32 +1,45 @@
# Open MCT [![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![codecov](https://codecov.io/gh/nasa/openmct/branch/master/graph/badge.svg?token=7DQIipp3ej)](https://codecov.io/gh/nasa/openmct) [![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/b2e34b17/openmct) [![npm version](https://img.shields.io/npm/v/openmct.svg)](https://www.npmjs.com/package/openmct)
# Open MCT [![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![codecov](https://codecov.io/gh/nasa/openmct/branch/master/graph/badge.svg?token=7DQIipp3ej)](https://codecov.io/gh/nasa/openmct) [![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/b2e34b17/openmct) [![npm version](https://img.shields.io/npm/v/openmct.svg)](https://www.npmjs.com/package/openmct) ![CodeQL](https://github.com/nasa/openmct/workflows/CodeQL/badge.svg)
Open MCT (Open Mission Control Technologies) is a next-generation mission control framework for visualization of data on desktop and mobile devices. It is developed at NASA's Ames Research Center, and is being used by NASA for data analysis of spacecraft missions, as well as planning and operation of experimental rover systems. As a generalizable and open source framework, Open MCT could be used as the basis for building applications for planning, operation, and analysis of any systems producing telemetry data.
Please visit our [Official Site](https://nasa.github.io/openmct/) and [Getting Started Guide](https://nasa.github.io/openmct/getting-started/)
> [!NOTE]
> Please visit our [Official Site](https://nasa.github.io/openmct/) and [Getting Started Guide](https://nasa.github.io/openmct/getting-started/)
Once you've created something amazing with Open MCT, showcase your work in our GitHub Discussions [Show and Tell](https://github.com/nasa/openmct/discussions/categories/show-and-tell) section. We love seeing unique and wonderful implementations of Open MCT!
![Screen Shot 2022-11-23 at 9 51 36 AM](https://user-images.githubusercontent.com/4215777/203617422-4d912bfc-766f-4074-8324-409d9bbe7c05.png)
## Building and Running Open MCT Locally
Building and running Open MCT in your local dev environment is very easy. Be sure you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed, then follow the directions below. Need additional information? Check out the [Getting Started](https://nasa.github.io/openmct/getting-started/) page on our website.
(These instructions assume you are installing as a non-root user; developers have [reported issues](https://github.com/nasa/openmct/issues/1151) running these steps with root privileges.)
1. Clone the source code
1. Clone the source code:
`git clone https://github.com/nasa/openmct.git`
```sh
git clone https://github.com/nasa/openmct.git
```
2. Install development dependencies. Note: Check the package.json engine for our tested and supported node versions.
2. (Optional) Install the correct node version using [nvm](https://github.com/nvm-sh/nvm):
`npm install`
```sh
nvm install
```
3. Run a local development server
3. Install development dependencies (Note: Check the `package.json` engine for our tested and supported node versions):
`npm start`
```sh
npm install
```
Open MCT is now running, and can be accessed by pointing a web browser at [http://localhost:8080/](http://localhost:8080/)
4. Run a local development server:
```
npm start
```
> [!IMPORTANT]
> Open MCT is now running, and can be accessed by pointing a web browser at [http://localhost:8080/](http://localhost:8080/)
Open MCT is built using [`npm`](http://npmjs.com/) and [`webpack`](https://webpack.js.org/).
@ -40,8 +53,12 @@ The clearest examples for developing Open MCT plugins are in the
[tutorials](https://github.com/nasa/openmct-tutorial) provided in
our documentation.
We want Open MCT to be as easy to use, install, run, and develop for as
possible, and your feedback will help us get there! Feedback can be provided via [GitHub issues](https://github.com/nasa/openmct/issues/new/choose), [Starting a GitHub Discussion](https://github.com/nasa/openmct/discussions), or by emailing us at [arc-dl-openmct@mail.nasa.gov](mailto:arc-dl-openmct@mail.nasa.gov).
> [!NOTE]
> We want Open MCT to be as easy to use, install, run, and develop for as
> possible, and your feedback will help us get there!
> Feedback can be provided via [GitHub issues](https://github.com/nasa/openmct/issues/new/choose),
> [Starting a GitHub Discussion](https://github.com/nasa/openmct/discussions),
> or by emailing us at [arc-dl-openmct@mail.nasa.gov](mailto:arc-dl-openmct@mail.nasa.gov).
## Developing Applications With Open MCT
@ -49,9 +66,11 @@ For more on developing with Open MCT, see our documentation for a guide on [Deve
## Compatibility
This is a fast moving project and we do our best to test and support the widest possible range of browsers, operating systems, and nodejs APIs. We have a published list of support available in our package.json's `browserslist` key.
This is a fast moving project and we do our best to test and support the widest possible range of browsers, operating systems, and NodeJS APIs. We have a published list of support available in our package.json's `browserslist` key.
If you encounter an issue with a particular browser, OS, or nodejs API, please file a [GitHub issue](https://github.com/nasa/openmct/issues/new/choose)
The project utilizes `nvm` to maintain consistent node and npm versions across all projects. For UNIX, MacOS, Windows WSL, and other POSIX-compliant shell environments, click [here](https://github.com/nvm-sh/nvm). For Windows, check out [nvm-windows](https://github.com/coreybutler/nvm-windows).
If you encounter an issue with a particular browser, OS, or NodeJS API, please [file an issue](https://github.com/nasa/openmct/issues/new/choose).
## Plugins
@ -69,6 +88,7 @@ For information on writing plugins, please see [our API documentation](./API.md#
Our automated test coverage comes in the form of unit, e2e, visual, performance, and security tests.
### Unit Tests
Unit Tests are written for [Jasmine](https://jasmine.github.io/api/edge/global)
and run by [Karma](http://karma-runner.github.io). To run:
@ -80,25 +100,35 @@ in the `src` hierarchy. Full configuration details are found in
alongside the units that they test; for example, `src/foo/Bar.js` would be
tested by `src/foo/BarSpec.js`.
### e2e, Visual, and Performance tests
The e2e, Visual, and Performance tests are written for playwright and run by playwright's new test runner [@playwright/test](https://playwright.dev/).
### e2e, Visual, and Performance Testing
To run the e2e tests which are part of every commit:
Our e2e (end-to-end), Visual, and Performance tests leverage the Playwright framework and are executed using Playwright's test runner, [@playwright/test](https://playwright.dev/).
`npm run test:e2e:stable`
#### How to Run Tests
To run the visual test suite:
- **e2e Tests**: These tests are run on every commit. To run the tests locally, use:
`npm run test:e2e:visual`
```sh
npm run test:e2e:ci
```
To run the performance tests:
- **Visual Tests**: For running the visual test suite, use:
`npm run test:perf`
```sh
npm run test:e2e:visual
```
The test suite is configured to all tests localed in `e2e/tests/` ending in `*.e2e.spec.js`. For more about the e2e test suite, please see the [README](./e2e/README.md)
- **Performance Tests**: To initiate the performance tests, enter:
```sh
npm run test:perf
```
All tests are located within the `e2e/tests/` directory and are identified by the `*.e2e.spec.js` filename pattern. For more information about the e2e test suite, refer to the [README](./e2e/README.md).
### Security Tests
Each commit is analyzed for known security vulnerabilities using [CodeQL](https://codeql.github.com/docs/codeql-language-guides/codeql-library-for-javascript/). The list of CWE coverage items is avaiable in the [CodeQL docs](https://codeql.github.com/codeql-query-help/javascript-cwe/). The CodeQL workflow is specified in the [CodeQL analysis file](./.github/workflows/codeql-analysis.yml) and the custom [CodeQL config](./.github/codeql/codeql-config.yml).
Each commit is analyzed for known security vulnerabilities using [CodeQL](https://codeql.github.com/docs/codeql-language-guides/codeql-library-for-javascript/). The list of CWE coverage items is available in the [CodeQL docs](https://codeql.github.com/codeql-query-help/javascript-cwe/). The CodeQL workflow is specified in the [CodeQL analysis file](./.github/workflows/codeql-analysis.yml) and the custom [CodeQL config](./.github/codeql/codeql-config.yml).
### Test Reporting and Code Coverage
@ -106,58 +136,55 @@ Each test suite generates a report in CircleCI. For a complete overview of testi
Our code coverage is generated during the runtime of our unit, e2e, and visual tests. The combination of those reports is published to [codecov.io](https://app.codecov.io/gh/nasa/openmct/)
# Glossary
For more on the specifics of our code coverage setup, [see](TESTING.md#code-coverage)
## Glossary
Certain terms are used throughout Open MCT with consistent meanings
or conventions. Any deviations from the below are issues and should be
addressed (either by updating this glossary or changing code to reflect
correct usage.) Other developer documentation, particularly in-line
documentation, may presume an understanding of these terms.
* _plugin_: A plugin is a removable, reusable grouping of software elements.
The application is composed of plugins.
* _composition_: In the context of a domain object, this refers to the set of
other domain objects that compose or are contained by that object. A domain
object's composition is the set of domain objects that should appear
immediately beneath it in a tree hierarchy. A domain object's composition is
described in its model as an array of id's; its composition capability
provides a means to retrieve the actual domain object instances associated
with these identifiers asynchronously.
* _description_: When used as an object property, this refers to the human-readable
description of a thing; usually a single sentence or short paragraph.
(Most often used in the context of extensions, domain
object models, or other similar application-specific objects.)
* _domain object_: A meaningful object to the user; a distinct thing in
the work support by Open MCT. Anything that appears in the left-hand
tree is a domain object.
* _identifier_: A tuple consisting of a namespace and a key, which together uniquely
identifies a domain object.
* _model_: The persistent state associated with a domain object. A domain
object's model is a JavaScript object which can be converted to JSON
without losing information (that is, it contains no methods.)
* _name_: When used as an object property, this refers to the human-readable
name for a thing. (Most often used in the context of extensions, domain
object models, or other similar application-specific objects.)
* _navigation_: Refers to the current state of the application with respect
to the user's expressed interest in a specific domain object; e.g. when
a user clicks on a domain object in the tree, they are _navigating_ to
it, and it is thereafter considered the _navigated_ object (until the
user makes another such choice.)
* _namespace_: A name used to identify a persistence store. A running open MCT
application could potentially use multiple persistence stores, with the
| Term | Definition |
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| _plugin_ | A removable, reusable grouping of software elements. The application is composed of plugins. |
| _composition_ | In the context of a domain object, this term refers to the set of other domain objects that compose or are contained by that object. A domain object's composition is the set of domain objects that should appear immediately beneath it in a tree hierarchy. It is described in its model as an array of ids, providing a means to asynchronously retrieve the actual domain object instances associated with these identifiers. |
| _description_ | When used as an object property, this term refers to the human-readable description of a thing, usually a single sentence or short paragraph. It is most often used in the context of extensions, domain object models, or other similar application-specific objects. |
| _domain object_ | A meaningful object to the user and a distinct thing in the work supported by Open MCT. Anything that appears in the left-hand tree is a domain object. |
| _identifier_ | A tuple consisting of a namespace and a key, which together uniquely identifies a domain object. |
| _model_ | The persistent state associated with a domain object. A domain object's model is a JavaScript object that can be converted to JSON without losing information, meaning it contains no methods. |
| _name_ | When used as an object property, this term refers to the human-readable name for a thing. It is most often used in the context of extensions, domain object models, or other similar application-specific objects. |
| _navigation_ | This term refers to the current state of the application with respect to the user's expressed interest in a specific domain object. For example, when a user clicks on a domain object in the tree, they are navigating to it, and it is thereafter considered the navigated object until the user makes another such choice. |
| _namespace_ | A name used to identify a persistence store. A running Open MCT application could potentially use multiple persistence stores. |
## Open MCT v2.0.0
Support for our legacy bundle-based API, and the libraries that it was built on (like Angular 1.x), have now been removed entirely from this repository.
For now if you have an Open MCT application that makes use of the legacy API, [a plugin](https://github.com/nasa/openmct-legacy-plugin) is provided that bootstraps the legacy bundling mechanism and API. This plugin will not be maintained over the long term however, and the legacy support plugin will not be tested for compatibility with future versions of Open MCT. It is provided for convenience only.
### How do I know if I am using legacy API?
You might still be using legacy API if your source code
* Contains files named bundle.js, or bundle.json,
* Makes calls to `openmct.$injector()`, or `openmct.$angular`,
* Makes calls to `openmct.legacyRegistry`, `openmct.legacyExtension`, or `openmct.legacyBundle`.
- Contains files named bundle.js, or bundle.json,
- Makes calls to `openmct.$injector()`, or `openmct.$angular`,
- Makes calls to `openmct.legacyRegistry`, `openmct.legacyExtension`, or `openmct.legacyBundle`.
### What should I do if I am using legacy API?
Please refer to [the modern Open MCT API](https://nasa.github.io/openmct/documentation/). Post any questions to the [Discussions section](https://github.com/nasa/openmct/discussions) of the Open MCT GitHub repository.
## Related Repos
> [!NOTE]
> Although Open MCT functions as a standalone project, it is primarily an extensible framework intended to be used as a dependency with users' own plugins and packaging. Furthermore, Open MCT is intended to be used with an HTTP server such as Apache or Nginx. A great example of hosting Open MCT with Apache is `openmct-quickstart` and can be found in the table below.
| Repository | Description |
| --- | --- |
| [openmct-tutorial](https://github.com/nasa/openmct-tutorial) | A great place for beginners to learn how to use and extend Open MCT. |
| [openmct-quickstart](https://github.com/scottbell/openmct-quickstart) | A working example of Open MCT integrated with Apache HTTP server, YAMCS telemetry, and Couch DB for persistence.
| [Open MCT YAMCS Plugin](https://github.com/akhenry/openmct-yamcs) | Plugin for integrating YAMCS telemetry and command server with Open MCT. |
| [openmct-performance](https://github.com/unlikelyzero/openmct-performance) | Resources for performance testing Open MCT. |
| [openmct-as-a-dependency](https://github.com/unlikelyzero/openmct-as-a-dependency) | An advanced guide for users on how to build, develop, and test Open MCT when it's used as a dependency. |

View File

@ -16,8 +16,6 @@ The [CodeQL GitHub Actions workflow](https://github.com/nasa/openmct/blob/master
CodeQL is run for every pull-request in GitHub Actions.
The project is also monitored by [LGTM](https://lgtm.com/projects/g/nasa/openmct/) and is available to public.
### ESLint
Static analysis is run for every push on the master branch and every pull request on all branches in Github Actions.

122
TESTING.md Normal file
View File

@ -0,0 +1,122 @@
# Testing
Open MCT Testing is iterating and improving at a rapid pace. This document serves to capture and index existing testing documentation and house documentation which no other obvious location as our testing evolves.
## General Testing Process
Documentation located [here](./docs/src/process/testing/plan.md)
## Unit Testing
Unit testing is essential part of our test strategy and complements our e2e testing strategy.
#### Unit Test Guidelines
* Unit Test specs should reside alongside the source code they test, not in a separate directory.
* Unit test specs for plugins should be defined at the plugin level. Start with one test spec per plugin named pluginSpec.js, and as this test spec grows too big, break it up into multiple test specs that logically group related tests.
* Unit tests for API or for utility functions and classes may be defined at a per-source file level.
* Wherever possible only use and mock public API, builtin functions, and UI in your test specs. Do not directly invoke any private functions. ie. only call or mock functions and objects exposed by openmct.* (eg. openmct.telemetry, openmct.objectView, etc.), and builtin browser functions (fetch, requestAnimationFrame, setTimeout, etc.).
* Where builtin functions have been mocked, be sure to clear them between tests.
* Test at an appropriate level of isolation. Eg.
* If youre testing a view, you do not need to test the whole application UI, you can just fetch the view provider using the public API and render the view into an element that you have created.
* You do not need to test that the view switcher works, there should be separate tests for that.
* You do not need to test that telemetry providers work, you can mock openmct.telemetry.request() to feed test data to the view.
* Use your best judgement when deciding on appropriate scope.
* Automated tests for plugins should start by actually installing the plugin being tested, and then test that installing the plugin adds the desired features and behavior to Open MCT, observing the above rules.
* All variables used in a test spec, including any instances of the Open MCT API should be declared inside of an appropriate block scope (not at the root level of the source file), and should be initialized in the relevant beforeEach block. `beforeEach` is preferable to `beforeAll` to avoid leaking of state between tests.
* A `afterEach` or `afterAll` should be used to do any clean up necessary to prevent leakage of state between test specs. This can happen when functions on `window` are wrapped, or when the URL is changed. [A convenience function](https://github.com/nasa/openmct/blob/master/src/utils/testing.js#L59) is provided for resetting the URL and clearing builtin spies between tests.
#### Unit Test Examples
* [Example of an automated test spec for an object view plugin](https://github.com/nasa/openmct/blob/master/src/plugins/telemetryTable/pluginSpec.js)
* [Example of an automated test spec for API](https://github.com/nasa/openmct/blob/master/src/api/time/TimeAPISpec.js)
#### Unit Testing Execution
The unit tests can be executed in one of two ways:
`npm run test` which runs the entire suite against headless chrome
`npm run test:debug` for debugging the tests in realtime in an active chrome session.
## e2e, performance, and visual testing
Documentation located [here](./e2e/README.md)
## Code Coverage
It's up to the individual developer as to whether they want to add line coverage in the form of a unit test or e2e test.
Line Code Coverage is generated by our unit tests and e2e tests, then combined by ([Codecov.io Flags](https://docs.codecov.com/docs/flags)), and finally reported in GitHub PRs by Codecov.io's PR Bot. This workflow gives a comprehensive (if flawed) view of line coverage.
### Karma-istanbul
Line coverage is generated by our `karma-coverage-istanbul-reporter` package as defined in our `karma.conf.js` file:
```js
coverageIstanbulReporter: {
fixWebpackSourcePaths: true,
skipFilesWithNoCoverage: true,
dir: 'coverage/unit', //Sets coverage file to be consumed by codecov.io
reports: ['lcovonly']
},
```
Once the file is generated, it can be published to codecov with
```json
"cov:unit:publish": "codecov --disable=gcov -f ./coverage/unit/lcov.info -F unit",
```
### e2e
The e2e line coverage is a bit more complex than the karma implementation. This is the general sequence of events:
1. Each e2e suite will start webpack with the ```npm run start:coverage``` command with config `webpack.coverage.mjs` and the `babel-plugin-istanbul` plugin to generate code coverage during e2e test execution using our custom [baseFixture](./baseFixtures.js).
1. During testcase execution, each e2e shard will generate its piece of the larger coverage suite. **This coverage file is not merged**. The raw coverage file is stored in a `.nyc_report` directory.
1. [nyc](https://github.com/istanbuljs/nyc) converts this directory into a `lcov` file with the following command `npm run cov:e2e:report`
1. Most of the tests focus on chrome/ubuntu at a single resolution. This coverage is published to codecov with `npm run cov:e2e:ci:publish`.
1. The rest of our coverage only appears when run against persistent datastore (couchdb), non-ubuntu machines, and non-chrome browsers with the `npm run cov:e2e:full:publish` flag. Since this happens about once a day, we have leveraged codecov.io's carryforward flag to report on lines covered outside of each commit on an individual PR.
### Limitations in our code coverage reporting
Our code coverage implementation has some known limitations:
- [Variability](https://github.com/nasa/openmct/issues/5811)
- [Accuracy](https://github.com/nasa/openmct/issues/7015)
- [Vue instrumentation gaps](https://github.com/nasa/openmct/issues/4973)
## Troubleshooting CI
The following is an evolving guide to troubleshoot CI and PR issues.
### Github Checks failing
There are a few reasons that your GitHub PR could be failing beyond simple failed tests.
* Required Checks. We're leveraging required checks in GitHub so that we can quickly and precisely control what becomes and informational failure vs a hard requirement. The only way to determine the difference between a required vs information check is check for the `(Required)` emblem next to the step details in GitHub Checks.
* Not all required checks are run per commit. You may need to manually trigger addition GitHub checks with a `pr:<label>` label added to your PR.
### Flaky tests
(CircleCI's test insights feature)[https://circleci.com/blog/introducing-test-insights-with-flaky-test-detection/] collects historical data about the individual test results for both unit and e2e tests. Note: only a 14 day window of flake is available.
### Local=Pass and CI=Fail
Although rare, it is possible that your test can pass locally but fail in CI.
### Reset your workspace
It's possible that you're running with dependencies or a local environment which is out of sync with the branch you're working on. Make sure to execute the following:
```sh
nvm use
npm run clean
npm install
```
#### Run tests in the same container as CI
In extreme cases, tests can fail due to the constraints of running within a container. To execute tests in exactly the same way as run in CircleCI.
```sh
// Replace {X.X.X} with the current Playwright version
// from our package.json or circleCI configuration file
docker run --rm --network host --cpus="2" -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v{X.X.X}-focal /bin/bash
npm install
```
At this point, you're running inside the same container and with 2 cpu cores. You can specify the unit tests:
```sh
npm run test
```
or e2e tests:
```sh
npx playwright test --config=e2e/playwright-ci.config.js --project=chrome --grep <the testcase name>
```

View File

@ -1,7 +1,7 @@
#!/bin/bash
#*****************************************************************************
#* Open MCT, Copyright (c) 2014-2023, United States Government
#* Open MCT, Copyright (c) 2014-2024, United States Government
#* as represented by the Administrator of the National Aeronautics and Space
#* Administration. All rights reserved.
#*

View File

@ -15,14 +15,14 @@ coverage:
flags:
unit:
carryforward: true
carryforward: false
e2e-ci:
carryforward: true
carryforward: false
e2e-full:
carryforward: true
comment:
layout: "reach,diff,flags,files,footer"
layout: "diff,flags,files,footer"
behavior: default
require_changes: false
show_carryforward_flags: true

View File

@ -1,5 +1,5 @@
<!--
Open MCT, Copyright (c) 2014-2023, United States Government
Open MCT, Copyright (c) 2014-2024, United States Government
as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

View File

@ -15,12 +15,12 @@
## Sections
* The [API](api/) uses inline documentation
* The [API](api/) uses inline documentation.
using [TypeScript](https://www.typescriptlang.org) and some legacy [JSDoc](https://jsdoc.app/). It describes the JavaScript objects and
functions that make up the software platform.
* The [Development Process](process/) document describes the
Open MCT software development cycle.
* The [Tutorials](https://github.com/nasa/openmct-tutorial) give examples of extending the platform to add
functionality, and integrate with data sources.
* The [tutorial](https://github.com/nasa/openmct-tutorial) and [plugin template](https://github.com/nasa/openmct-hello) give examples of extending the platform to add
functionality and integrate with data sources.

View File

@ -133,7 +133,7 @@ emphasis on testing.
Multi-user testing, involving as many users as
is feasible, plus development team. Open-ended; should verify
completed work from this sprint using the sprint branch, test
exploratorily for regressions, et cetera.
exploratory for regressions, et cetera.
* [__Long-Duration Test.__](testing/plan.md#long-duration-testing) A
test to verify that the software remains
stable after running for longer durations. May include some

View File

@ -0,0 +1,30 @@
# Release of NASA Open MCT NPM Package
This document outlines the process and key considerations for releasing a new version of the NASA Open MCT project as an NPM (Node Package Manager) package.
## 1. Pre-requisites
Before releasing a new version of the NASA Open MCT NPM package, ensure all dependencies are updated, and comprehensive tests are performed. This ensures compatibility and performance of the Open MCT within the Node.js ecosystem.
## 2. Versioning
Versioning is a critical step for package release. The Open MCT team follows [Semantic Versioning (SemVer)](https://semver.org) that consists of three major components: MAJOR.MINOR.PATCH. These ensure a structured process for updating, bug fixes, backward compatibility, and software progress.
## 3. Changelog Maintenance
A comprehensive changelog file, `CHANGELOG.md`, documents any changes, adding a high level of transparencies for anyone desiring to look into the status of new and past progress. It includes the summation of any major new enhancements, changes, bug fixes, and the credits to the users responsible for each unique progress.
## 4. Notable Changes Labels on GitHub PRs
For the Open MCT package, we leverage GitHub's Pull Request (PR) mechanisms extensively, with three important PR labels dedicated to signifying 'notable_changes':
- **Breaking Change** Highlights the integration of changes that are suspected to break, or without a doubt will break, backward compatibility. These should signal to users the upgrade might be seamless only if dependency and integration factors are properly managed, if not, one should expect to manage atypical technical snags.
- **API change** Signifies when a contribution makes any complete or under layer changes to the communication or its supporting access processes. This label flags required see-through insight on how the web-based control panel sees and manipulates any value and or network logs.
- **Default Behavior Change:** In the incident an update either adjusts a form to or integrates a not previously kept setting or plugin. i.e. autoscale is enabled by default when working with plots.
## 6. Community & Contributions
A flat community and the rounded center are kept in continuous celebration, with the given station open for two open-specifying dialogues, research, and all-for development probing. State the ownership for a handed looped, a welcome for even structure-core and architectural draft and impend.
Thank you for your collaboration and commitment to moving the project onto a text big club.

View File

@ -53,7 +53,7 @@ requirements.
Additionally, the following project-specific standards will be used:
* During development, a "-SNAPSHOT" suffix shall be appended to the
* During development, a "-next" suffix shall be appended to the
version number. The version number before the suffix shall reflect
the next expected version number for release.
* Prior to a 1.0.0 release, the _minor_ version will be incremented
@ -93,7 +93,7 @@ numbers by the following process:
1. Update version number in `package.json`
1. Checkout branch created for the last sprint that has been successfully tested.
2. Remove a `-SNAPSHOT` suffix from the version in `package.json`.
2. Remove a `-next` suffix from the version in `package.json`.
3. Verify that resulting version number meets semantic versioning
requirements relative to previous stable version. Increment the
version number if necessary.
@ -132,13 +132,13 @@ numbers by the following process:
4. Test the package before publishing by doing `npm publish --dry-run`
if necessary.
5. Publish the package to the npmjs registry (e.g. `npm publish --access public`)
NOTE: Use the `--tag unstable` flag to the npm publishj if this is a prerelease.
NOTE: Use the `--tag unstable` flag to the npm publish if this is a prerelease.
6. Confirm the package has been published (e.g. `https://www.npmjs.com/package/openmct`)
5. Update snapshot status in `package.json`
1. Create a new branch off the `master` branch.
2. Remove any suffix from the version number,
or increment the _patch_ version if there is no suffix.
3. Append a `-SNAPSHOT` suffix.
3. Append a `-next` suffix.
4. Commit changes to `package.json` on the `master` branch.
The commit message should reference the sprint being opened,
preferably by a URL reference to the associated Milestone in
@ -150,6 +150,6 @@ numbers by the following process:
Projects dependent on Open MCT being co-developed by the Open MCT
team should follow a similar process, except that they should
additionally update their dependency on Open MCT to point to the
latest archive when removing their `-SNAPSHOT` status, and
latest archive when removing their `-next` status, and
that they should be pointed back to the `master` branch after
this has completed.

38
e2e/.eslintrc.cjs Normal file
View File

@ -0,0 +1,38 @@
/* eslint-disable no-undef */
module.exports = {
extends: ['plugin:playwright/recommended'],
rules: {
'playwright/max-nested-describe': ['error', { max: 1 }],
'playwright/expect-expect': 'off'
},
overrides: [
{
//Apply Best Practices to externalFixtures and exampleTemplate.e2e.spec.js
files: [
'appActions.js',
'baseFixtures.js',
'pluginFixtures.js',
'**/exampleTemplate.e2e.spec.js'
],
rules: {
'playwright/no-raw-locators': 'error',
'playwright/no-nth-methods': 'error',
'playwright/no-get-by-title': 'error',
'playwright/prefer-comparison-matcher': 'error'
}
},
{
// Disable no-raw-locators for .contract.perf.spec.js files until https://github.com/grafana/xk6-browser/issues/1226
files: ['**/*.contract.perf.spec.js'],
rules: {
'playwright/no-raw-locators': 'off'
}
},
{
files: ['**/*.visual.spec.js'],
rules: {
'playwright/no-networkidle': 'off' //https://github.com/nasa/openmct/issues/7549
}
}
]
};

View File

@ -1,15 +0,0 @@
/* eslint-disable no-undef */
module.exports = {
"extends": ["plugin:playwright/playwright-test"],
"rules": {
"playwright/max-nested-describe": ["error", { "max": 1 }]
},
"overrides": [
{
"files": ["tests/visual/*.spec.js"],
"rules": {
"playwright/no-wait-for-timeout": "off"
}
}
]
};

7
e2e/.npmignore Normal file
View File

@ -0,0 +1,7 @@
*
!appActions.js
!baseFixtures.js
!pluginFixtures.js
!avpFixtures.js
!index.js
!*.md

44
e2e/.percy.ci.yml Normal file
View File

@ -0,0 +1,44 @@
version: 2
snapshot:
widths: [1024]
min-height: 1440 # px
percyCSS: |
/* Clock indicator... your days are numbered */
.t-indicator-clock > .label {
opacity: 0 !important;
}
.c-input--datetime {
opacity: 0 !important;
}
/* Timer object text */
.c-ne__time-and-creator {
opacity: 0 !important;
}
/* Time Conductor ticks */
div.c-conductor-axis.c-conductor__ticks > svg {
opacity: 0 !important;
}
/* Embedded timestamp in notebooks */
.c-ne__embed__time{
opacity: 0 !important;
}
/* Time Conductor Start Time */
.c-compact-tc__setting-value{
opacity: 0 !important;
}
/* Chart Area for Plots */
.gl-plot-chart-area{
opacity: 0 !important;
}
/* SWG Time values on plot */
.gl-plot-x{
opacity: 0 !important;
}
/* Notification Time in modal */
.c-ne__time{
opacity: 0 !important;
}
/* Snapshot name with embedded time */
.l-browse-bar__snapshot-datetime{
opacity: 0 !important;
}

44
e2e/.percy.nightly.yml Normal file
View File

@ -0,0 +1,44 @@
version: 2
snapshot:
widths: [1024, 2000]
min-height: 1440 # px
percyCSS: |
/* Clock indicator... your days are numbered */
.t-indicator-clock > .label {
opacity: 0 !important;
}
.c-input--datetime {
opacity: 0 !important;
}
/* Timer object text */
.c-ne__time-and-creator {
opacity: 0 !important;
}
/* Time Conductor ticks */
div.c-conductor-axis.c-conductor__ticks > svg {
opacity: 0 !important;
}
/* Embedded timestamp in notebooks */
.c-ne__embed__time{
opacity: 0 !important;
}
/* Time Conductor Start Time */
.c-compact-tc__setting-value{
opacity: 0 !important;
}
/* Chart Area for Plots */
.gl-plot-chart-area{
opacity: 0 !important;
}
/* SWG Time values on plot */
.gl-plot-x{
opacity: 0 !important;
}
/* Notification Time in modal */
.c-ne__time{
opacity: 0 !important;
}
/* Snapshot name with embedded time */
.l-browse-bar__snapshot-datetime{
opacity: 0 !important;
}

View File

@ -1,6 +0,0 @@
version: 2
snapshot:
widths: [1024, 2000]
min-height: 1440 # px
discovery:
concurrency: 2 # https://github.com/percy/cli/discussions/1067

View File

@ -51,11 +51,13 @@ Next, you should walk through our implementation of Playwright in Open MCT:
## Types of e2e Testing
e2e testing describes the layer at which a test is performed without prescribing the assertions which are made. Generally, when writing an e2e test, we have three choices to make on an assertion strategy:
e2e testing describes the layer at which a test is performed without prescribing the assertions which are made. Generally, when writing an e2e test, we have five choices to make on an assertion strategy:
1. Functional - Verifies the functional correctness of the application. Sometimes interchanged with e2e or regression testing.
2. Visual - Verifies the "look and feel" of the application and can only detect _undesirable changes when compared to a previous baseline_.
3. Snapshot - Similar to Visual in that it captures the "look" of the application and can only detect _undesirable changes when compared to a previous baseline_. **Generally not preferred due to advanced setup necessary.**
4. Accessibility - Verifies that the application meets the accessibility standards defined by the [WCAG organization](https://www.w3.org/WAI/standards-guidelines/wcag/).
5. Performance - Verifies that application provides a performant experience. Like Snapshot testing, these tests are generally not recommended due to their difficulty in providing a consistent result.
When choosing between the different testing strategies, think only about the assertion that is made at the end of the series of test steps. "I want to verify that the Timer plugin functions correctly" vs "I want to verify that the Timer plugin does not look different than originally designed".
@ -72,19 +74,32 @@ Visual Testing is an essential part of our e2e strategy as it ensures that the a
For a better understanding of the visual issues which affect Open MCT, please see our bug tracker with the `label:visual` filter applied [here](https://github.com/nasa/openmct/issues?q=label%3Abug%3Avisual+)
To read about how to write a good visual test, please see [How to write a great Visual Test](#how-to-write-a-great-visual-test).
`npm run test:e2e:visual` will run all of the visual tests against a local instance of Open MCT. If no `PERCY_TOKEN` API key is found in the terminal or command line environment variables, no visual comparisons will be made.
`npm run test:e2e:visual` commands will run all of the visual tests against a local instance of Open MCT. If no `PERCY_TOKEN` API key is found in the terminal or command line environment variables, no visual comparisons will be made.
- `npm run test:e2e:visual:ci` will run against every commit and PR.
- `npm run test:e2e:visual:full` will run every night with additional comparisons made for Larger Displays and with the `snow` theme.
#### Percy.io
To make this possible, we're leveraging a 3rd party service, [Percy](https://percy.io/). This service maintains a copy of all changes, users, scm-metadata, and baselines to verify that the application looks and feels the same _unless approved by a Open MCT developer_. To request a Percy API token, please reach out to the Open MCT Dev team on GitHub. For more information, please see the official [Percy documentation](https://docs.percy.io/docs/visual-testing-basics)
To make this possible, we're leveraging a 3rd party service, [Percy](https://percy.io/). This service maintains a copy of all changes, users, scm-metadata, and baselines to verify that the application looks and feels the same _unless approved by a Open MCT developer_. To request a Percy API token, please reach out to the Open MCT Dev team on GitHub. For more information, please see the official [Percy documentation](https://docs.percy.io/docs/visual-testing-basics).
### (Advanced) Snapshot Testing
At present, we are using percy with two configuration files: `./e2e/.percy.nightly.yml` and `./e2e/.percy.ci.yml`. This is mainly to reduce the number of snapshots.
Snapshot testing is very similar to visual testing but allows us to be more precise in detecting change without relying on a 3rd party service. Unfortuantely, this precision requires advanced test setup and teardown and so we're using this pattern as a last resort.
### Advanced: Snapshot Testing (Not Recommended)
To give an example, if a _single_ visual test assertion for an Overlay plot is run through multiple DOM rendering engines at various viewports to see how the Plot looks. If that same test were run as a snapshot test, it could only be executed against a single browser, on a single platform (ubuntu docker container).
While snapshot testing offers a precise way to detect changes in your application without relying on third-party services like Percy.io, we've found that it doesn't offer any advantages over visual testing in our use-cases. Therefore, snapshot testing is **not recommended** for further implementation.
Read more about [Playwright Snapshots](https://playwright.dev/docs/test-snapshots)
#### CI vs Manual Checks
Snapshot tests can be reliably executed in Continuous Integration (CI) environments but lack the manual oversight provided by visual testing platforms like Percy.io. This means they may miss issues that a human reviewer could catch during manual checks.
#### Example
A single visual test assertion in Percy.io can be executed across 10 different browser and resolution combinations without additional setup, providing comprehensive testing with minimal configuration. In contrast, a snapshot test is restricted to a single OS and browser resolution, requiring more effort to achieve the same level of coverage.
#### Further Reading
For those interested in the mechanics of snapshot testing with Playwright, you can refer to the [Playwright Snapshots Documentation](https://playwright.dev/docs/test-snapshots). However, keep in mind that we do not recommend using this approach.
#### Open MCT's implementation
@ -96,7 +111,7 @@ Read more about [Playwright Snapshots](https://playwright.dev/docs/test-snapshot
// from our package.json or circleCI configuration file
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v{X.X.X}-focal /bin/bash
npm install
npx playwright test --config=e2e/playwright-ci.config.js --project=chrome --grep @snapshot
npm run test:e2e:checksnapshots
```
### Updating Snapshots
@ -105,14 +120,6 @@ When the `@snapshot` tests fail, they will need to be evaluated to determine if
To compare a snapshot, run a test and open the html report with the 'Expected' vs 'Actual' screenshot. If the actual screenshot is preferred, then the source-controlled 'Expected' snapshots will need to be updated with the following scripts.
MacOS
```
npm run test:e2e:updatesnapshots
```
Linux/CI
```sh
// Replace {X.X.X} with the current Playwright version
// from our package.json or circleCI configuration file
@ -121,34 +128,76 @@ npm install
npm run test:e2e:updatesnapshots
```
Once that's done, you'll need to run the following to verify that the changes do not cause more problems:
```sh
npm run test:e2e:checksnapshots
```
## Automated Accessibility (a11y) Testing
Open MCT incorporates accessibility testing through two primary methods to ensure its compliance with accessibility standards:
1. **Usage of Playwright's Locator Strategy**: Open MCT utilizes Playwright's locator strategy, specifically the [page.getByRole('') function](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role), to ensure that web elements are accessible via assistive technologies. This approach focuses on the accessibility of elements rather than full adherence to a11y guidelines, which is covered in the second method.
2. **Enforcing a11y Guidelines with Playwright Axe Plugin**: To rigorously enforce a11y guideline compliance, Open MCT employs the [playwright axe plugin](https://playwright.dev/docs/accessibility-testing). This is achieved through the `scanForA11yViolations` function within the visual testing suite. This method not only benefits from the existing coverage of the visual tests but also targets specific a11y issues, such as `color-contrast` violations, which are particularly pertinent in the context of visual testing.
### a11y Standards (WCAG and Section 508)
Playwright axe supports a wide range of [WCAG Standards](https://playwright.dev/docs/accessibility-testing#scanning-for-wcag-violations) to test against. Open MCT is testing against the [Section 508](https://www.section508.gov/test/testing-overview/) accessibility guidelines with the intent to support higher standards over time. As of 2024, Section508 requirements now map completely to WCAG 2.0 AA. In the future, Section 508 requirements may map to WCAG 2.1 AA.
### Reading an a11y test failure
When an a11y test fails, the result must be interpreted in the html test report or the a11y report json artifact stored in the `/test-results/` folder. The json structure should be parsed for `"violations"` by `"id"` and identified `"target"`. Example provided for the 'color-contrast-enhanced' violation.
```json
"violations":
{
"id": "color-contrast-enhanced",
"impact": "serious",
"html": "<span class=\"label c-indicator__label\">0 Snapshots <button aria-label=\"Show Snapshots\">Show</button></span>",
"target": [
".s-status-off > .label.c-indicator__label"
],
"failureSummary": "Fix any of the following:\n Element has insufficient color contrast of 6.51 (foreground color: #aaaaaa, background color: #262626, font size: 8.1pt (10.8px), font weight: normal). Expected contrast ratio of 7:1"
}
```
## Performance Testing
The open source performance tests function mostly as a contract for the locator logic, functionality, and assumptions will work in our downstream, closed source test suites.
The open source performance tests function in three ways which match their naming and folder structure:
They're found under `./e2e/tests/performance` and are to be executed with the following npm script:
`npm run test:perf`
`tests/performance` - The tests at the root of this folder path detect functional changes which are mostly apparent with large performance regressions like [this](https://github.com/nasa/openmct/issues/6879). These tests run against openmct webpack in `production-mode` with the `npm run test:perf:localhost` script.
`tests/performance/contract/` - These tests serve as [contracts](https://martinfowler.com/bliki/ContractTest.html) for the locator logic, functionality, and assumptions will work in our downstream, closed source test suites. These tests run against openmct webpack in `dev-mode` with the `npm run test:perf:contract` script.
`tests/performance/memory/` - These tests execute memory leak detection checks in various ways. This is expected to evolve as we move to the `memlab` project. These tests run against openmct webpack in `production-mode` with the `npm run test:perf:memory` script.
These tests are expected to become blocking and gating with assertions as we extend the capabilities of Playwright.
In addition to the explicit definition of performance tests, we also ensure that our test timeout timing is "tight" to catch performance regressions detectable by action timeouts. i.e. [Notebooks load much slower than they used to #6459](https://github.com/nasa/openmct/issues/6459)
## Test Architecture and CI
### Architecture (TODO)
### Architecture
### File Structure
Our file structure follows the type of type of testing being excercised at the e2e layer and files containing test suites which matcher application behavior or our `src` and `example` layout. This area is not well refined as we figure out what works best for closed source and downstream projects. This may change altogether if we move `e2e` to it's own npm package.
Our file structure follows the type of type of testing being exercised at the e2e layer and files containing test suites which matcher application behavior or our `src` and `example` layout. This area is not well refined as we figure out what works best for closed source and downstream projects. This may change altogether if we move `e2e` to it's own npm package.
- `./helper` - contains helper functions or scripts which are leveraged directly within the testsuites. i.e. non-default plugin scripts injected into DOM
- `./test-data` - contains test data which is leveraged or generated in the functional, performance, or visual test suites. i.e. localStorage data
- `./tests/functional` - the bulk of the tests are contained within this folder to verify the functionality of open mct
- `./tests/functional/example/` - tests which specifically verify the example plugins
- `./tests/functional/plugins/` - tests which loosely test each plugin. This folder is the most likely to change. Note: some @snapshot tests are still contained within this structure
- `./tests/framework/` - tests which verify that our testframework functionality and assumptions will continue to work based on further refactoring or playwright version changes
- `./tests/performance/` - performance tests
- `./tests/visual/` - Visual tests
- `./appActions.js` - Contains common fixtures which can be leveraged by testcase authors to quickly move through the application when writing new tests.
- `./baseFixture.js` - Contains base fixtures which only extend default `@playwright/test` functionality. The goal is to remove these fixtures as native Playwright APIs improve.
|File Path|Description|
|:-:|-|
|`./helper` | Contains helper functions or scripts which are leveraged directly within the test suites (e.g.: non-default plugin scripts injected into the DOM)|
|`./test-data` | Contains test data which is leveraged or generated in the functional, performance, or visual test suites (e.g.: localStorage data).|
|`./tests/functional` | The bulk of the tests are contained within this folder to verify the functionality of Open MCT.|
|`./tests/functional/example/` | Tests which specifically verify the example plugins (e.g.: Sine Wave Generator).|
|`./tests/functional/plugins/` | Tests which loosely test each plugin. This folder is the most likely to change. Note: some `@snapshot` tests are still contained within this structure.|
|`./tests/framework/` | Tests which verify that our testing framework's functionality and assumptions will continue to work based on further refactoring or Playwright version changes (e.g.: verifying custom fixtures and appActions).|
|`./tests/performance/` | Performance tests which should be run on every commit.|
|`./tests/performance/contract/` | A subset of performance tests which are designed to provide a contract between the open source tests which are run on every commit and the downstream tests which are run post merge and with other frameworks.|
|`./tests/performance/memory` | A subset of performance tests which are designed to test for memory leaks.|
|`./tests/visual-a11y/` | Visual tests and accessibility tests.|
|`./tests/visual-a11y/component/` | Visual and accessibility tests which are only run against a single component.|
|`./appActions.js` | Contains common methods which can be leveraged by test case authors to quickly move through the application when writing new tests.|
|`./baseFixture.js` | Contains base fixtures which only extend default `@playwright/test` functionality. The expectation is that these fixtures will be removed as the native Playwright API improves|
Our functional tests end in `*.e2e.spec.js`, visual tests in `*.visual.spec.js` and performance tests in `*.perf.spec.js`.
@ -158,10 +207,13 @@ Where possible, we try to run Open MCT without modification or configuration cha
Open MCT is leveraging the [config file](https://playwright.dev/docs/test-configuration) pattern to describe the capabilities of Open MCT e2e _where_ it's run
- `./playwright-ci.config.js` - Used when running in CI or to debug CI issues locally
- `./playwright-local.config.js` - Used when running locally
- `./playwright-performance.config.js` - Used when running performance tests in CI or locally
- `./playwright-visual.config.js` - Used to run the visual tests in CI or locally
|Config File|Description|
|:-:|-|
|`./playwright-ci.config.js` | Used when running in CI or to debug CI issues locally|
|`./playwright-local.config.js` | Used when running locally|
|`./playwright-performance.config.js` | Used when running performance tests in CI or locally|
|`./playwright-performance-devmode.config.js` | Used when running performance tests in CI or locally|
|`./playwright-visual-a11y.config.js` | Used to run the visual and a11y tests in CI or locally|
#### Test Tags
@ -169,17 +221,21 @@ Test tags are a great way of organizing tests outside of a file structure. To le
Current list of test tags:
- `@ipad` - Test case or test suite is compatible with Playwright's iPad support and Open MCT's read-only mobile view (i.e. no Create button).
- `@gds` - Denotes a GDS Test Case used in the VIPER Mission.
- `@addInit` - Initializes the browser with an injected and artificial state. Useful for loading non-default plugins. Likely will not work outside of `npm start`.
- `@localStorage` - Captures or generates session storage to manipulate browser state. Useful for excluding in tests which require a persistent backend (i.e. CouchDB).
- `@snapshot` - Uses Playwright's snapshot functionality to record a copy of the DOM for direct comparison. Must be run inside of the playwright container.
- `@unstable` - A new test or test which is known to be flaky.
- `@2p` - Indicates that multiple users are involved, or multiple tabs/pages are used. Useful for testing multi-user interactivity.
|Test Tag|Description|
|:-:|-|
|`@mobile` | Test case or test suite is compatible with Playwright's iPad support and Open MCT's read-only mobile view (i.e. no create button).|
|`@a11y` | Test case or test suite to execute playwright-axe accessibility checks and generate a11y reports.|
|`@addInit` | Initializes the browser with an injected and artificial state. Useful for loading non-default plugins. Likely will not work outside of `npm start`.|
|`@localStorage` | Captures or generates session storage to manipulate browser state. Useful for excluding in tests which require a persistent backend (i.e. CouchDB). See [note](#utilizing-localstorage)|
|`@snapshot` | Uses Playwright's snapshot functionality to record a copy of the DOM for direct comparison. Must be run inside of the playwright container.|
|`@2p` | Indicates that multiple users are involved, or multiple tabs/pages are used. Useful for testing multi-user interactivity.|
|`@generatedata` | Indicates that a test is used to generate testdata or test the generated test data. Usually to be associated with localstorage, but this may grow over time.|
|`@clock` | A test which modifies the clock. These have expanded out of the visual tests and into the functional tests.
|`@framework` | A test for open mct e2e capabilities. This is primarily to ensure we don't break projects which depend on sourcing this project's fixtures like appActions.js.
### Continuous Integration
The cheapest time to catch a bug is pre-merge. Unfortuantely, this is the most expensive time to run all of the tests since each merge event can consist of hundreds of commits. For this reason, we're selective in _what we run_ as much as _when we run it_.
The cheapest time to catch a bug is pre-merge. Unfortunately, this is the most expensive time to run all of the tests since each merge event can consist of hundreds of commits. For this reason, we're selective in _what we run_ as much as _when we run it_.
We leverage CircleCI to run tests against each commit and inject the Test Reports which are generated by Playwright so that they team can keep track of flaky and [historical test trends](https://app.circleci.com/insights/github/nasa/openmct/workflows/overall-circleci-commit-status/tests?branch=master&reporting-window=last-30-days)
@ -191,27 +247,30 @@ Our CI environment consists of 3 main modes of operation:
CircleCI
- Stable e2e tests against ubuntu and chrome
- e2e tests against ubuntu and chrome
- Performance tests against ubuntu and chrome
- e2e tests are linted
- Visual and a11y tests are run in a single resolution on the default `espresso` theme
#### 2. Per-Merge Testing
Github Actions / Workflow
- Full suite against all browsers/projects. Triggered with Github Label Event 'pr:e2e'
- Visual Tests. Triggered with Github Label Event 'pr:visual'
- CouchDB Tests. Triggered on PR Create and again with Github Label Event 'pr:e2e:couchdb'
#### 3. Scheduled / Batch Testing
Nightly Testing in Circle CI
- Full e2e suite against ubuntu and chrome
- Full e2e suite against ubuntu and chrome, firefox, and an MMOC resolution profile
- Performance tests against ubuntu and chrome
- CouchDB suite
- Visual and a11y Tests are run in the full profile
Github Actions / Workflow
- Visual Test baseline generation.
- None at the moment
#### Parallelism and Fast Feedback
@ -221,28 +280,17 @@ Playwright has native support for semi-intelligent sharding. Read about it [here
We will be adjusting the parallelization of the Per-Commit tests to keep below the 5 minute total runtime threshold.
In addition to the Parallelization of Test Runners (Sharding), we're also running two concurrent threads on every Shard. This is the functional limit of what CircelCI Agents can support from a memory and CPU resource constraint.
In addition to the Parallelization of Test Runners (Sharding), we're also running two concurrent threads on every Shard. This is the functional limit of what CircleCI Agents can support from a memory and CPU resource constraint.
So for every commit, Playwright is effectively running 4 x 2 concurrent browsercontexts to keep the overall runtime to a miminum.
At the same time, we don't want to waste CI resources on parallel runs, so we've configured each shard to fail after 5 test failures. Test failure logs are recorded and stored to allow fast triage.
#### Test Promotion
In order to maintain fast and reliable feedback, tests go through a promotion process. All new test cases or test suites must be labeled with the `@unstable` annotation. The Open MCT dev team runs these unstable tests in our private repos to ensure they work downstream and are reliable.
To run the stable tests, use the ```npm run test:e2e:stable``` command. To run the new and flaky tests, use the ```npm run test:e2e:unstable``` command.
A testcase and testsuite are to be unmarked as @unstable when:
1. They run as part of "full" run 5 times without failure.
2. They've been by a Open MCT Developer 5 times in the closed source repo without failure.
### Cross-browser and Cross-operating system
#### **What's supported:**
We are leveraging the `browserslist` project to declare our supported list of browsers.
We are leveraging the `browserslist` project to declare our supported list of browsers. We support macOS, Windows, and ubuntu 20+.
#### **Where it's tested:**
@ -256,10 +304,24 @@ We also have the need to execute our e2e tests across this published list of bro
- A stable version of Chromium from the official chromium channels. This is always at least 1 version ahead of desktop chrome.
- `playwright-chrome`
- The stable channel of Chrome from the official chrome channels. This is always 2 versions behind chromium.
- `playwright-firefox`
- Firefox Latest Stable. Modified slightly by the playwright team to support a CDP Shim.
In terms of operating system testing, we're only limited by what the CI providers are able to support. The bulk of our testing is performed on the official playwright container which is based on ubuntu. Github Actions allows us to use `windows-latest` and `mac-latest` and is run as needed.
#### **Mobile**
We have the Mission-need to support iPad. To run our iPad suite, please see our `playwright-*.config.js` with the 'iPad' project.
We have a Mission-need to support iPad and mobile devices. To run our test suites with mobile devices, please see our `playwright-mobile.config.js` projects.
In general, our test suite is not designed to run against mobile devices as the mobile experience is a focused version of the application. Core functionality is missing (chiefly the 'Create' button). To bypass the object creation, we leverage the `storageState` properties for starting the mobile tests with localstorage.
For now, the mobile tests will exist in the /tests/mobile/ suites and be executed with the
```sh
npm run test:e2e:mobile
```
command.
#### **Skipping or executing tests based on browser, os, and/os browser version:**
@ -287,18 +349,77 @@ Skipping based on browser version (Rarely used): <https://github.com/microsoft/p
## Test Design, Best Practices, and Tips & Tricks
### Test Design (TODO)
### Test Design
- How to make tests robust to function in other contexts (VISTA, VIPER, etc.)
- Leverage the use of `appActions.js` methods such as `createDomainObjectWithDefaults()`
- How to make tests faster and more resilient
- When possible, navigate directly by URL
- Leverage `await page.goto('./', { waitUntil: 'networkidle' });`
- Avoid repeated setup to test to test a single assertion. Write longer tests with multiple soft assertions.
#### Test as the User
### How to write a great test (WIP)
In general, strive to test only through the UI as a user would. As stated in the [Playwright Best Practices](https://playwright.dev/docs/best-practices#test-user-visible-behavior):
> "Automated tests should verify that the application code works for the end users, and avoid relying on implementation details such as things which users will not typically use, see, or even know about such as the name of a function, whether something is an array, or the CSS class of some element. The end user will see or interact with what is rendered on the page, so your test should typically only see/interact with the same rendered output."
By adhering to this principle, we can create tests that are both robust and reflective of actual user experiences.
#### How to make tests robust to function in other contexts (VISTA, COUCHDB, YAMCS, VIPER, etc.)
1. Leverage the use of `appActions.js` methods such as `createDomainObjectWithDefaults()`. This ensures that your tests will create unique instances of objects for your test to interact with.
1. Do not assert on the order or structure of objects available unless you created them yourself. These tests may be used against a persistent datastore like couchdb with many objects in the tree.
1. Do not search for your created objects. Open MCT does not performance uniqueness checks so it's possible that your tests will break when run twice.
1. Avoid creating locator aliases. This likely means that you're compensating for a bad locator. Improve the application instead.
1. Leverage `await page.goto('./', { waitUntil: 'domcontentloaded' });` instead of `{ waitUntil: 'networkidle' }`. Tests run against deployments with websockets often have issues with the networkidle detection.
#### How to make tests faster and more resilient to application changes
1. Avoid app interaction when possible. The best way of doing this is to navigate directly by URL:
```js
// You can capture the CreatedObjectInfo returned from this appAction:
const clock = await createDomainObjectWithDefaults(page, { type: 'Clock' });
// ...and use its `url` property to navigate directly to it later in the test:
await page.goto(clock.url);
```
1. Leverage `await page.goto('./', { waitUntil: 'domcontentloaded' });`
- Initial navigation should _almost_ always use the `{ waitUntil: 'domcontentloaded' }` option.
1. Avoid repeated setup to test a single assertion. Write longer tests with multiple soft assertions.
This ensures that your changes will be picked up with large refactors.
1. Use [user-facing locators](https://playwright.dev/docs/best-practices#use-locators) (Now a eslint rule!)
```js
page.getByRole('button', { name: 'Create' } )
```
Instead of
```js
page.locator('.c-create-button')
```
Note: `page.locator()` can be used in performance tests as xk6-browser does not yet support the new `page.getBy` pattern and css lookups can be [1.5x faster](https://serpapi.com/blog/css-selectors-faster-than-getbyrole-playwright/)
##### Utilizing LocalStorage
1. In order to save test runtime in the case of tests that require a decent amount of initial setup (such as in the case of testing complex displays), you may use [Playwright's `storageState` feature](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state) to generate and load localStorage states.
1. To generate a localStorage state to be used in a test:
- Add an e2e test to our generateLocalStorageData suite which sets the initial state (creating/configuring objects, etc.), saving it in the `test-data` folder:
```js
// Save localStorage for future test execution
await context.storageState({
path: path.join(__dirname, '../../../e2e/test-data/display_layout_with_child_layouts.json')
});
```
- Load the state from file at the beginning of the desired test suite (within the `test.describe()`). (NOTE: the storage state will be used for each test in the suite, so you may need to create a new suite):
```js
const LOCALSTORAGE_PATH = path.resolve(
__dirname,
'../../../../test-data/display_layout_with_child_layouts.json'
);
test.use({
storageState: path.resolve(__dirname, LOCALSTORAGE_PATH)
});
```
### How to write a great test
- Avoid using css locators to find elements to the page. Use modern web accessible locators like `getByRole`
- Use our [App Actions](./appActions.js) for performing common actions whenever applicable.
- Use `waitForPlotsToRender()` before asserting against anything that is dependent upon plot series data being loaded and drawn.
- If you create an object outside of using the `createDomainObjectWithDefaults` App Action, make sure to fill in the 'Notes' section of your object with `page.testNotes`:
```js
@ -309,7 +430,46 @@ Skipping based on browser version (Rarely used): <https://github.com/microsoft/p
await notesInput.fill(testNotes);
```
#### How to write a great visual test (TODO)
#### How to Write a Great Visual Test
1. **Look for the Unknown Unknowns**: Avoid asserting on specific differences in the visual diff. Visual tests are most effective for identifying unknown unknowns.
2. **Get the App into Interesting States**: Prioritize getting Open MCT into unusual layouts or behaviors before capturing a visual snapshot. For instance, you could open a dropdown menu.
3. **Expect the Unexpected**: Use functional expect statements only to verify assumptions about the state between steps. A great visual test doesn't fail during the test itself, but rather when changes are reviewed in Percy.io.
4. **Control Variability**: Account for variations inherent in working with time-based telemetry and clocks.
- Utilize `percyCSS` to ignore time-based elements. For more details, consult our [percyCSS file](./.percy.ci.yml).
- Use Open MCT's fixed-time mode unless explicitly testing realtime clock
- Employ the `createExampleTelemetryObject` appAction to source telemetry and specify a `name` to avoid autogenerated names.
- Avoid creating objects with a time component like timers and clocks.
- Utilize the playwright clock() API. See @clock Annotations for examples.
5. **Hide the Tree and Inspector**: Generally, your test will not require comparisons involving the tree and inspector. These aspects are covered in component-specific tests (explained below). To exclude them from the comparison by default, navigate to the root of the main view with the tree and inspector hidden:
- `await page.goto('./#/browse/mine?hideTree=true&hideInspector=true')`
6. **Component-Specific Tests**: If you wish to focus on a particular component, use the `/visual-a11y/component/` folder and limit the scope of the comparison to that component. For instance:
```js
await percySnapshot(page, `Tree Pane w/ single level expanded (theme: ${theme})`, {
scope: treePane
});
```
- Note: The `scope` variable can be any valid CSS selector.
7. **Write many `percySnapshot` commands in a single test**: In line with our approach to longer functional tests, we recommend that many test percySnapshots are taken in a single test. For instance:
```js
//<Some interesting state>
await percySnapshot(page, `Before object expanded (theme: ${theme})`);
//<Click on object>
await percySnapshot(page, `object expanded (theme: ${theme})`);
//Select from object
await percySnapshot(page, `object selected (theme: ${theme})`)
```
8. **Use `networkidle` to wait for network requests to complete**: This is necessary to ensure that all network requests have completed before taking a snapshot. This ensures that icons are loaded and other assets are available. https://github.com/nasa/openmct/issues/7549
#### How to write a great network test
@ -326,12 +486,55 @@ For now, our best practices exist as self-tested, living documentation in our [e
For best practices with regards to mocking network responses, see our [couchdb.e2e.spec.js](./tests/functional/couchdb.e2e.spec.js) file.
### Tips & Tricks (TODO)
### Tips & Tricks
The following contains a list of tips and tricks which don't exactly fit into a FAQ or Best Practices doc.
- (Advanced) Overriding the Browser's Clock
It is possible to override the browser's clock in order to control time-based elements. Since this can cause unwanted behavior -- i.e. Tree not rendering -- only use this sparingly. Use the `page.clock()` API as such:
```js
import { test, expect } from '../../pluginFixtures.js';
test.describe('foo test suite @clock', () => {
test.beforeEach(async ({ page }) => {
//Set clock time
await page.clock.install({ time: MISSION_TIME });
await page.clock.resume();
//Navigate to page with new clock
await page.goto('./', { waitUntil: 'domcontentloaded' });
});
test('bar here', async ({ page }) => {
/// ...
});
```
- Working with multiple pages
There are instances where multiple browser pages will need to be opened to verify multi-page or multi-tab application behavior.
There are instances where multiple browser pages will needed to verify multi-page or multi-tab application behavior. Make sure to use the `@2p` annotation as well as name each page appropriately: i.e. `page1` and `page2` or `tab1` and `tab2` depending on the intended use case. Generally pages should be used unless testing `sharedWorker` code, specifically.
- Working with file downloads and JSON data
Open MCT has the capability of exporting certain objects in the form of a JSON file handled by the chrome browser. The best example of this type of test can be found in the exportAsJson test.
```js
const [download] = await Promise.all([
page.waitForEvent('download'), // Waits for the download event
page.getByLabel('Export as JSON').click() // Triggers the download
]);
// Wait for the download process to complete
const path = await download.path();
// Read the contents of the downloaded file using readFile from fs/promises
const fileContents = await fs.readFile(path, 'utf8');
const jsonData = JSON.parse(fileContents);
// Use the function to retrieve the key
const key = getFirstKeyFromOpenMctJson(jsonData);
// Verify the contents of the JSON file
expect(jsonData.openmct[key]).toHaveProperty('name', 'e2e folder');
```
### Reporting
@ -345,25 +548,17 @@ We leverage the following official Playwright reporters:
- Tracefile
- Screenshots
When running the tests locally with the `npm run test:local` command, the html report will open automatically on failure. Inside this HTML report will be a complete summary of the finished tests. If the tests failed, you'll see embedded links to screenshot failure, execution logs, and the Tracefile.
When running the tests locally with the `npm run test:e2e:local` command, the html report will open automatically on failure. Inside this HTML report will be a complete summary of the finished tests. If the tests failed, you'll see embedded links to screenshot failure, execution logs, and the Tracefile.
When looking at the reports run in CI, you'll leverage this same HTML Report which is hosted either in CircleCI or Github Actions as a build artifact.
### e2e Code Coverage
Code coverage is collected during test execution using our custom [baseFixture](./baseFixtures.js). The raw coverage files are stored in a `.nyc_report` directory to be converted into a lcov file with the following [nyc](https://github.com/istanbuljs/nyc) command:
Our e2e code coverage is captured and combined with our unit test coverage. For more information, please see our [code coverage documentation](../TESTING.md)
```npm run cov:e2e:report```
#### Generating e2e code coverage
At this point, the nyc linecov report can be published to [codecov.io](https://about.codecov.io/) with the following command:
```npm run cov:e2e:stable:publish``` for the stable suite running in ubuntu.
or
```npm run cov:e2e:full:publish``` for the full suite running against all available platforms.
Codecov.io will combine each of the above commands with [Codecov.io Flags](https://docs.codecov.com/docs/flags). Effectively, this allows us to combine multiple reports which are run at various stages of our CI Pipeline or run as part of a parallel process.
This e2e coverage is combined with our unit test report to give a comprehensive (if flawed) view of line coverage.
Please read more about our code coverage [here](../TESTING.md#code-coverage)
## Other
@ -413,10 +608,20 @@ A single e2e test in Open MCT is extended to run:
- How is Open MCT extending default Playwright functionality?
- What about Component Testing?
### Troubleshooting
### Writing Tests
Playwright provides 3 supported methods of debugging and authoring tests:
- A 'watch mode' for running tests locally and debugging on the fly
- A 'debug mode' for debugging tests and writing assertions against tests
- A 'VSCode plugin' for debugging tests within the VSCode IDE.
Generally, we encourage folks to use the watch mode and provide a script `npm run test:e2e:watch` which launches the launch mode ui and enables hot reloading on the dev server.
### e2e Troubleshooting
Please follow the general guide troubleshooting in [the general troubleshooting doc](../TESTING.md#troubleshooting-ci)
- Why is my test failing on CI and not locally?
- How can I view the failing tests on CI?
- Tests won't start because 'Error: <http://localhost:8080/># is already used...'
This error will appear when running the tests locally. Sometimes, the webserver is left in an orphaned state and needs to be cleaned up. To clear up the orphaned webserver, execute the following from your Terminal:
```lsof -n -i4TCP:8080 | awk '{print$2}' | tail -1 | xargs kill -9```

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@ -53,15 +53,19 @@
* @property {import('../src/api/notifications/NotificationAPI').NotificationOptions} [notificationOptions] additional options
*/
const Buffer = require('buffer').Buffer;
const genUuid = require('uuid').v4;
import { expect } from '@playwright/test';
import { Buffer } from 'buffer';
import { v4 as genUuid } from 'uuid';
/**
* This common function creates a domain object with the default options. It is the preferred way of creating objects
* in the e2e suite when uninterested in properties of the objects themselves.
*
* @param {import('@playwright/test').Page} page
* @param {CreateObjectOptions} options
* @param {import('@playwright/test').Page} page - The Playwright page object.
* @param {Object} options - Options for creating the domain object.
* @param {string} options.type - The type of domain object to create (e.g., "Sine Wave Generator").
* @param {string} [options.name] - The desired name of the created domain object.
* @param {string | import('../src/api/objects/ObjectAPI').Identifier} [options.parent='mine'] - The Identifier or uuid of the parent object. Defaults to 'mine' folder
* @returns {Promise<CreatedObjectInfo>} An object containing information about the newly created domain object.
*/
async function createDomainObjectWithDefaults(page, { type, name, parent = 'mine' }) {
@ -73,34 +77,26 @@ async function createDomainObjectWithDefaults(page, { type, name, parent = 'mine
// 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}?hideTree=true`);
await page.waitForLoadState('networkidle');
await page.goto(parentUrl);
// Click the Create button
await page.click('button:has-text("Create")');
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"]');
await nameInput.fill("");
await nameInput.fill(name);
// Fill in the name of the object
await page.getByLabel('Title', { exact: true }).fill('');
await page.getByLabel('Title', { exact: true }).fill(name);
if (page.testNotes) {
// Fill the "Notes" section with information about the
// currently running test and its project.
const notesInput = page.locator('form[name="mctForm"] #notes-textarea');
await notesInput.fill(page.testNotes);
// eslint-disable-next-line playwright/no-raw-locators
await page.locator('#notes-textarea').fill(page.testNotes);
}
// Click OK button and wait for Navigate event
await Promise.all([
page.waitForLoadState(),
page.click('[aria-label="Save"]'),
// Wait for Save Banner to appear
page.waitForSelector('.c-message-banner__message')
]);
await page.getByRole('button', { name: 'Save' }).click();
// Wait until the URL is updated
await page.waitForURL(`**/${parent}/*`);
@ -109,8 +105,8 @@ async function createDomainObjectWithDefaults(page, { type, name, parent = 'mine
if (await _isInEditMode(page, uuid)) {
// Save (exit edit mode)
await page.locator('button[title="Save"]').click();
await page.locator('li[title="Save and Finish Editing"]').click();
await page.getByRole('button', { name: 'Save' }).click();
await page.getByRole('listitem', { name: 'Save and Finish Editing' }).click();
}
return {
@ -140,60 +136,41 @@ async function createNotification(page, createNotificationOptions) {
}
/**
* Create a Plan object from JSON with the provided options. Must be used with a json based plan.
* Please check appActions.e2e.spec.js for an example of how to use this function.
*
* @param {import('@playwright/test').Page} page
* @param {string} name
*/
async function expandTreePaneItemByName(page, name) {
const treePane = page.getByRole('tree', {
name: 'Main Tree'
});
const treeItem = treePane.locator(`role=treeitem[expanded=false][name=/${name}/]`);
const expandTriangle = treeItem.locator('.c-disclosure-triangle');
await expandTriangle.click();
}
/**
* Create a Plan object from JSON with the provided options.
* @param {import('@playwright/test').Page} page
* @param {*} options
* @param {Object} json
* @param {string | import('../src/api/objects/ObjectAPI').Identifier} [parent] the uuid or identifier of the parent object. Defaults to 'mine'
* @returns {Promise<CreatedObjectInfo>} An object containing information about the newly created domain object.
*/
async function createPlanFromJSON(page, { name, json, parent = 'mine' }) {
if (!name) {
name = `Plan:${genUuid()}`;
}
const parentUrl = await getHashUrlToDomainObject(page, parent);
// 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}?hideTree=true`);
await page.goto(`${parentUrl}`);
// Click the Create button
await page.click('button:has-text("Create")');
await page.getByRole('button', { name: 'Create' }).click();
// Click 'Plan' menu option
await page.click(`li:text("Plan")`);
await page.getByRole('menuitem', { name: 'Plan' }).click();
// Modify the name input field of the domain object to accept 'name'
const nameInput = page.locator('form[name="mctForm"] .first input[type="text"]');
await nameInput.fill("");
await nameInput.fill(name);
// Fill in the name of the object or generate a random one
if (!name) {
name = `Plan:${genUuid()}`;
}
await page.getByLabel('Title', { exact: true }).fill('');
await page.getByLabel('Title', { exact: true }).fill(name);
// Upload buffer from memory
await page.locator('input#fileElem').setInputFiles({
await page.getByLabel('Select File...').setInputFiles({
name: 'plan.txt',
mimeType: 'text/plain',
buffer: Buffer.from(JSON.stringify(json))
});
// Click OK button and wait for Navigate event
await Promise.all([
page.waitForLoadState(),
page.click('[aria-label="Save"]'),
// Wait for Save Banner to appear
page.waitForSelector('.c-message-banner__message')
]);
await page.getByLabel('Save').click();
// Wait until the URL is updated
await page.waitForURL(`**/${parent}/*`);
@ -208,34 +185,129 @@ async function createPlanFromJSON(page, { name, json, parent = 'mine' }) {
}
/**
* Open the given `domainObject`'s context menu from the object tree.
* Expands the path to the object and scrolls to it if necessary.
*
* Create a standardized Telemetry Object (Sine Wave Generator) for use in visual tests
* and tests against plotting telemetry (e.g. logPlot tests).
* @param {import('@playwright/test').Page} page
* @param {string} url the url to the object
* @param {string | import('../src/api/objects/ObjectAPI').Identifier} [parent] the uuid or identifier of the parent object. Defaults to 'mine'
* @returns {Promise<CreatedObjectInfo>} An object containing information about the telemetry object.
*/
async function openObjectTreeContextMenu(page, url) {
await page.goto(url);
await page.click('button[title="Show selected item in tree"]');
await page.locator('.is-navigated-object').click({
button: 'right'
});
async function createExampleTelemetryObject(page, parent = 'mine') {
const parentUrl = await getHashUrlToDomainObject(page, parent);
await page.goto(`${parentUrl}`);
await page.getByRole('button', { name: 'Create' }).click();
await page.getByRole('menuitem', { name: 'Sine Wave Generator' }).click();
const name = 'VIPER Rover Heading';
await page.getByLabel('Title', { exact: true }).fill(name);
// Fill out the fields with default values
await page.getByRole('spinbutton', { name: 'Period' }).fill('10');
await page.getByRole('spinbutton', { name: 'Amplitude' }).fill('1');
await page.getByRole('spinbutton', { name: 'Offset' }).fill('0');
await page.getByRole('spinbutton', { name: 'Data Rate (hz)' }).fill('1');
await page.getByRole('spinbutton', { name: 'Phase (radians)' }).fill('0');
await page.getByRole('spinbutton', { name: 'Randomness' }).fill('0');
await page.getByRole('spinbutton', { name: 'Loading Delay (ms)' }).fill('0');
await page.getByRole('button', { name: 'Save' }).click();
// Wait until the URL is updated
await page.waitForURL(`**/${parent}/*`);
const uuid = await getFocusedObjectUuid(page);
const url = await getHashUrlToDomainObject(page, uuid);
return {
name,
uuid,
url
};
}
/**
* Expands the entire object tree (every expandable tree item).
* Create a Stable State Telemetry Object (State Generator) for use in visual tests
* and tests against plotting telemetry (e.g. logPlot tests). This will change state every 2 seconds.
* @param {import('@playwright/test').Page} page
* @param {string | import('../src/api/objects/ObjectAPI').Identifier} [parent] the uuid or identifier of the parent object. Defaults to 'mine'
* @returns {Promise<CreatedObjectInfo>} An object containing information about the telemetry object.
*/
async function createStableStateTelemetry(page, parent = 'mine') {
const parentUrl = await getHashUrlToDomainObject(page, parent);
await page.goto(`${parentUrl}`);
const createdObject = await createDomainObjectWithDefaults(page, {
type: 'State Generator',
name: 'Stable State Generator'
});
// edit the state generator to have a 1 second update rate
await page.getByLabel('More actions').click();
await page.getByRole('menuitem', { name: 'Edit Properties...' }).click();
await page.getByLabel('State Duration (seconds)', { exact: true }).fill('2');
await page.getByLabel('Save').click();
// Wait until the URL is updated
const uuid = await getFocusedObjectUuid(page);
const url = await getHashUrlToDomainObject(page, uuid);
return {
name: createdObject.name,
uuid,
url
};
}
/**
* Navigates directly to a given object url, in fixed time mode, with the given start and end bounds. Note: does not set
* default view type.
*
* @param {import('@playwright/test').Page} page
* @param {string} url The url to the domainObject
* @param {string | number} start The starting time bound in milliseconds since epoch
* @param {string | number} end The ending time bound in milliseconds since epoch
*/
async function navigateToObjectWithFixedTimeBounds(page, url, start, end) {
await page.goto(
`${url}?tc.mode=fixed&tc.timeSystem=utc&tc.startBound=${start}&tc.endBound=${end}`
);
}
/**
* Navigates directly to a given object url, in real-time mode. Note: does not set
* default view type.
*
* @param {import('@playwright/test').Page} page
* @param {string} url The url to the domainObject
* @param {string | number} start The start offset in milliseconds
* @param {string | number} end The end offset in milliseconds
*/
async function navigateToObjectWithRealTime(page, url, start = '1800000', end = '30000') {
await page.goto(
`${url}?tc.mode=local&tc.startDelta=${start}&tc.endDelta=${end}&tc.timeSystem=utc`
);
}
/**
* Expands the entire object tree (every expandable tree item). Can be used to
* ensure that the tree is fully expanded before performing actions on objects.
* Can be applied to either the main tree or the create modal tree.
*
* @param {import('@playwright/test').Page} page
* @param {"Main Tree" | "Create Modal Tree"} [treeName="Main Tree"]
*/
async function expandEntireTree(page, treeName = "Main Tree") {
async function expandEntireTree(page, treeName = 'Main Tree') {
const treeLocator = page.getByRole('tree', {
name: treeName
});
const collapsedTreeItems = treeLocator.getByRole('treeitem', {
const collapsedTreeItems = treeLocator
.getByRole('treeitem', {
expanded: false
}).locator('span.c-disclosure-triangle.is-enabled');
})
.getByLabel(/Expand/);
while (await collapsedTreeItems.count() > 0) {
while ((await collapsedTreeItems.count()) > 0) {
//eslint-disable-next-line playwright/no-nth-methods
await collapsedTreeItems.nth(0).click();
// FIXME: Replace hard wait with something event-driven.
@ -268,13 +340,17 @@ async function getFocusedObjectUuid(page) {
* URLs returned will be of the form `'./browse/#/mine/<uuid0>/<uuid1>/...'`
*
* @param {import('@playwright/test').Page} page
* @param {string} uuid the uuid of the object to get the url for
* @param {string | import('../src/api/objects/ObjectAPI').Identifier} identifier the uuid or identifier of the object to get the url for
* @returns {Promise<string>} the url of the object
*/
async function getHashUrlToDomainObject(page, uuid) {
const hashUrl = await page.evaluate(async (objectUuid) => {
const path = await window.openmct.objects.getOriginalPath(objectUuid);
let url = './#/browse/' + [...path].reverse()
async function getHashUrlToDomainObject(page, identifier) {
await page.waitForLoadState('domcontentloaded');
const hashUrl = await page.evaluate(async (objectIdentifier) => {
const path = await window.openmct.objects.getOriginalPath(objectIdentifier);
let url =
'./#/browse/' +
[...path]
.reverse()
.map((object) => window.openmct.objects.makeKeyString(object.identifier))
.join('/');
@ -284,7 +360,7 @@ async function getHashUrlToDomainObject(page, uuid) {
}
return url;
}, uuid);
}, identifier);
return hashUrl;
}
@ -293,6 +369,7 @@ async function getHashUrlToDomainObject(page, uuid) {
* Utilizes the OpenMCT API to detect if the UI is in Edit mode.
* @private
* @param {import('@playwright/test').Page} page
* @param {string | import('../src/api/objects/ObjectAPI').Identifier} identifier
* @return {Promise<boolean>} true if the Open MCT is in Edit Mode
*/
async function _isInEditMode(page, identifier) {
@ -302,19 +379,24 @@ async function _isInEditMode(page, identifier) {
/**
* Set the time conductor mode to either fixed timespan or realtime mode.
* @private
* @param {import('@playwright/test').Page} page
* @param {boolean} [isFixedTimespan=true] true for fixed timespan mode, false for realtime mode; default is true
*/
async function setTimeConductorMode(page, isFixedTimespan = true) {
async function _setTimeConductorMode(page, isFixedTimespan = true) {
// Click 'mode' button
await page.locator('.c-mode-button').click();
// Switch time conductor mode
await page.getByRole('button', { name: 'Time Conductor Mode', exact: true }).click();
await page.getByRole('button', { name: 'Time Conductor Mode Menu' }).click();
// Switch time conductor mode. Note, need to wait here for URL to update as the router is debounced.
if (isFixedTimespan) {
await page.locator('data-testid=conductor-modeOption-fixed').click();
await page.getByRole('menuitem', { name: /Fixed Timespan/ }).click();
await page.waitForURL(/tc\.mode=fixed/);
} else {
await page.locator('data-testid=conductor-modeOption-realtime').click();
await page.getByRole('menuitem', { name: /Real-Time/ }).click();
await page.waitForURL(/tc\.mode=local/);
}
//dismiss the time conductor popup
await page.getByLabel('Discard changes and close time popup').click();
}
/**
@ -322,7 +404,7 @@ async function setTimeConductorMode(page, isFixedTimespan = true) {
* @param {import('@playwright/test').Page} page
*/
async function setFixedTimeMode(page) {
await setTimeConductorMode(page, true);
await _setTimeConductorMode(page, true);
}
/**
@ -330,93 +412,308 @@ async function setFixedTimeMode(page) {
* @param {import('@playwright/test').Page} page
*/
async function setRealTimeMode(page) {
await setTimeConductorMode(page, false);
await _setTimeConductorMode(page, false);
}
/**
* @typedef {Object} OffsetValues
* @property {string | undefined} hours
* @property {string | undefined} mins
* @property {string | undefined} secs
* @property {string | undefined} startHours
* @property {string | undefined} startMins
* @property {string | undefined} startSecs
* @property {string | undefined} endHours
* @property {string | undefined} endMins
* @property {string | undefined} endSecs
*/
/**
* Set the values (hours, mins, secs) for the TimeConductor offsets when in realtime mode
* @param {import('@playwright/test').Page} page
* @param {OffsetValues} offset
* @param {import('@playwright/test').Locator} offsetButton
* @param {OffsetValues} offset - Object containing offset values
* @param {boolean} [offset.submitChanges=true] - If true, submit the offset changes; otherwise, discard them
*/
async function setTimeConductorOffset(page, {hours, mins, secs}, offsetButton) {
await offsetButton.click();
if (hours) {
await page.fill('.pr-time-controls__hrs', hours);
async function setTimeConductorOffset(
page,
{ startHours, startMins, startSecs, endHours, endMins, endSecs, submitChanges = true }
) {
if (startHours) {
await page.getByLabel('Start offset hours').fill(startHours);
}
if (mins) {
await page.fill('.pr-time-controls__mins', mins);
if (startMins) {
await page.getByLabel('Start offset minutes').fill(startMins);
}
if (secs) {
await page.fill('.pr-time-controls__secs', secs);
if (startSecs) {
await page.getByLabel('Start offset seconds').fill(startSecs);
}
if (endHours) {
await page.getByLabel('End offset hours').fill(endHours);
}
if (endMins) {
await page.getByLabel('End offset minutes').fill(endMins);
}
if (endSecs) {
await page.getByLabel('End offset seconds').fill(endSecs);
}
// Click the check button
await page.locator('.pr-time__buttons .icon-check').click();
if (submitChanges) {
await page.getByLabel('Submit time offsets').click();
} else {
await page.getByLabel('Discard changes and close time popup').click();
}
}
/**
* Set the values (hours, mins, secs) for the start time offset when in realtime mode
* @param {import('@playwright/test').Page} page
* @param {OffsetValues} offset
* @param {boolean} [submit=true] If true, submit the offset changes; otherwise, discard them
*/
async function setStartOffset(page, offset) {
const startOffsetButton = page.locator('data-testid=conductor-start-offset-button');
await setTimeConductorOffset(page, offset, startOffsetButton);
async function setStartOffset(page, { submitChanges = true, ...offset }) {
// Click 'mode' button
await page.getByRole('button', { name: 'Time Conductor Mode', exact: true }).click();
await setTimeConductorOffset(page, { submitChanges, ...offset });
}
/**
* Set the values (hours, mins, secs) for the end time offset when in realtime mode
* @param {import('@playwright/test').Page} page
* @param {OffsetValues} offset
* @param {boolean} [submit=true] If true, submit the offset changes; otherwise, discard them
*/
async function setEndOffset(page, offset) {
const endOffsetButton = page.locator('data-testid=conductor-end-offset-button');
await setTimeConductorOffset(page, offset, endOffsetButton);
async function setEndOffset(page, { submitChanges = true, ...offset }) {
// Click 'mode' button
await page.getByRole('button', { name: 'Time Conductor Mode', exact: true }).click();
await setTimeConductorOffset(page, { submitChanges, ...offset });
}
/**
* Selects an inspector tab based on the provided tab name
* Set the time conductor bounds in fixed time mode
*
* NOTE: Unless explicitly testing the Time Conductor itself, it is advised to instead
* navigate directly to the object with the desired time bounds using `navigateToObjectWithFixedTimeBounds()`.
* @param {import('@playwright/test').Page} page
* @param {Object} bounds - The time conductor bounds
* @param {string} [bounds.startDate] - The start date in YYYY-MM-DD format
* @param {string} [bounds.startTime] - The start time in HH:mm:ss format
* @param {string} [bounds.endDate] - The end date in YYYY-MM-DD format
* @param {string} [bounds.endTime] - The end time in HH:mm:ss format
* @param {boolean} [bounds.submitChanges=true] - If true, submit the changes; otherwise, discard them.
*/
async function setTimeConductorBounds(page, { submitChanges = true, ...bounds }) {
const { startDate, endDate, startTime, endTime } = bounds;
// Open the time conductor popup
await page.getByRole('button', { name: 'Time Conductor Mode', exact: true }).click();
// FIXME: https://github.com/nasa/openmct/pull/7818
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout(500);
if (startDate) {
await page.getByLabel('Start date').fill(startDate);
}
if (startTime) {
await page.getByLabel('Start time').fill(startTime);
}
if (endDate) {
await page.getByLabel('End date').fill(endDate);
}
if (endTime) {
await page.getByLabel('End time').fill(endTime);
}
if (submitChanges) {
await page.getByLabel('Submit time bounds').click();
} else {
await page.getByLabel('Discard changes and close time popup').click();
}
}
/**
* Set the bounds of the visible conductor in fixed time mode.
* Requires that page already has an independent time conductor in view.
* @param {import('@playwright/test').Page} page
* @param {string} start - The start date in 'YYYY-MM-DD HH:mm:ss.SSSZ' format
* @param {string} end - The end date in 'YYYY-MM-DD HH:mm:ss.SSSZ' format
*/
async function setFixedIndependentTimeConductorBounds(page, { start, end }) {
// Activate Independent Time Conductor
await page.getByLabel('Enable Independent Time Conductor').click();
// Bring up the time conductor popup
await page.getByLabel('Independent Time Conductor Settings').click();
await expect(page.getByLabel('Time Conductor Options')).toBeInViewport();
await _setTimeBounds(page, start, end);
await page.keyboard.press('Enter');
}
/**
* Set the bounds of the visible conductor in fixed time mode
* @private
* @param {import('@playwright/test').Page} page
* @param {string} start - The start date in 'YYYY-MM-DD HH:mm:ss.SSSZ' format
* @param {string} end - The end date in 'YYYY-MM-DD HH:mm:ss.SSSZ' format
*/
async function _setTimeBounds(page, startDate, endDate) {
if (startDate) {
// Fill start time
await page
.getByRole('textbox', { name: 'Start date' })
.fill(startDate.toString().substring(0, 10));
await page
.getByRole('textbox', { name: 'Start time' })
.fill(startDate.toString().substring(11, 19));
}
if (endDate) {
// Fill end time
await page.getByRole('textbox', { name: 'End date' }).fill(endDate.toString().substring(0, 10));
await page
.getByRole('textbox', { name: 'End time' })
.fill(endDate.toString().substring(11, 19));
}
}
/**
* Waits and asserts that all plot series data on the page
* is loaded and drawn.
*
* In lieu of a better way to detect when a plot is done rendering,
* we [attach a class to the '.gl-plot' element](https://github.com/nasa/openmct/blob/5924d7ea95a0c2d4141c602a3c7d0665cb91095f/src/plugins/plot/MctPlot.vue#L27)
* once all pending series data has been loaded. The following appAction retrieves
* all plots on the page and waits up to the default timeout for the class to be
* attached to each plot.
* @param {import('@playwright/test').Page} page
* @param {number} [timeout] Provide a custom timeout in milliseconds to override the default timeout
*/
async function waitForPlotsToRender(page, { timeout } = {}) {
//eslint-disable-next-line playwright/no-raw-locators
const plotLocator = page.locator('.gl-plot');
for (const plot of await plotLocator.all()) {
await expect(plot).toHaveClass(/js-series-data-loaded/, { timeout });
}
}
/**
* @typedef {Object} PlotPixel
* @property {number} r The value of the red channel (0-255)
* @property {number} g The value of the green channel (0-255)
* @property {number} b The value of the blue channel (0-255)
* @property {number} a The value of the alpha channel (0-255)
* @property {string} strValue The rgba string value of the pixel
*/
/**
* Wait for all plots to render and then retrieve and return an array
* of canvas plot pixel data (RGBA values).
* @param {import('@playwright/test').Page} page
* @param {string} canvasSelector The selector for the canvas element
* @return {Promise<PlotPixel[]>}
*/
async function getCanvasPixels(page, canvasSelector) {
const canvasHandle = await page.evaluateHandle(
(canvas) => document.querySelector(canvas),
canvasSelector
);
const canvasContextHandle = await page.evaluateHandle(
(canvas) => canvas.getContext('2d'),
canvasHandle
);
await waitForPlotsToRender(page);
return page.evaluate(
([canvas, ctx]) => {
// The document canvas is where the plot points and lines are drawn.
// The only way to access the canvas is using document (using page.evaluate)
/** @type {ImageData} */
const data = ctx.getImageData(0, 0, canvas.width, canvas.height).data;
/** @type {number[]} */
const imageDataValues = Object.values(data);
/** @type {PlotPixel[]} */
const plotPixels = [];
// Each pixel consists of four values within the ImageData.data array. The for loop iterates by multiples of four.
// The values associated with each pixel are R (red), G (green), B (blue), and A (alpha), in that order.
for (let i = 0; i < imageDataValues.length; ) {
if (imageDataValues[i] > 0) {
plotPixels.push({
r: imageDataValues[i],
g: imageDataValues[i + 1],
b: imageDataValues[i + 2],
a: imageDataValues[i + 3],
strValue: `rgb(${imageDataValues[i]}, ${imageDataValues[i + 1]}, ${
imageDataValues[i + 2]
}, ${imageDataValues[i + 3]})`
});
}
i = i + 4;
}
return plotPixels;
},
[canvasHandle, canvasContextHandle]
);
}
/**
* Search for telemetry and link it to an object. objectName should come from the domainObject.name function.
* @param {import('@playwright/test').Page} page
* @param {string} parameterName
* @param {string} objectName
*/
async function linkParameterToObject(page, parameterName, objectName) {
await page.getByRole('searchbox', { name: 'Search Input' }).click();
await page.getByRole('searchbox', { name: 'Search Input' }).fill(parameterName);
await page.getByLabel('Object Results').getByText(parameterName).click();
await page.getByLabel('More actions').click();
await page.getByLabel('Create Link').click();
await page.getByLabel('Modal Overlay').getByLabel('Search Input').click();
await page.getByLabel('Modal Overlay').getByLabel('Search Input').fill(objectName);
await page.getByLabel('Modal Overlay').getByLabel(`Navigate to ${objectName}`).click();
await page.getByLabel('Save').click();
}
/**
* Rename the currently viewed `domainObject` from the browse bar.
*
* @param {import('@playwright/test').Page} page
* @param {String} name the name of the tab
* @param {string} newName
*/
async function selectInspectorTab(page, name) {
const inspectorTabs = page.getByRole('tablist');
const inspectorTab = inspectorTabs.getByTitle(name);
const inspectorTabClass = await inspectorTab.getAttribute('class');
const isSelectedInspectorTab = inspectorTabClass.includes('is-current');
// do not click a tab that is already selected or it will timeout your test
// do to a { pointer-events: none; } on selected tabs
if (!isSelectedInspectorTab) {
await inspectorTab.click();
}
async function renameCurrentObjectFromBrowseBar(page, newName) {
const nameInput = page.getByLabel('Browse bar object name');
await nameInput.click();
await nameInput.fill('');
await nameInput.fill(newName);
// Click the browse bar container to save changes
await page.getByLabel('Browse bar', { exact: true }).click();
}
// eslint-disable-next-line no-undef
module.exports = {
export {
createDomainObjectWithDefaults,
createExampleTelemetryObject,
createNotification,
expandTreePaneItemByName,
expandEntireTree,
createPlanFromJSON,
openObjectTreeContextMenu,
getHashUrlToDomainObject,
getFocusedObjectUuid,
createStableStateTelemetry,
expandEntireTree,
getCanvasPixels,
linkParameterToObject,
navigateToObjectWithFixedTimeBounds,
navigateToObjectWithRealTime,
renameCurrentObjectFromBrowseBar,
setEndOffset,
setFixedIndependentTimeConductorBounds,
setFixedTimeMode,
setRealTimeMode,
setStartOffset,
setEndOffset,
selectInspectorTab
setTimeConductorBounds,
waitForPlotsToRender
};

161
e2e/avpFixtures.js Normal file
View File

@ -0,0 +1,161 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/**
* avpFixtures.js
*
* @file This module provides custom fixtures specifically tailored for Accessibility, Visual, and Performance (AVP) tests.
* These fixtures extend the base functionality of the Playwright fixtures and appActions, and are designed to be
* generalized across all plugins. They offer functionalities like scanning for accessibility violations, integrating
* with axe-core, and more.
*
* IMPORTANT NOTE: This fixture file is not intended to be extended further by other fixtures. If you find yourself
* needing to do so, please consult the documentation and consider creating a specialized fixture or modifying the
* existing ones.
*/
import AxeBuilder from '@axe-core/playwright';
import fs from 'fs/promises';
import path from 'path';
import { fileURLToPath } from 'url';
import { expect, test } from './pluginFixtures.js';
// Constants for repeated values
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const TEST_RESULTS_DIR = path.join(__dirname, './test-results');
const extendedTest = test.extend({
/**
* Overrides the default screenshot function to apply default options that should apply to all
* screenshots taken in the AVP tests.
*
* @param {import('@playwright/test').PlaywrightTestArgs} args - The Playwright test arguments.
* @param {Function} use - The function to use the page object.
* Defaults:
* - Disables animations
* - Masks the clock indicator
* - Masks the time conductor last update time in realtime mode
* - Masks the time conductor start bounds in fixed mode
* - Masks the time conductor end bounds in fixed mode
*/
page: async ({ page }, use) => {
const playwrightScreenshot = page.screenshot;
/**
* Override the screenshot function to always mask a given set of locators which will always
* show variance across screenshots. Defaults may be overridden by passing in options to the
* screenshot function.
* @param {import('@playwright/test').PageScreenshotOptions} options - The options for the screenshot.
* @returns {Promise<Buffer>} Returns the screenshot as a buffer.
*/
page.screenshot = async function (options = {}) {
const mask = [
this.getByLabel('Clock Indicator'), // Mask the clock indicator
this.getByLabel('Last update'), // Mask the time conductor last update time in realtime mode
this.getByLabel('Start bounds'), // Mask the time conductor start bounds in fixed mode
this.getByLabel('End bounds') // Mask the time conductor end bounds in fixed mode
];
const result = await playwrightScreenshot.call(this, {
animations: 'disabled',
mask,
...options // Pass through or override any options
});
return result;
};
await use(page);
}
});
/**
* Writes the accessibility report to the specified path.
*
* @param {string} reportPath - The path to write the report to.
* @param {Object} accessibilityScanResults - The results of the accessibility scan.
* @returns {Promise<Object>} The accessibility scan results.
* @throws Will throw an error if writing the report fails.
*/
async function writeAccessibilityReport(reportPath, accessibilityScanResults) {
try {
await fs.mkdir(path.dirname(reportPath), { recursive: true });
const data = JSON.stringify(accessibilityScanResults, null, 2);
await fs.writeFile(reportPath, data);
console.log(`Accessibility report with violations saved successfully as ${reportPath}`);
return accessibilityScanResults;
} catch (err) {
console.error(`Error writing the accessibility report to file ${reportPath}:`, err);
throw err;
}
}
/**
* Scans for accessibility violations on a page and writes a report to disk if violations are found.
* Automatically asserts that no violations should be present.
*
* @param {import('playwright').Page} page - The page object from Playwright.
* @param {string} testCaseName - The name of the test case.
* @param {{ reportName?: string }} [options={}] - The options for the report generation.
* @returns {Promise<Object|null>} Returns the accessibility scan results if violations are found, otherwise returns null.
*/
export async function scanForA11yViolations(page, testCaseName, options = {}) {
const builder = new AxeBuilder({ page });
builder.withTags(['wcag2aa']);
// https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md
const accessibilityScanResults = await builder.analyze();
// Assert that no violations should be present
expect
.soft(
accessibilityScanResults.violations,
`Accessibility violations found in test case: ${testCaseName}`
)
.toEqual([]);
// Check if there are any violations
if (accessibilityScanResults.violations.length > 0) {
const reportName = options.reportName || testCaseName;
const sanitizedReportName = reportName.replace(/\//g, '_');
const reportPath = path.join(
TEST_RESULTS_DIR,
'a11y-json-reports',
`${sanitizedReportName}.json`
);
try {
await page.screenshot({
path: path.join(TEST_RESULTS_DIR, 'a11y-screenshots', `${sanitizedReportName}.png`)
});
return await writeAccessibilityReport(reportPath, accessibilityScanResults);
} catch (err) {
console.error(`Error writing the accessibility report to file ${reportPath}:`, err);
throw err;
}
} else {
console.log('No accessibility violations found, no report generated.');
return null;
}
}
export { expect, extendedTest as test };

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@ -28,19 +27,18 @@
* GitHub issues.
*/
const base = require('@playwright/test');
const { expect } = base;
const fs = require('fs');
const path = require('path');
const { v4: uuid } = require('uuid');
const sinon = require('sinon');
import { expect, request, test } from '@playwright/test';
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { v4 as uuid } from 'uuid';
/**
* Takes a `ConsoleMessage` and returns a formatted string. Used to enable console log error detection.
* @see {@link https://github.com/microsoft/playwright/discussions/11690 Github Discussion}
* @private
* @param {import('@playwright/test').ConsoleMessage} msg
* @returns {String} formatted string with message type, text, url, and line and column numbers
* @returns {string} formatted string with message type, text, url, and line and column numbers
*/
function _consoleMessageToString(msg) {
const { url, lineNumber, columnNumber } = msg.location();
@ -56,75 +54,46 @@ function _consoleMessageToString(msg) {
* @return {Promise<Animation[]>}
*/
function waitForAnimations(locator) {
return locator
.evaluate((element) =>
Promise.all(
element
.getAnimations({ subtree: true })
.map((animation) => animation.finished)));
return locator.evaluate((element) =>
Promise.all(element.getAnimations({ subtree: true }).map((animation) => animation.finished))
);
}
const istanbulCLIOutput = fileURLToPath(new URL('.nyc_output', import.meta.url));
const extendedTest = test.extend({
/**
* This is part of our codecoverage shim.
* Path to output raw coverage files. Can be overridden in Playwright config file.
* @see {@link https://github.com/mxschmitt/playwright-test-coverage Github Example Project}
* @constant {string}
*/
const istanbulCLIOutput = path.join(process.cwd(), '.nyc_output');
exports.test = base.test.extend({
/**
* This allows the test to manipulate the browser clock. This is useful for Visual and Snapshot tests which need
* the Time Indicator Clock to be in a specific state.
* Usage:
* ```
* test.use({
* clockOptions: {
* now: 0,
* shouldAdvanceTime: true
* ```
* If clockOptions are provided, will override the default clock with fake timers provided by SinonJS.
*
* Default: `undefined`
*
* @see {@link https://github.com/microsoft/playwright/issues/6347 Github RFE}
* @see {@link https://github.com/sinonjs/fake-timers/#var-clock--faketimersinstallconfig SinonJS FakeTimers Config}
*/
clockOptions: [undefined, { option: true }],
overrideClock: [async ({ context, clockOptions }, use) => {
if (clockOptions !== undefined) {
await context.addInitScript({
path: path.join(__dirname, '../', './node_modules/sinon/pkg/sinon.js')
});
await context.addInitScript((options) => {
window.__clock = sinon.useFakeTimers(options);
}, clockOptions);
}
await use(context);
}, {
auto: true,
scope: 'test'
}],
coveragePath: [istanbulCLIOutput, { option: true }],
/**
* Extends the base context class to add codecoverage shim.
* @see {@link https://github.com/mxschmitt/playwright-test-coverage Github Project}
*/
context: async ({ context }, use) => {
context: async ({ context, coveragePath }, use) => {
await context.addInitScript(() =>
window.addEventListener('beforeunload', () =>
(window).collectIstanbulCoverage(JSON.stringify((window).__coverage__))
window.collectIstanbulCoverage(JSON.stringify(window.__coverage__))
)
);
await fs.promises.mkdir(istanbulCLIOutput, { recursive: true });
await fs.promises.mkdir(coveragePath, { recursive: true });
await context.exposeFunction('collectIstanbulCoverage', (coverageJSON) => {
if (coverageJSON) {
fs.writeFileSync(path.join(istanbulCLIOutput, `playwright_coverage_${uuid()}.json`), coverageJSON);
fs.writeFileSync(
path.join(coveragePath, `playwright_coverage_${uuid()}.json`),
coverageJSON
);
}
});
await use(context);
for (const page of context.pages()) {
await page.evaluate(() => (window).collectIstanbulCoverage(JSON.stringify((window).__coverage__)));
await page.evaluate(() => {
window.collectIstanbulCoverage(JSON.stringify(window.__coverage__));
});
}
},
/**
@ -147,28 +116,14 @@ exports.test = base.test.extend({
// Assert against console errors during teardown
if (failOnConsoleError) {
messages.forEach(
msg => expect.soft(msg.type(), `Console error detected: ${_consoleMessageToString(msg)}`).not.toEqual('error')
messages.forEach((msg) =>
// eslint-disable-next-line playwright/no-standalone-expect
expect
.soft(msg.type(), `Console error detected: ${_consoleMessageToString(msg)}`)
.not.toEqual('error')
);
}
},
/**
* Extends the base browser class to enable CDP connection definition in playwright.config.js. Once
* that RFE is implemented, this function can be removed.
* @see {@link https://github.com/microsoft/playwright/issues/8379 Github RFE}
*/
browser: async ({ playwright, browser }, use, workerInfo) => {
// Use browserless if configured
if (workerInfo.project.name.match(/browserless/)) {
const vBrowser = await playwright.chromium.connectOverCDP({
endpointURL: 'ws://localhost:3003'
});
await use(vBrowser);
} else {
// Use Local Browser for testing.
await use(browser);
}
}
});
exports.expect = expect;
exports.waitForAnimations = waitForAnimations;
export { expect, request, extendedTest as test, waitForAnimations };

36
e2e/constants.js Normal file
View File

@ -0,0 +1,36 @@
/**
* Constants which may be used across all e2e tests.
*/
/**
* Time Constants
* - Used for overriding the browser clock in tests.
*/
export const MISSION_TIME = 1732413600000; // Saturday, November 23, 2024 6:00:00 PM GMT-08:00 (Thanksgiving Dinner Time)
// Subtracting 30 minutes from MISSION_TIME
export const MISSION_TIME_FIXED_START = 1732413600000 - 1800000; // 1732411800000
// Adding 1 minute to MISSION_TIME
export const MISSION_TIME_FIXED_END = 1732413600000 + 60000; // 1732413660000
/**
* URL Constants
* These constants are used for initial navigation in visual tests, in either fixed or realtime mode.
* They navigate to the 'My Items' folder at MISSION_TIME.
* They set the following url parameters:
* - tc.mode - The time conductor mode ('fixed' or 'local')
* - tc.startBound - The time conductor start bound (when in fixed mode)
* - tc.endBound - The time conductor end bound (when in fixed mode)
* - tc.startDelta - The time conductor start delta (when in realtime mode)
* - tc.endDelta - The time conductor end delta (when in realtime mode)
* - tc.timeSystem - The time conductor time system ('utc')
* - view - The view to display ('grid')
* - hideInspector - Whether to hide the inspector (true)
* - hideTree - Whether to hide the tree (true)
* @typedef {string} VisualUrl
*/
/** @type {VisualUrl} */
export const VISUAL_FIXED_URL = `./#/browse/mine?tc.mode=fixed&tc.startBound=${MISSION_TIME_FIXED_START}&tc.endBound=${MISSION_TIME_FIXED_END}&tc.timeSystem=utc&view=grid&hideInspector=true&hideTree=true`;
/** @type {VisualUrl} */
export const VISUAL_REALTIME_URL =
'./#/browse/mine?tc.mode=local&tc.timeSystem=utc&view=grid&tc.startDelta=1800000&tc.endDelta=30000&hideTree=true&hideInspector=true';

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@ -20,17 +20,11 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*
* This test suite template is to be used when verifying Test Data files found in /e2e/test-data/
*/
const { test } = require('../../baseFixtures');
test.describe('recycled_local_storage @localStorage', () => {
//We may want to do some additional level of verification of this file. For now, we just verify that it exists and can be used in a test suite.
test.use({ storageState: './e2e/test-data/recycled_local_storage.json' });
test('Can use recycled_local_storage file', async ({ page }) => {
await page.goto('./', { waitUntil: 'networkidle' });
// This should be used to install the Example User
document.addEventListener('DOMContentLoaded', () => {
const openmct = window.openmct;
openmct.install(openmct.plugins.example.ExampleDataVisualizationSourcePlugin());
openmct.install(
openmct.plugins.InspectorDataVisualization({ type: 'exampleDataVisualizationSource' })
);
});
});

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

View File

@ -6,8 +6,7 @@ class DomainObjectViewProvider {
}
canView(domainObject) {
return domainObject.type === 'imageFileInput'
|| domainObject.type === 'jsonFileInput';
return domainObject.type === 'imageFileInput' || domainObject.type === 'jsonFileInput';
}
view(domainObject, objectPath) {
@ -36,7 +35,7 @@ document.addEventListener('DOMContentLoaded', () => {
openmct.types.addType('jsonFileInput', {
key: 'jsonFileInput',
name: "JSON File Input Object",
name: 'JSON File Input Object',
creatable: true,
form: [
{
@ -46,16 +45,14 @@ document.addEventListener('DOMContentLoaded', () => {
required: true,
text: 'Select File...',
type: 'application/json',
property: [
"selectFile"
]
property: ['selectFile']
}
]
});
openmct.types.addType('imageFileInput', {
key: 'imageFileInput',
name: "Image File Input Object",
name: 'Image File Input Object',
creatable: true,
form: [
{
@ -65,9 +62,7 @@ document.addEventListener('DOMContentLoaded', () => {
required: true,
text: 'Select File...',
type: 'image/*',
property: [
"selectFile"
]
property: ['selectFile']
}
]
});

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

View File

@ -24,4 +24,4 @@
}
});
});
}());
})();

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@ -19,259 +19,229 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
import { fileURLToPath } from 'url';
const path = require('path');
import { expect } from '../pluginFixtures.js';
/**
* @param {import('@playwright/test').Page} page
* @returns {Promise<void>}
*/
async function navigateToFaultManagementWithExample(page) {
// eslint-disable-next-line no-undef
await page.addInitScript({ path: path.join(__dirname, './', 'addInitExampleFaultProvider.js') });
export async function navigateToFaultManagementWithExample(page) {
await page.addInitScript({
path: fileURLToPath(new URL('./addInitExampleFaultProvider.js', import.meta.url))
});
await navigateToFaultItemInTree(page);
}
/**
* @param {import('@playwright/test').Page} page
* @returns {Promise<void>}
*/
async function navigateToFaultManagementWithStaticExample(page) {
// eslint-disable-next-line no-undef
await page.addInitScript({ path: path.join(__dirname, './', 'addInitExampleFaultProviderStatic.js') });
export async function navigateToFaultManagementWithStaticExample(page) {
await page.addInitScript({
path: fileURLToPath(new URL('./addInitExampleFaultProviderStatic.js', import.meta.url))
});
await navigateToFaultItemInTree(page);
}
/**
* @param {import('@playwright/test').Page} page
* @returns {Promise<void>}
*/
async function navigateToFaultManagementWithoutExample(page) {
// eslint-disable-next-line no-undef
await page.addInitScript({ path: path.join(__dirname, './', 'addInitFaultManagementPlugin.js') });
export async function navigateToFaultManagementWithoutExample(page) {
await page.addInitScript({
path: fileURLToPath(new URL('./addInitFaultManagementPlugin.js', import.meta.url))
});
await navigateToFaultItemInTree(page);
}
/**
* @param {import('@playwright/test').Page} page
* @returns {Promise<void>}
*/
async function navigateToFaultItemInTree(page) {
await page.goto('./', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'domcontentloaded' });
await page.waitForURL('**/#/browse/mine?**');
// Click text=Fault Management
await page.click('text=Fault Management'); // this verifies the plugin has been added
const faultManagementTreeItem = page
.getByRole('tree', {
name: 'Main Tree'
})
.getByRole('treeitem', {
name: 'Fault Management'
});
// Navigate to "Fault Management" from the tree
await faultManagementTreeItem.click();
}
/**
* @param {import('@playwright/test').Page} page
* @param {number} rowNumber
* @returns {Promise<void>}
*/
async function acknowledgeFault(page, rowNumber) {
export async function acknowledgeFault(page, rowNumber) {
await openFaultRowMenu(page, rowNumber);
await page.locator('.c-menu >> text="Acknowledge"').click();
// Click [aria-label="Save"]
await page.locator('[aria-label="Save"]').click();
await page.getByLabel('Acknowledge', { exact: true }).click();
await page.getByLabel('Save').click();
}
/**
* @param {import('@playwright/test').Page} page
* @param {...number} nums
* @returns {Promise<void>}
*/
async function shelveMultipleFaults(page, ...nums) {
export async function shelveMultipleFaults(page, ...nums) {
const selectRows = nums.map((num) => {
return selectFaultItem(page, num);
});
await Promise.all(selectRows);
await page.locator('button:has-text("Shelve")').click();
await page.locator('[aria-label="Save"]').click();
await page.getByLabel('Shelve selected faults').click();
await page.getByLabel('Save').click();
}
/**
* @param {import('@playwright/test').Page} page
* @param {...number} nums
* @returns {Promise<void>}
*/
async function acknowledgeMultipleFaults(page, ...nums) {
export async function acknowledgeMultipleFaults(page, ...nums) {
const selectRows = nums.map((num) => {
return selectFaultItem(page, num);
});
await Promise.all(selectRows);
await page.locator('button:has-text("Acknowledge")').click();
await page.locator('[aria-label="Save"]').click();
await page.getByLabel('Acknowledge selected faults').click();
await page.getByLabel('Save').click();
}
/**
* @param {import('@playwright/test').Page} page
* @param {number} rowNumber
* @returns {Promise<void>}
*/
async function shelveFault(page, rowNumber) {
export async function shelveFault(page, rowNumber) {
await openFaultRowMenu(page, rowNumber);
await page.locator('.c-menu >> text="Shelve"').click();
// Click [aria-label="Save"]
await page.locator('[aria-label="Save"]').click();
await page.getByLabel('Shelve', { exact: true }).click();
await page.getByLabel('Save').click();
}
/**
* @param {import('@playwright/test').Page} page
* @param {'severity' | 'newest-first' | 'oldest-first'} sort
* @returns {Promise<void>}
*/
async function changeViewTo(page, view) {
await page.locator('.c-fault-mgmt__search-row select').first().selectOption(view);
export async function sortFaultsBy(page, sort) {
await page.getByTitle('Sort By').getByRole('combobox').selectOption(sort);
}
/**
* @param {import('@playwright/test').Page} page
* @param {'acknowledged' | 'shelved' | 'standard view'} view
* @returns {Promise<void>}
*/
async function sortFaultsBy(page, sort) {
await page.locator('.c-fault-mgmt__list-header-sortButton select').selectOption(sort);
export async function changeViewTo(page, view) {
await page.getByTitle('View Filter').getByRole('combobox').selectOption(view);
}
/**
* @param {import('@playwright/test').Page} page
* @param {number} rowNumber
* @returns {Promise<void>}
*/
async function enterSearchTerm(page, term) {
await page.locator('.c-fault-mgmt-search [aria-label="Search Input"]').fill(term);
}
/**
* @param {import('@playwright/test').Page} page
*/
async function clearSearch(page) {
await enterSearchTerm(page, '');
}
/**
* @param {import('@playwright/test').Page} page
*/
async function selectFaultItem(page, rowNumber) {
export async function selectFaultItem(page, rowNumber) {
await page
.getByLabel('Select fault')
.nth(rowNumber - 1)
.check({
// Need force here because checkbox state is changed by an event emitted by the checkbox
// eslint-disable-next-line playwright/no-force-option
await page.check(`.c-fault-mgmt-item > input >> nth=${rowNumber - 1}`, { force: true }); // this will not work without force true, saw this may be a pw bug
force: true
});
await expect(page.getByLabel('Select fault').nth(rowNumber - 1)).toBeChecked();
}
/**
* @param {import('@playwright/test').Page} page
* @param {number} rowNumber
* @returns {import('@playwright/test').Locator}
*/
async function getHighestSeverity(page) {
const criticalCount = await page.locator('[title=CRITICAL]').count();
const warningCount = await page.locator('[title=WARNING]').count();
if (criticalCount > 0) {
return 'CRITICAL';
} else if (warningCount > 0) {
return 'WARNING';
}
return 'WATCH';
}
/**
* @param {import('@playwright/test').Page} page
*/
async function getLowestSeverity(page) {
const warningCount = await page.locator('[title=WARNING]').count();
const watchCount = await page.locator('[title=WATCH]').count();
if (watchCount > 0) {
return 'WATCH';
} else if (warningCount > 0) {
return 'WARNING';
}
return 'CRITICAL';
}
/**
* @param {import('@playwright/test').Page} page
*/
async function getFaultResultCount(page) {
const count = await page.locator('.c-faults-list-view-item-body > .c-fault-mgmt__list').count();
return count;
}
/**
* @param {import('@playwright/test').Page} page
*/
function getFault(page, rowNumber) {
const fault = page.locator(`.c-faults-list-view-item-body > .c-fault-mgmt__list >> nth=${rowNumber - 1}`);
export function getFault(page, rowNumber) {
const fault = page.getByLabel('Fault triggered at').nth(rowNumber - 1);
return fault;
}
/**
* @param {import('@playwright/test').Page} page
* @param {string} name
* @returns {import('@playwright/test').Locator}
*/
function getFaultByName(page, name) {
const fault = page.locator(`.c-fault-mgmt__list-faultname:has-text("${name}")`);
export function getFaultByName(page, name) {
const fault = page.getByLabel('Fault triggered at').filter({
hasText: name
});
return fault;
}
/**
* @param {import('@playwright/test').Page} page
* @param {number} rowNumber
* @returns {Promise<string>}
*/
async function getFaultName(page, rowNumber) {
const faultName = await page.locator(`.c-fault-mgmt__list-faultname >> nth=${rowNumber - 1}`).textContent();
export async function getFaultName(page, rowNumber) {
const faultName = await page
.getByLabel('Fault name', { exact: true })
.nth(rowNumber - 1)
.textContent();
return faultName;
}
/**
* @param {import('@playwright/test').Page} page
* @param {number} rowNumber
* @returns {Promise<string>}
*/
async function getFaultSeverity(page, rowNumber) {
const faultSeverity = await page.locator(`.c-faults-list-view-item-body .c-fault-mgmt__list-severity >> nth=${rowNumber - 1}`).getAttribute('title');
return faultSeverity;
}
/**
* @param {import('@playwright/test').Page} page
*/
async function getFaultNamespace(page, rowNumber) {
const faultNamespace = await page.locator(`.c-fault-mgmt__list-path >> nth=${rowNumber - 1}`).textContent();
export async function getFaultNamespace(page, rowNumber) {
const faultNamespace = await page
.getByLabel('Fault namespace')
.nth(rowNumber - 1)
.textContent();
return faultNamespace;
}
/**
* @param {import('@playwright/test').Page} page
* @param {number} rowNumber
* @returns {Promise<string>}
*/
async function getFaultTriggerTime(page, rowNumber) {
const faultTriggerTime = await page.locator(`.c-fault-mgmt__list-trigTime >> nth=${rowNumber - 1} >> .c-fault-mgmt-item__value`).textContent();
export async function getFaultTriggerTime(page, rowNumber) {
const faultTriggerTime = await page
.getByLabel('Last Trigger Time')
.nth(rowNumber - 1)
.textContent();
return faultTriggerTime.toString().trim();
}
/**
* @param {import('@playwright/test').Page} page
* @param {number} rowNumber
* @returns {Promise<void>}
*/
async function openFaultRowMenu(page, rowNumber) {
export async function openFaultRowMenu(page, rowNumber) {
// select
await page.locator(`.c-fault-mgmt-item > .c-fault-mgmt__list-action-button >> nth=${rowNumber - 1}`).click();
await page
.getByLabel('Fault triggered at')
.nth(rowNumber - 1)
.getByLabel('Disposition Actions')
.click();
}
// eslint-disable-next-line no-undef
module.exports = {
navigateToFaultManagementWithExample,
navigateToFaultManagementWithStaticExample,
navigateToFaultManagementWithoutExample,
navigateToFaultItemInTree,
acknowledgeFault,
shelveMultipleFaults,
acknowledgeMultipleFaults,
shelveFault,
changeViewTo,
sortFaultsBy,
enterSearchTerm,
clearSearch,
selectFaultItem,
getHighestSeverity,
getLowestSeverity,
getFaultResultCount,
getFault,
getFaultByName,
getFaultName,
getFaultSeverity,
getFaultNamespace,
getFaultTriggerTime,
openFaultRowMenu
};

View File

@ -0,0 +1,47 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
const isMac = process.platform === 'darwin';
const modifier = isMac ? 'Meta' : 'Control';
/**
* @param {import('@playwright/test').Page} page
*/
async function selectAll(page) {
await page.keyboard.press(`${modifier}+KeyA`);
}
/**
* @param {import('@playwright/test').Page} page
*/
async function copy(page) {
await page.keyboard.press(`${modifier}+KeyC`);
}
/**
* @param {import('@playwright/test').Page} page
*/
async function paste(page) {
await page.keyboard.press(`${modifier}+KeyV`);
}
export { copy, paste, selectAll };

View File

@ -0,0 +1,23 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
export * from './clipboard.js';

View File

@ -0,0 +1,33 @@
import { createDomainObjectWithDefaults } from '../appActions.js';
import { expect } from '../pluginFixtures.js';
const IMAGE_LOAD_DELAY = 5 * 1000;
const FIVE_MINUTES = 1000 * 60 * 5;
const THIRTY_SECONDS = 1000 * 30;
const MOUSE_WHEEL_DELTA_Y = 120;
/**
* @param {import('@playwright/test').Page} page
*/
async function createImageryViewWithShortDelay(page, { name, parent }) {
await createDomainObjectWithDefaults(page, {
name,
type: 'Example Imagery',
parent
});
await expect(page.locator('.l-browse-bar__object-name')).toContainText('Unnamed Example Imagery');
await page.getByLabel('More actions').click();
await page.getByLabel('Edit Properties').click();
// Clear and set Image load delay to minimum value
await page.locator('input[type="number"]').fill(`${IMAGE_LOAD_DELAY}`);
await page.getByLabel('Save').click();
}
export {
createImageryViewWithShortDelay,
FIVE_MINUTES,
IMAGE_LOAD_DELAY,
MOUSE_WHEEL_DELTA_Y,
THIRTY_SECONDS
};

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@ -20,20 +20,34 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
const { createDomainObjectWithDefaults } = require('../appActions');
import { createDomainObjectWithDefaults } from '../appActions.js';
const NOTEBOOK_DROP_AREA = '.c-notebook__drag-area';
const CUSTOM_NAME = 'CUSTOM_NAME';
import { fileURLToPath } from 'url';
/**
* @param {import('@playwright/test').Page} page
* @param {string} text
*/
async function enterTextEntry(page, text) {
await addNotebookEntry(page);
await enterTextInLastEntry(page, text);
await commitEntry(page);
}
/**
* @param {import('@playwright/test').Page} page
*/
async function enterTextEntry(page, text) {
// Click .c-notebook__drag-area
async function addNotebookEntry(page) {
await page.locator(NOTEBOOK_DROP_AREA).click();
}
// enter text
await page.locator('[aria-label="Notebook Entry"].is-selected div.c-ne__text').fill(text);
await commitEntry(page);
/**
* @param {import('@playwright/test').Page} page
*/
async function enterTextInLastEntry(page, text) {
await page.getByLabel('Notebook Entry Input').last().fill(text);
}
/**
@ -42,14 +56,14 @@ async function enterTextEntry(page, text) {
async function dragAndDropEmbed(page, notebookObject) {
// Create example telemetry object
const swg = await createDomainObjectWithDefaults(page, {
type: "Sine Wave Generator"
type: 'Sine Wave Generator'
});
// Navigate to notebook
await page.goto(notebookObject.url);
// Expand the tree to reveal the notebook
await page.click('button[title="Show selected item in tree"]');
await page.getByLabel('Show selected item in tree').click();
// Drag and drop the SWG into the notebook
await page.dragAndDrop(`text=${swg.name}`, NOTEBOOK_DROP_AREA);
await page.getByLabel(`Navigate to ${swg.name}`).dragTo(page.locator(NOTEBOOK_DROP_AREA));
await commitEntry(page);
}
@ -58,11 +72,93 @@ async function dragAndDropEmbed(page, notebookObject) {
* @param {import('@playwright/test').Page} page
*/
async function commitEntry(page) {
//Click the Commit Entry button
await page.locator('.c-ne__save-button > button').click();
}
// eslint-disable-next-line no-undef
module.exports = {
/**
* @param {import('@playwright/test').Page} page
*/
async function startAndAddRestrictedNotebookObject(page) {
await page.addInitScript({
path: fileURLToPath(new URL('./addInitRestrictedNotebook.js', import.meta.url))
});
await page.goto('./', { waitUntil: 'domcontentloaded' });
await page.waitForURL('**/browse/mine?**');
return createDomainObjectWithDefaults(page, {
type: CUSTOM_NAME,
name: 'Restricted Test Notebook'
});
}
/**
* @param {import('@playwright/test').Page} page
*/
async function lockPage(page) {
// Click the Commit Entries button
await page.getByLabel('Commit Entries').click();
// Wait until Lock Banner is visible
await page.locator('text=Lock Page').click();
}
/**
* Creates a notebook object and adds an entry.
* @param {import('@playwright/test').Page} - page to load
* @param {number} [iterations = 1] - the number of entries to create
*/
async function createNotebookAndEntry(page, iterations = 1) {
const notebook = createDomainObjectWithDefaults(page, { type: 'Notebook' });
for (let iteration = 0; iteration < iterations; iteration++) {
await enterTextEntry(page, `Entry ${iteration}`);
}
return notebook;
}
/**
* Creates a notebook object, adds an entry, and adds a tag.
* @param {import('@playwright/test').Page} page
* @param {number} [iterations = 1] - the number of entries (and tags) to create
*/
async function createNotebookEntryAndTags(page, iterations = 1) {
const notebook = await createNotebookAndEntry(page, iterations);
await page.getByRole('tab', { name: 'Annotations' }).click();
for (let iteration = 0; iteration < iterations; iteration++) {
// Hover and click "Add Tag" button
// Hover is needed here to "slow down" the actions while running in headless mode
await page.locator(`[aria-label="Notebook Entry"] >> nth = ${iteration}`).click();
await page.hover(`button:has-text("Add Tag")`);
await page.locator(`button:has-text("Add Tag")`).click();
// Click inside the tag search input
await page.locator('[placeholder="Type to select tag"]').click();
// Select the "Driving" tag
await page.locator('[aria-label="Autocomplete Options"] >> text=Driving').click();
// Hover and click "Add Tag" button
// Hover is needed here to "slow down" the actions while running in headless mode
await page.hover(`button:has-text("Add Tag")`);
await page.locator(`button:has-text("Add Tag")`).click();
// Click inside the tag search input
await page.locator('[placeholder="Type to select tag"]').click();
// Select the "Science" tag
await page.locator('[aria-label="Autocomplete Options"] >> text=Science').click();
}
return notebook;
}
export {
addNotebookEntry,
commitEntry,
createNotebookAndEntry,
createNotebookEntryAndTags,
dragAndDropEmbed,
enterTextEntry,
dragAndDropEmbed
enterTextInLastEntry,
lockPage,
startAndAddRestrictedNotebookObject
};

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@ -20,7 +20,8 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
import { expect } from '../pluginFixtures';
import { createDomainObjectWithDefaults, createPlanFromJSON } from '../appActions.js';
import { expect } from '../pluginFixtures.js';
/**
* Asserts that the number of activities in the plan view matches the number of
@ -28,10 +29,10 @@ import { expect } from '../pluginFixtures';
* for each activity in the plan data per group, using the earliest activity's
* start time as the start bound and the current activity's end time as the end bound.
* @param {import('@playwright/test').Page} page the page
* @param {object} plan The raw plan json to assert against
* @param {string} objectUrl The URL of the object to assert against (plan or gantt chart)
* @param {Object} plan The raw plan json to assert against
* @param {string} planObjectUrl The URL of the object to assert against (plan or gantt chart)
*/
export async function assertPlanActivities(page, plan, objectUrl) {
export async function assertPlanActivities(page, plan, planObjectUrl) {
const groups = Object.keys(plan);
for (const group of groups) {
for (let i = 0; i < plan[group].length; i++) {
@ -46,15 +47,19 @@ export async function assertPlanActivities(page, plan, objectUrl) {
}
// Switch to fixed time mode with all plan events within the bounds
await page.goto(`${objectUrl}?tc.mode=fixed&tc.startBound=${startBound}&tc.endBound=${endBound}&tc.timeSystem=utc&view=plan.view`);
await page.goto(
`${planObjectUrl}?tc.mode=fixed&tc.startBound=${startBound}&tc.endBound=${endBound}&tc.timeSystem=utc&view=plan.view`
);
// Assert that the number of activities in the plan view matches the number of
// activities in the plan data within the specified time bounds
const eventCount = await page.locator('.activity-bounds').count();
expect(eventCount).toEqual(Object.values(plan)
await expect(page.locator('.activity-bounds')).toHaveCount(
Object.values(plan)
.flat()
.filter(event =>
activitiesWithinTimeBounds(event.start, event.end, startBound, endBound)).length);
.filter((event) =>
activitiesWithinTimeBounds(event.start, event.end, startBound, endBound)
).length
);
}
}
}
@ -68,25 +73,169 @@ export async function assertPlanActivities(page, plan, objectUrl) {
* @returns {boolean} true if the activities overlap, false otherwise
*/
function activitiesWithinTimeBounds(start1, end1, start2, end2) {
return (start1 >= start2 && start1 <= end2)
|| (end1 >= start2 && end1 <= end2)
|| (start2 >= start1 && start2 <= end1)
|| (end2 >= start1 && end2 <= end1);
return (
(start1 >= start2 && start1 <= end2) ||
(end1 >= start2 && end1 <= end2) ||
(start2 >= start1 && start2 <= end1) ||
(end2 >= start1 && end2 <= end1)
);
}
/**
* Asserts that the swim lanes / groups in the plan view matches the order of
* groups in the plan data.
* @param {import('@playwright/test').Page} page the page
* @param {Object} plan The raw plan json to assert against
* @param {string} objectUrl The URL of the object to assert against (plan or gantt chart)
*/
export async function assertPlanOrderedSwimLanes(page, plan, objectUrl) {
// Switch to the plan view
await page.goto(`${objectUrl}?view=plan.view`);
const planGroups = await page
.locator('.c-plan__contents > div > .c-swimlane__lane-label .c-object-label__name')
.all();
const groups = plan.Groups;
for (let i = 0; i < groups.length; i++) {
// Assert that the order of groups in the plan view matches the order of
// groups in the plan data
const groupName = planGroups[i];
await expect(groupName).toHaveText(groups[i].name);
}
}
/**
* Navigate to the plan view, switch to fixed time mode,
* and set the bounds to span all activities.
* @param {import('@playwright/test').Page} page
* @param {object} planJson
* @param {Object} planJson
* @param {string} planObjectUrl
*/
export async function setBoundsToSpanAllActivities(page, planJson, planObjectUrl) {
const activities = Object.values(planJson).flat();
// Get the earliest start value
const start = Math.min(...activities.map(activity => activity.start));
const start = getEarliestStartTime(planJson);
// Get the latest end value
const end = Math.max(...activities.map(activity => activity.end));
const end = getLatestEndTime(planJson);
// Set the start and end bounds to the earliest start and latest end
await page.goto(`${planObjectUrl}?tc.mode=fixed&tc.startBound=${start}&tc.endBound=${end}&tc.timeSystem=utc&view=plan.view`);
await page.goto(
`${planObjectUrl}?tc.mode=fixed&tc.startBound=${start}&tc.endBound=${end}&tc.timeSystem=utc&view=plan.view`
);
}
/**
* @param {Object} planJson
* @returns {number}
*/
export function getEarliestStartTime(planJson) {
const activities = Object.values(planJson).flat();
return Math.min(...activities.map((activity) => activity.start));
}
/**
*
* @param {Object} planJson
* @returns {number}
*/
export function getLatestEndTime(planJson) {
const activities = Object.values(planJson).flat();
return Math.max(...activities.map((activity) => activity.end));
}
/**
*
* @param {object} planJson
* @returns {object}
*/
export function getFirstActivity(planJson) {
const groups = Object.keys(planJson);
const firstGroupKey = groups[0];
const firstGroupItems = planJson[firstGroupKey];
return firstGroupItems[0];
}
/**
* Uses the Open MCT API to set the status of a plan to 'draft'.
* @param {import('@playwright/test').Page} page
* @param {import('../../appActions').CreatedObjectInfo} plan
*/
export async function setDraftStatusForPlan(page, plan) {
await page.evaluate(async (planObject) => {
await window.openmct.status.set(planObject.uuid, 'draft');
}, plan);
}
export async function addPlanGetInterceptor(page) {
await page.waitForLoadState('load');
await page.evaluate(async () => {
await window.openmct.objects.addGetInterceptor({
appliesTo: (identifier, domainObject) => {
return domainObject && domainObject.type === 'plan';
},
invoke: (identifier, object) => {
if (object) {
object.sourceMap = {
orderedGroups: 'Groups'
};
}
return object;
}
});
});
}
/**
* Create a Plan from JSON and add it to a Timelist and Navigate to the Plan view
* @param {import('@playwright/test').Page} page
*/
export async function createTimelistWithPlanAndSetActivityInProgress(page, planJson) {
await page.goto('./', { waitUntil: 'domcontentloaded' });
const timelist = await createDomainObjectWithDefaults(page, {
name: 'Time List',
type: 'Time List'
});
await createPlanFromJSON(page, {
name: 'Test Plan',
json: planJson,
parent: timelist.uuid
});
// Ensure that all activities are shown in the expanded view
const groups = Object.keys(planJson);
const firstGroupKey = groups[0];
const firstGroupItems = planJson[firstGroupKey];
const firstActivityForPlan = firstGroupItems[0];
const lastActivity = firstGroupItems[firstGroupItems.length - 1];
const startBound = firstActivityForPlan.start;
const endBound = lastActivity.end;
// Switch to fixed time mode with all plan events within the bounds
await page.goto(
`${timelist.url}?tc.mode=fixed&tc.startBound=${startBound}&tc.endBound=${endBound}&tc.timeSystem=utc&view=timelist.view`
);
// Change the object to edit mode
await page.getByRole('button', { name: 'Edit Object' }).click();
// Find the display properties section in the inspector
await page.getByRole('tab', { name: 'View Properties' }).click();
// Switch to expanded view and save the setting
await page.getByLabel('Display Style').selectOption({ label: 'Expanded' });
// Click on the "Save" button
await page.getByRole('button', { name: 'Save' }).click();
await page.getByRole('listitem', { name: 'Save and Finish Editing' }).click();
const anActivity = page.getByRole('row').nth(0);
// Set the activity to in progress
await anActivity.click();
await page.getByRole('tab', { name: 'Activity' }).click();
await page.getByLabel('Activity Status', { exact: true }).selectOption({ label: 'In progress' });
}

189
e2e/helper/plotTagsUtils.js Normal file
View File

@ -0,0 +1,189 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
import { waitForPlotsToRender } from '../appActions.js';
import { expect } from '../pluginFixtures.js';
/**
* Given a canvas and a set of points, tags the points on the canvas.
* @param {import('@playwright/test').Page} page
* @param {HTMLCanvasElement} canvas a telemetry item with a plot
* @param {number} xEnd a telemetry item with a plot
* @param {number} yEnd a telemetry item with a plot
* @returns {Promise}
*/
export async function createTags({ page, canvas, xEnd = 700, yEnd = 520 }) {
await canvas.hover({ trial: true });
//Alt+Shift Drag Start to select some points to tag
await page.keyboard.down('Alt');
await page.keyboard.down('Shift');
await canvas.dragTo(canvas, {
sourcePosition: {
x: 1,
y: 1
},
targetPosition: {
x: xEnd,
y: yEnd
}
});
//Alt Drag End
await page.keyboard.up('Alt');
await page.keyboard.up('Shift');
//Wait for canvas to stabilize.
await canvas.hover({ trial: true });
// add some tags
await page.getByText('Annotations').click();
await page.getByRole('button', { name: /Add Tag/ }).click();
await page.getByPlaceholder('Type to select tag').click();
await page.getByText('Driving').click();
await page.getByRole('button', { name: /Add Tag/ }).click();
await page.getByPlaceholder('Type to select tag').click();
await page.getByText('Science').click();
}
/**
* Given a telemetry item (e.g., a Sine Wave Generator) with a plot, tests that the plot can be tagged.
* @param {import('@playwright/test').Page} page
* @param {import('../../../../appActions').CreatedObjectInfo} telemetryItem a telemetry item with a plot
* @returns {Promise}
*/
export async function testTelemetryItem(page, telemetryItem) {
// Check that telemetry item also received the tag
await page.goto(telemetryItem.url);
await expect(page.getByText('No tags to display for this item')).toBeVisible();
const canvas = page.locator('canvas').nth(1);
//Wait for canvas to stabilize.
await waitForPlotsToRender(page);
await expect(canvas).toBeInViewport();
await canvas.hover({ trial: true });
// click on the tagged plot point
await canvas.click({
position: {
x: 100,
y: 100
}
});
await expect(page.getByText('Science')).toBeVisible();
await expect(page.getByText('Driving')).toBeHidden();
}
/**
* Given a page, tests that tags are searchable, deletable, and persist across reloads.
* @param {import('@playwright/test').Page} page
* @returns {Promise}
*/
export async function basicTagsTests(page) {
// Search for Driving
await page.getByRole('searchbox', { name: 'Search Input' }).click();
// Clicking elsewhere should cause annotation selection to be cleared
await expect(page.getByText('No tags to display for this item')).toBeVisible();
//
await page.getByRole('searchbox', { name: 'Search Input' }).fill('driv');
// Always click on the first Sine Wave result
await page
.getByLabel('Search Result')
.getByText(/Sine Wave/)
.first()
.click();
// Delete Driving Tag
await page.hover('[aria-label="Tag"]:has-text("Driving")');
await page.locator('[aria-label="Remove tag Driving"]').click();
// Search for Science Tag
await page.getByRole('searchbox', { name: 'Search Input' }).click();
await page.getByRole('searchbox', { name: 'Search Input' }).fill('sc');
//Expect Science Tag to be present and and Driving Tags to be deleted
await expect(page.getByLabel('Search Result').first()).toContainText('Science');
await expect(page.getByLabel('Search Result').first()).not.toContainText('Driving');
// Search for Driving Tag and expect nothing found
await page.getByRole('searchbox', { name: 'Search Input' }).click();
await page.getByRole('searchbox', { name: 'Search Input' }).fill('driv');
await expect(page.getByText('No results found')).toBeVisible();
await page.reload({ waitUntil: 'domcontentloaded' });
await waitForPlotsToRender(page);
//Navigate to the Inspector and check that all tags have been removed
await expect(page.getByRole('tab', { name: 'Annotations' })).not.toHaveClass(/is-current/);
await page.getByRole('tab', { name: 'Annotations' }).click();
await expect(page.getByRole('tab', { name: 'Annotations' })).toHaveClass(/is-current/);
await expect(page.getByText('No tags to display for this item')).toBeVisible();
const canvas = page.locator('canvas').nth(1);
// click on the tagged plot point
await canvas.click({
position: {
x: 100,
y: 100
}
});
//Expect Science to be visible but Driving to be hidden
await expect(page.getByText('Science')).toBeVisible();
await expect(page.getByText('Driving')).toBeHidden();
//Click elsewhere
await page.locator('body').click();
//Click on tagged plot point again
await canvas.click({
position: {
x: 100,
y: 100
}
});
// Add Driving Tag again
await page.getByText('Annotations').click();
await page.getByRole('button', { name: /Add Tag/ }).click();
await page.getByPlaceholder('Type to select tag').click();
await page.getByText('Driving').click();
//Science and Driving Tags should be visible
await expect(page.getByText('Science')).toBeVisible();
await expect(page.getByText('Driving')).toBeVisible();
// Delete Driving Tag again
await page.hover('[aria-label="Tag"]:has-text("Driving")');
await page.locator('[aria-label="Remove tag Driving"]').click();
//Science Tag should be visible and Driving Tag should be hidden
await expect(page.getByText('Science')).toBeVisible();
await expect(page.getByText('Driving')).toBeHidden();
}

104
e2e/helper/stylingUtils.js Normal file
View File

@ -0,0 +1,104 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
import { expect } from '../pluginFixtures.js';
/**
* Converts a hex color value to its RGB equivalent.
*
* @param {string} hex - The hex color value. i.e. '#5b0f00'
* @returns {string} The RGB equivalent of the hex color.
*/
function hexToRGB(hex) {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result
? `rgb(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)})`
: null;
}
/**
* Sets the background and text color of a given element.
*
* @param {import('@playwright/test').Page} page - The Playwright page object.
* @param {string} borderColorHex - The hex value of the border color to set, or 'No Style'.
* @param {string} backgroundColorHex - The hex value of the background color to set, or 'No Style'.
* @param {string} textColorHex - The hex value of the text color to set, or 'No Style'.
* @param {import('@playwright/test').Locator} locator - The Playwright locator for the element whose style is to be set.
*/
async function setStyles(page, borderColorHex, backgroundColorHex, textColorHex, locator) {
await locator.click(); // Assuming the locator is clickable and opens the style setting UI
await page.getByLabel('Set border color').click();
await page.getByLabel(borderColorHex).click();
await page.getByLabel('Set background color').click();
await page.getByLabel(backgroundColorHex).click();
await page.getByLabel('Set text color').click();
await page.getByLabel(textColorHex).click();
}
/**
* Checks if the styles of an element match the expected values.
*
* @param {string} expectedBorderColor - The expected border color in RGB format. Default is '#e6b8af' or 'rgb(230, 184, 175)'
* @param {string} expectedBackgroundColor - The expected background color in RGB format.
* @param {string} expectedTextColor - The expected text color in RGB format. Default is #aaaaaa or 'rgb(170, 170, 170)'
* @param {import('@playwright/test').Locator} locator - The Playwright locator for the element whose style is to be checked.
*/
async function checkStyles(
expectedBorderColor,
expectedBackgroundColor,
expectedTextColor,
locator
) {
const layoutStyles = await locator.evaluate((el) => {
return {
border: window.getComputedStyle(el).getPropertyValue('border-top-color'), //infer the left, right, and bottom
background: window.getComputedStyle(el).getPropertyValue('background-color'),
fontColor: window.getComputedStyle(el).getPropertyValue('color')
};
});
expect(layoutStyles.border).toContain(expectedBorderColor);
expect(layoutStyles.background).toContain(expectedBackgroundColor);
expect(layoutStyles.fontColor).toContain(expectedTextColor);
}
/**
* Checks if the font Styles of an element match the expected values.
*
* @param {string} expectedFontSize - The expected font size in '72px' format. Default is 'Default'
* @param {string} expectedFontWeight - The expected font Type. Format as '700' for bold. Default is 'Default'
* @param {string} expectedFontFamily - The expected font Type. Format as "\"Andale Mono\", sans-serif". Default is 'Default'
* @param {import('@playwright/test').Locator} locator - The Playwright locator for the element whose style is to be checked.
*/
async function checkFontStyles(expectedFontSize, expectedFontWeight, expectedFontFamily, locator) {
const layoutStyles = await locator.evaluate((el) => {
return {
fontSize: window.getComputedStyle(el).getPropertyValue('font-size'),
fontWeight: window.getComputedStyle(el).getPropertyValue('font-weight'),
fontFamily: window.getComputedStyle(el).getPropertyValue('font-family')
};
});
expect(layoutStyles.fontSize).toContain(expectedFontSize);
expect(layoutStyles.fontWeight).toContain(expectedFontWeight);
expect(layoutStyles.fontFamily).toContain(expectedFontFamily);
}
export { checkFontStyles, checkStyles, hexToRGB, setStyles };

View File

@ -0,0 +1,29 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
// This should be used to install the Darkmatter theme for Open MCT.
// e.g.
// await page.addInitScript({ path: path.join(__dirname, 'useDarkmatterTheme.js') });
document.addEventListener('DOMContentLoaded', () => {
const openmct = window.openmct;
openmct.install(openmct.plugins.DarkmatterTheme());
});

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*

8
e2e/index.js Normal file
View File

@ -0,0 +1,8 @@
// Import everything from the specific fixture files
import * as appActions from './appActions.js';
import * as avpFixtures from './avpFixtures.js';
import * as baseFixtures from './baseFixtures.js';
import * as pluginFixtures from './pluginFixtures.js';
// Export these as named exports
export { appActions, avpFixtures, baseFixtures, pluginFixtures };

1449
e2e/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

27
e2e/package.json Normal file
View File

@ -0,0 +1,27 @@
{
"name": "openmct-e2e",
"version": "4.1.0-next",
"description": "The Open MCT e2e framework",
"type": "module",
"module": "index.js",
"exports": {
".": {
"import": "./index.js"
}
},
"scripts": {
"test": "npx playwright test",
"test:visual": "percy exec"
},
"devDependencies": {
"@percy/cli": "1.27.4",
"@percy/playwright": "1.0.4",
"@playwright/test": "1.48.1",
"@axe-core/playwright": "4.8.5"
},
"author": {
"name": "National Aeronautics and Space Administration",
"url": "https://www.nasa.gov"
},
"license": "Apache-2.0"
}

View File

@ -1,23 +1,25 @@
/* eslint-disable no-undef */
// playwright.config.js
// @ts-check
// eslint-disable-next-line no-unused-vars
const { devices } = require('@playwright/test');
import { devices } from '@playwright/test';
import { fileURLToPath } from 'url';
const MAX_FAILURES = 5;
const NUM_WORKERS = 2;
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
retries: 2, //Retries 2 times for a total of 3 runs. When running sharded and with maxFailures = 5, this should ensure that flake is managed without failing the full suite
retries: 2, //Retries 2 times for a total of 3 runs. When running sharded and with max-failures=5, this should ensure that flake is managed without failing the full suite
testDir: 'tests',
testIgnore: '**/*.perf.spec.js', //Ignore performance tests and define in playwright-perfromance.config.js
grepInvert: /@mobile/, //Ignore mobile tests
testIgnore: '**/*.perf.spec.js', //Ignore performance tests and define in playwright-performance.config.js
timeout: 60 * 1000,
webServer: {
command: 'npm run start:coverage',
cwd: fileURLToPath(new URL('../', import.meta.url)), // Provide cwd for the root of the project
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: false
reuseExistingServer: true //This was originally disabled to prevent differences in local debugging vs. CI. However, it significantly speeds up local debugging.
},
maxFailures: MAX_FAILURES, //Limits failures to 5 to reduce CI Waste
workers: NUM_WORKERS, //Limit to 2 for CircleCI Agent
@ -27,7 +29,9 @@ const config = {
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
trace: 'on-first-retry',
video: 'off'
video: 'off',
// @ts-ignore - custom configuration option for nyc codecoverage output path
coveragePath: fileURLToPath(new URL('../.nyc_output', import.meta.url))
},
projects: [
{
@ -69,13 +73,15 @@ const config = {
],
reporter: [
['list'],
['html', {
[
'html',
{
open: 'never',
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
}],
['junit', { outputFile: '../test-results/results.xml' }],
['github']
}
],
['junit', { outputFile: '../test-results/results.xml' }]
]
};
module.exports = config;
export default config;

View File

@ -1,25 +1,23 @@
/* eslint-disable no-undef */
// playwright.config.js
// @ts-check
// eslint-disable-next-line no-unused-vars
const { devices } = require('@playwright/test');
import { fileURLToPath } from 'url';
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
retries: 0,
testDir: 'tests',
testMatch: '**/*.e2e.spec.js', // only run e2e tests
testIgnore: '**/*.perf.spec.js',
timeout: 30 * 1000,
webServer: {
command: 'npm run start:coverage',
cwd: fileURLToPath(new URL('../', import.meta.url)), // Provide cwd for the root of the project
url: 'http://localhost:8080/#',
timeout: 120 * 1000,
reuseExistingServer: true
},
workers: 1,
use: {
browserName: "chromium",
browserName: 'chromium',
baseURL: 'http://localhost:8080/',
headless: false,
ignoreHTTPSErrors: true,
@ -36,7 +34,6 @@ const config = {
},
{
name: 'MMOC',
testMatch: '**/*.e2e.spec.js', // only run e2e tests
grepInvert: /@snapshot/,
use: {
browserName: 'chromium',
@ -48,8 +45,6 @@ const config = {
},
{
name: 'safari',
testMatch: '**/*.e2e.spec.js', // only run e2e tests
grep: /@ipad/, // only run ipad tests due to this bug https://github.com/microsoft/playwright/issues/8340
grepInvert: /@snapshot/,
use: {
browserName: 'webkit'
@ -57,7 +52,6 @@ const config = {
},
{
name: 'firefox',
testMatch: '**/*.e2e.spec.js', // only run e2e tests
grepInvert: /@snapshot/,
use: {
browserName: 'firefox'
@ -65,7 +59,6 @@ const config = {
},
{
name: 'canary',
testMatch: '**/*.e2e.spec.js', // only run e2e tests
grepInvert: /@snapshot/,
use: {
browserName: 'chromium',
@ -74,31 +67,23 @@ const config = {
},
{
name: 'chrome-beta',
testMatch: '**/*.e2e.spec.js', // only run e2e tests
grepInvert: /@snapshot/,
use: {
browserName: 'chromium',
channel: 'chrome-beta'
}
},
{
name: 'ipad',
testMatch: '**/*.e2e.spec.js', // only run e2e tests
grep: /@ipad/,
grepInvert: /@snapshot/,
use: {
browserName: 'webkit',
...devices['iPad (gen 7) landscape'] // Complete List https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
}
}
],
reporter: [
['list'],
['html', {
[
'html',
{
open: 'on-failure',
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
}]
}
]
]
};
module.exports = config;
export default config;

View File

@ -0,0 +1,72 @@
// playwright.config.js
// @ts-check
import { devices } from '@playwright/test';
const MAX_FAILURES = 5;
import { fileURLToPath } from 'url';
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
retries: 1, //Retries 2 times for a total of 3 runs. When running sharded and with max-failures=5, this should ensure that flake is managed without failing the full suite
testDir: 'tests',
testIgnore: '**/*.perf.spec.js', //Ignore performance tests and define in playwright-performance.config.js
timeout: 30 * 1000,
webServer: {
command: 'npm run start:coverage',
cwd: fileURLToPath(new URL('../', import.meta.url)), // Provide cwd for the root of the project
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: true //This was originally disabled to prevent differences in local debugging vs. CI. However, it significantly speeds up local debugging.
},
maxFailures: MAX_FAILURES, //Limits failures to 5 to reduce CI Waste
workers: 1, //Limit to 1 due to resource constraints similar to https://github.com/percy/cli/discussions/1067
use: {
baseURL: 'http://localhost:8080/',
headless: true,
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
trace: 'on-first-retry',
video: 'off',
// @ts-ignore - custom configuration option for nyc codecoverage output path
coveragePath: fileURLToPath(new URL('../.nyc_output', import.meta.url))
},
projects: [
{
name: 'ipad',
grep: /@mobile/,
use: {
storageState: fileURLToPath(
new URL('./test-data/display_layout_with_child_layouts.json', import.meta.url)
),
browserName: 'webkit',
...devices['iPad (gen 7) landscape'] // Complete List https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
}
},
{
name: 'iphone',
grep: /@mobile/,
use: {
storageState: fileURLToPath(
new URL('./test-data/display_layout_with_child_layouts.json', import.meta.url)
),
browserName: 'webkit',
...devices['iPhone 14 Pro'] // Complete List https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
}
}
],
reporter: [
['list'],
[
'html',
{
open: 'never',
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
}
],
['junit', { outputFile: '../test-results/results.xml' }]
]
};
export default config;

View File

@ -0,0 +1,43 @@
// playwright.config.js
// @ts-check
import { fileURLToPath } from 'url';
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
retries: 1, //Only for debugging purposes for trace: 'on-first-retry'
testDir: 'tests/performance/',
testMatch: '*.contract.perf.spec.js', //Run everything except contract tests which require marks in dev mode
timeout: 60 * 1000,
workers: 1, //Only run in serial with 1 worker
webServer: {
command: 'npm run start', //need development mode for performance.marks and others
cwd: fileURLToPath(new URL('../', import.meta.url)), // Provide cwd for the root of the project
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: false
},
use: {
browserName: 'chromium',
baseURL: 'http://localhost:8080/',
headless: true,
ignoreHTTPSErrors: false, //HTTP performance varies!
screenshot: 'off',
trace: 'on-first-retry',
video: 'off'
},
projects: [
{
name: 'chrome',
testIgnore: '*.memory.perf.spec.js', //Do not run memory tests without proper flags. Shouldn't get here
use: {
browserName: 'chromium'
}
}
],
reporter: [
['list'],
['junit', { outputFile: '../test-results/results.xml' }],
['json', { outputFile: '../test-results/results.json' }]
]
};
export default config;

View File

@ -0,0 +1,60 @@
// playwright.config.js
// @ts-check
import { fileURLToPath } from 'url';
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
retries: 0, //Only for debugging purposes for trace: 'on-first-retry'
testDir: 'tests/performance/',
testIgnore: '*.contract.perf.spec.js', //Run everything except contract tests which require marks in dev mode
timeout: 60 * 1000,
workers: 1, //Only run in serial with 1 worker
webServer: {
command: 'npm run start:prod', //Production mode
cwd: fileURLToPath(new URL('../', import.meta.url)), // Provide cwd for the root of the project
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: false //Must be run with this option to prevent dev mode
},
use: {
baseURL: 'http://localhost:8080/',
headless: true,
ignoreHTTPSErrors: false, //HTTP performance varies!
screenshot: 'off',
trace: 'on-first-retry',
video: 'off'
},
projects: [
{
name: 'chrome-memory',
testMatch: '*.memory.perf.spec.js', //Only run memory tests
use: {
browserName: 'chromium',
launchOptions: {
args: [
'--no-sandbox',
'--disable-notifications',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--js-flags=--no-move-object-start --expose-gc',
'--enable-precise-memory-info',
'--display=:100'
]
}
}
},
{
name: 'chrome',
testIgnore: '*.memory.perf.spec.js', //Do not run memory tests without proper flags
use: {
browserName: 'chromium'
}
}
],
reporter: [
['list'],
['junit', { outputFile: '../test-results/results.xml' }],
['json', { outputFile: '../test-results/results.json' }]
]
};
export default config;

View File

@ -1,43 +0,0 @@
/* eslint-disable no-undef */
// playwright.config.js
// @ts-check
const CI = process.env.CI === 'true';
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
retries: 1, //Only for debugging purposes for trace: 'on-first-retry'
testDir: 'tests/performance/',
timeout: 60 * 1000,
workers: 1, //Only run in serial with 1 worker
webServer: {
command: 'npm run start', //coverage not generated
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: !CI
},
use: {
browserName: "chromium",
baseURL: 'http://localhost:8080/',
headless: CI, //Only if running locally
ignoreHTTPSErrors: true,
screenshot: 'off',
trace: 'on-first-retry',
video: 'off'
},
projects: [
{
name: 'chrome',
use: {
browserName: 'chromium'
}
}
],
reporter: [
['list'],
['junit', { outputFile: '../test-results/results.xml' }],
['json', { outputFile: '../test-results/results.json' }]
]
};
module.exports = config;

View File

@ -0,0 +1,61 @@
// playwright.config.js
// @ts-check
import { fileURLToPath } from 'url';
/** @type {import('@playwright/test').PlaywrightTestConfig<{ theme: string }>} */
const config = {
retries: 0, // Visual tests should never retry due to snapshot comparison errors. Leaving as a shim
testDir: 'tests/visual-a11y',
testMatch: '**/*.visual.spec.js', // only run visual tests
timeout: 60 * 1000,
workers: 1, //Lower stress on Circle CI Agent for Visual tests https://github.com/percy/cli/discussions/1067
webServer: {
command: 'npm run start:coverage',
cwd: fileURLToPath(new URL('../', import.meta.url)), // Provide cwd for the root of the project
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: true //This was originally disabled to prevent differences in local debugging vs. CI. However, it significantly speeds up local debugging.
},
use: {
baseURL: 'http://localhost:8080/',
headless: true, // this needs to remain headless to avoid visual changes due to GPU rendering in headed browsers
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
trace: 'on-first-retry',
video: 'off'
},
projects: [
{
name: 'chrome',
use: {
browserName: 'chromium'
}
},
{
name: 'chrome-snow-theme', //Runs the same visual tests but with snow-theme enabled
use: {
browserName: 'chromium',
theme: 'snow'
}
},
{
name: 'darkmatter-theme', //Runs the same visual tests but with darkmatter-theme
use: {
browserName: 'chromium',
theme: 'darkmatter'
}
}
],
reporter: [
['list'],
['junit', { outputFile: '../test-results/results.xml' }],
[
'html',
{
open: 'on-failure',
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
}
]
]
};
export default config;

View File

@ -1,51 +0,0 @@
/* eslint-disable no-undef */
// playwright.config.js
// @ts-check
/** @type {import('@playwright/test').PlaywrightTestConfig<{ theme: string }>} */
const config = {
retries: 0, // Visual tests should never retry due to snapshot comparison errors. Leaving as a shim
testDir: 'tests/visual',
testMatch: '**/*.visual.spec.js', // only run visual tests
timeout: 60 * 1000,
workers: 1, //Lower stress on Circle CI Agent for Visual tests https://github.com/percy/cli/discussions/1067
webServer: {
command: 'npm run start:coverage',
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: !process.env.CI
},
use: {
baseURL: 'http://localhost:8080/',
headless: true, // this needs to remain headless to avoid visual changes due to GPU rendering in headed browsers
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
trace: 'on-first-retry',
video: 'off'
},
projects: [
{
name: 'chrome',
use: {
browserName: 'chromium'
}
},
{
name: 'chrome-snow-theme', //Runs the same visual tests but with snow-theme enabled
use: {
browserName: 'chromium',
theme: 'snow'
}
}
],
reporter: [
['list'],
['junit', { outputFile: '../test-results/results.xml' }],
['html', {
open: 'on-failure',
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
}]
]
};
module.exports = config;

View File

@ -0,0 +1,71 @@
// playwright.config.js
// @ts-check
import { devices } from '@playwright/test';
import { fileURLToPath } from 'url';
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
retries: 0, //Retries are not needed with watch mode
testDir: 'tests',
timeout: 60 * 1000,
webServer: {
command: 'npm run start', //Start in dev mode for hot reloading
cwd: fileURLToPath(new URL('../', import.meta.url)), // Provide cwd for the root of the project
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: true //This was originally disabled to prevent differences in local debugging vs. CI. However, it significantly speeds up local debugging.
},
workers: '75%', //Limit to 75% of the CPU to support running with dev server
use: {
baseURL: 'http://localhost:8080/',
headless: true,
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
trace: 'on-first-retry',
video: 'off'
},
projects: [
{
name: 'chrome',
testMatch: '**/*.spec.js', // run all tests
use: {
browserName: 'chromium'
}
},
{
name: 'ipad',
grep: /@mobile/,
use: {
storageState: fileURLToPath(
new URL('./test-data/display_layout_with_child_layouts.json', import.meta.url)
),
browserName: 'webkit',
...devices['iPad (gen 7) landscape'] // Complete List https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
}
},
{
name: 'iphone',
grep: /@mobile/,
use: {
storageState: fileURLToPath(
new URL('./test-data/display_layout_with_child_layouts.json', import.meta.url)
),
browserName: 'webkit',
...devices['iPhone 14 Pro'] // Complete List https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
}
}
],
reporter: [
['list'],
[
'html',
{
open: 'never',
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
}
],
['junit', { outputFile: '../test-results/results.xml' }]
]
};
export default config;

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@ -26,9 +25,10 @@
* and appActions. These fixtures should be generalized across all plugins.
*/
const { test, expect } = require('./baseFixtures');
// const { createDomainObjectWithDefaults } = require('./appActions');
const path = require('path');
// import { createDomainObjectWithDefaults } from './appActions.js';
import { fileURLToPath } from 'url';
import { expect, request, test } from './baseFixtures.js';
/**
* @typedef {Object} ObjectCreateOptions
@ -45,8 +45,6 @@ const path = require('path');
// const createdObjects = new Map();
/**
* **NOTE: This feature is a work-in-progress and should not currently be used.**
*
* This action will create a domain object for the test to reference and return the uuid. If an object
* of a given name already exists, it will return the uuid of that object to the test instead of creating
* a new file. The intent is to move object creation out of test suites which are not explicitly worried
@ -65,10 +63,7 @@ const path = require('path');
// await createDomainObjectWithDefaults(page, type, name);
// // Once object is created, get the uuid from the url
// const uuid = await page.evaluate(() => {
// return window.location.href.match(/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/)[0];
// });
// const uuid = getHashUrlToDomainObject(page);
// createdObjects.set(objectName, uuid);
@ -120,26 +115,29 @@ const theme = 'espresso';
*
* @type {string}
*/
const myItemsFolderName = "My Items";
const myItemsFolderName = 'My Items';
exports.test = test.extend({
const extendedTest = test.extend({
// This should follow in the Project's configuration. Can be set to 'snow' in playwright config.js
theme: [theme, { option: true }],
// eslint-disable-next-line no-shadow
page: async ({ page, theme }, use, testInfo) => {
// eslint-disable-next-line playwright/no-conditional-in-test
if (theme === 'snow') {
//inject snow theme
await page.addInitScript({ path: path.join(__dirname, './helper', './useSnowTheme.js') });
await page.addInitScript({
path: fileURLToPath(new URL('./helper/useSnowTheme.js', import.meta.url))
});
} else if (theme === 'darkmatter') {
//inject darkmatter theme
await page.addInitScript({
path: fileURLToPath(new URL('./helper/useDarkmatterTheme.js', import.meta.url))
});
}
// Attach info about the currently running test and its project.
// This will be used by appActions to fill in the created
// domain object's notes.
page.testNotes = [
`${testInfo.titlePath.join('\n')}`,
`${testInfo.project.name}`
].join('\n');
page.testNotes = [`${testInfo.titlePath.join('\n')}`, `${testInfo.project.name}`].join('\n');
await use(page);
},
@ -149,4 +147,19 @@ exports.test = test.extend({
await use({ myItemsFolderName });
}
});
exports.expect = expect;
export { expect, request, extendedTest as test };
/**
* Takes a readable stream and returns a string.
* @param {ReadableStream} readable - the readable stream
* @return {Promise<String>} the stringified stream
*/
export async function streamToString(readable) {
let result = '';
for await (const chunk of readable) {
result += chunk;
}
return result;
}

View File

@ -274,10 +274,7 @@
"id": "ac0d7eb1-b485-458f-bd2a-a63aa87a3a8a"
}
],
"layoutGrid": [
10,
10
],
"layoutGrid": [10, 10],
"objectStyles": {
"ed63cc29-80e2-4e2b-a472-3d6d4adbf310": {
"staticStyle": {
@ -1455,9 +1452,7 @@
"id": "64e49fe7-5b36-43db-8347-4550b910de4c",
"telemetry": "any",
"operation": "greaterThan",
"input": [
"120"
],
"input": ["120"],
"metadata": "sin"
}
]
@ -1475,10 +1470,7 @@
"id": "59f1c4bf-5d36-450c-9668-6546955fc066",
"telemetry": "any",
"operation": "between",
"input": [
"120",
"-20"
],
"input": ["120", "-20"],
"metadata": "sin"
}
]
@ -1496,9 +1488,7 @@
"id": "6707be12-6a6e-4535-bb97-ab5c86f99934",
"telemetry": "any",
"operation": "lessThan",
"input": [
"-20"
],
"input": ["-20"],
"metadata": "sin"
}
]
@ -1550,9 +1540,7 @@
"id": "64e49fe7-5b36-43db-8347-4550b910de4c",
"telemetry": "any",
"operation": "greaterThan",
"input": [
"120"
],
"input": ["120"],
"metadata": "sin"
}
]
@ -1570,10 +1558,7 @@
"id": "59f1c4bf-5d36-450c-9668-6546955fc066",
"telemetry": "any",
"operation": "between",
"input": [
"120",
"-20"
],
"input": ["120", "-20"],
"metadata": "sin"
}
]
@ -1591,9 +1576,7 @@
"id": "6707be12-6a6e-4535-bb97-ab5c86f99934",
"telemetry": "any",
"operation": "lessThan",
"input": [
"-20"
],
"input": ["-20"],
"metadata": "sin"
}
]
@ -1645,9 +1628,7 @@
"id": "64e49fe7-5b36-43db-8347-4550b910de4c",
"telemetry": "any",
"operation": "greaterThan",
"input": [
"150"
],
"input": ["150"],
"metadata": "sin"
}
]
@ -1665,10 +1646,7 @@
"id": "59f1c4bf-5d36-450c-9668-6546955fc066",
"telemetry": "any",
"operation": "between",
"input": [
"50",
"-50"
],
"input": ["50", "-50"],
"metadata": "sin"
}
]
@ -1720,9 +1698,7 @@
"id": "64e49fe7-5b36-43db-8347-4550b910de4c",
"telemetry": "any",
"operation": "greaterThan",
"input": [
"150"
],
"input": ["150"],
"metadata": "sin"
}
]
@ -1740,10 +1716,7 @@
"id": "59f1c4bf-5d36-450c-9668-6546955fc066",
"telemetry": "any",
"operation": "between",
"input": [
"50",
"-50"
],
"input": ["50", "-50"],
"metadata": "sin"
}
]

View File

@ -1 +1,90 @@
{"openmct":{"b3cee102-86dd-4c0a-8eec-4d5d276f8691":{"identifier":{"key":"b3cee102-86dd-4c0a-8eec-4d5d276f8691","namespace":""},"name":"Performance Display Layout","type":"layout","composition":[{"key":"9666e7b4-be0c-47a5-94b8-99accad7155e","namespace":""}],"configuration":{"items":[{"width":32,"height":18,"x":12,"y":9,"identifier":{"key":"9666e7b4-be0c-47a5-94b8-99accad7155e","namespace":""},"hasFrame":true,"fontSize":"default","font":"default","type":"subobject-view","id":"23ca351d-a67d-46aa-a762-290eb742d2f1"}],"layoutGrid":[10,10]},"modified":1654299875432,"location":"mine","persisted":1654299878751},"9666e7b4-be0c-47a5-94b8-99accad7155e":{"identifier":{"key":"9666e7b4-be0c-47a5-94b8-99accad7155e","namespace":""},"name":"Performance Example Imagery","type":"example.imagery","configuration":{"imageLocation":"","imageLoadDelayInMilliSeconds":20000,"imageSamples":[],"layers":[{"source":"dist/imagery/example-imagery-layer-16x9.png","name":"16:9","visible":false},{"source":"dist/imagery/example-imagery-layer-safe.png","name":"Safe","visible":false},{"source":"dist/imagery/example-imagery-layer-scale.png","name":"Scale","visible":false}]},"telemetry":{"values":[{"name":"Name","key":"name"},{"name":"Time","key":"utc","format":"utc","hints":{"domain":2}},{"name":"Local Time","key":"local","format":"local-format","hints":{"domain":1}},{"name":"Image","key":"url","format":"image","hints":{"image":1},"layers":[{"source":"dist/imagery/example-imagery-layer-16x9.png","name":"16:9"},{"source":"dist/imagery/example-imagery-layer-safe.png","name":"Safe"},{"source":"dist/imagery/example-imagery-layer-scale.png","name":"Scale"}]},{"name":"Image Download Name","key":"imageDownloadName","format":"imageDownloadName","hints":{"imageDownloadName":1}}]},"modified":1654299840077,"location":"b3cee102-86dd-4c0a-8eec-4d5d276f8691","persisted":1654299840078}},"rootId":"b3cee102-86dd-4c0a-8eec-4d5d276f8691"}
{
"openmct": {
"b3cee102-86dd-4c0a-8eec-4d5d276f8691": {
"identifier": { "key": "b3cee102-86dd-4c0a-8eec-4d5d276f8691", "namespace": "" },
"name": "Performance Display Layout",
"type": "layout",
"composition": [{ "key": "9666e7b4-be0c-47a5-94b8-99accad7155e", "namespace": "" }],
"configuration": {
"items": [
{
"width": 32,
"height": 18,
"x": 12,
"y": 9,
"identifier": { "key": "9666e7b4-be0c-47a5-94b8-99accad7155e", "namespace": "" },
"hasFrame": true,
"fontSize": "default",
"font": "default",
"type": "subobject-view",
"id": "23ca351d-a67d-46aa-a762-290eb742d2f1"
}
],
"layoutGrid": [10, 10]
},
"modified": 1654299875432,
"location": "mine",
"persisted": 1654299878751
},
"9666e7b4-be0c-47a5-94b8-99accad7155e": {
"identifier": { "key": "9666e7b4-be0c-47a5-94b8-99accad7155e", "namespace": "" },
"name": "Performance Example Imagery",
"type": "example.imagery",
"configuration": {
"imageLocation": "",
"imageLoadDelayInMilliSeconds": 20000,
"imageSamples": [],
"layers": [
{
"source": "dist/imagery/example-imagery-layer-16x9.png",
"name": "16:9",
"visible": false
},
{
"source": "dist/imagery/example-imagery-layer-safe.png",
"name": "Safe",
"visible": false
},
{
"source": "dist/imagery/example-imagery-layer-scale.png",
"name": "Scale",
"visible": false
}
]
},
"telemetry": {
"values": [
{ "name": "Name", "key": "name" },
{ "name": "Time", "key": "utc", "format": "utc", "hints": { "domain": 2 } },
{
"name": "Local Time",
"key": "local",
"format": "local-format",
"hints": { "domain": 1 }
},
{
"name": "Image",
"key": "url",
"format": "image",
"hints": { "image": 1 },
"layers": [
{ "source": "dist/imagery/example-imagery-layer-16x9.png", "name": "16:9" },
{ "source": "dist/imagery/example-imagery-layer-safe.png", "name": "Safe" },
{ "source": "dist/imagery/example-imagery-layer-scale.png", "name": "Scale" }
]
},
{
"name": "Image Download Name",
"key": "imageDownloadName",
"format": "imageDownloadName",
"hints": { "imageDownloadName": 1 }
}
]
},
"modified": 1654299840077,
"location": "b3cee102-86dd-4c0a-8eec-4d5d276f8691",
"persisted": 1654299840078
}
},
"rootId": "b3cee102-86dd-4c0a-8eec-4d5d276f8691"
}

View File

@ -1 +1,96 @@
{"openmct":{"6d2fa9fd-f2aa-461a-a1e1-164ac44bec9d":{"identifier":{"key":"6d2fa9fd-f2aa-461a-a1e1-164ac44bec9d","namespace":""},"name":"Performance Notebook","type":"notebook","configuration":{"defaultSort":"oldest","entries":{"3e31c412-33ba-4757-8ade-e9821f6ba321":{"8c8f6035-631c-45af-8c24-786c60295335":[{"id":"entry-1652815305457","createdOn":1652815305457,"createdBy":"","text":"Existing Entry 1","embeds":[]},{"id":"entry-1652815313465","createdOn":1652815313465,"createdBy":"","text":"Existing Entry 2","embeds":[]},{"id":"entry-1652815399955","createdOn":1652815399955,"createdBy":"","text":"Existing Entry 3","embeds":[]}]}},"imageMigrationVer":"v1","pageTitle":"Page","sections":[{"id":"3e31c412-33ba-4757-8ade-e9821f6ba321","isDefault":false,"isSelected":false,"name":"Section1","pages":[{"id":"8c8f6035-631c-45af-8c24-786c60295335","isDefault":false,"isSelected":false,"name":"Page1","pageTitle":"Page"},{"id":"36555942-c9aa-439c-bbdb-0aaf50db50f5","isDefault":false,"isSelected":false,"name":"Page2","pageTitle":"Page"}],"sectionTitle":"Section"},{"id":"dab0bd1d-2c5a-405c-987f-107123d6189a","isDefault":false,"isSelected":true,"name":"Section2","pages":[{"id":"f625a86a-cb99-4898-8082-80543c8de534","isDefault":false,"isSelected":false,"name":"Page1","pageTitle":"Page"},{"id":"e77ef810-f785-42a7-942e-07e999b79c59","isDefault":false,"isSelected":true,"name":"Page2","pageTitle":"Page"}],"sectionTitle":"Section"}],"sectionTitle":"Section","type":"General","showTime":"0"},"modified":1652815915219,"location":"mine","persisted":1652815915222}},"rootId":"6d2fa9fd-f2aa-461a-a1e1-164ac44bec9d"}
{
"openmct": {
"6d2fa9fd-f2aa-461a-a1e1-164ac44bec9d": {
"identifier": { "key": "6d2fa9fd-f2aa-461a-a1e1-164ac44bec9d", "namespace": "" },
"name": "Performance Notebook",
"type": "notebook",
"configuration": {
"defaultSort": "oldest",
"entries": {
"3e31c412-33ba-4757-8ade-e9821f6ba321": {
"8c8f6035-631c-45af-8c24-786c60295335": [
{
"id": "entry-1652815305457",
"createdOn": 1652815305457,
"createdBy": "",
"text": "Existing Entry 1",
"embeds": []
},
{
"id": "entry-1652815313465",
"createdOn": 1652815313465,
"createdBy": "",
"text": "Existing Entry 2",
"embeds": []
},
{
"id": "entry-1652815399955",
"createdOn": 1652815399955,
"createdBy": "",
"text": "Existing Entry 3",
"embeds": []
}
]
}
},
"imageMigrationVer": "v1",
"pageTitle": "Page",
"sections": [
{
"id": "3e31c412-33ba-4757-8ade-e9821f6ba321",
"isDefault": false,
"isSelected": false,
"name": "Section1",
"pages": [
{
"id": "8c8f6035-631c-45af-8c24-786c60295335",
"isDefault": false,
"isSelected": false,
"name": "Page1",
"pageTitle": "Page"
},
{
"id": "36555942-c9aa-439c-bbdb-0aaf50db50f5",
"isDefault": false,
"isSelected": false,
"name": "Page2",
"pageTitle": "Page"
}
],
"sectionTitle": "Section"
},
{
"id": "dab0bd1d-2c5a-405c-987f-107123d6189a",
"isDefault": false,
"isSelected": true,
"name": "Section2",
"pages": [
{
"id": "f625a86a-cb99-4898-8082-80543c8de534",
"isDefault": false,
"isSelected": false,
"name": "Page1",
"pageTitle": "Page"
},
{
"id": "e77ef810-f785-42a7-942e-07e999b79c59",
"isDefault": false,
"isSelected": true,
"name": "Page2",
"pageTitle": "Page"
}
],
"sectionTitle": "Section"
}
],
"sectionTitle": "Section",
"type": "General",
"showTime": "0"
},
"modified": 1652815915219,
"location": "mine",
"persisted": 1652815915222
}
},
"rootId": "6d2fa9fd-f2aa-461a-a1e1-164ac44bec9d"
}

View File

@ -1,22 +0,0 @@
{
"cookies": [],
"origins": [
{
"origin": "http://localhost:8080",
"localStorage": [
{
"name": "tcHistory",
"value": "{\"utc\":[{\"start\":1658617611983,\"end\":1658619411983}]}"
},
{
"name": "mct",
"value": "{\"mine\":{\"identifier\":{\"key\":\"mine\",\"namespace\":\"\"},\"name\":\"My Items\",\"type\":\"folder\",\"composition\":[{\"key\":\"7fa5749b-8969-494c-9d85-c272516d333c\",\"namespace\":\"\"}],\"location\":\"ROOT\",\"persisted\":1658619412848,\"modified\":1658619412848},\"7fa5749b-8969-494c-9d85-c272516d333c\":{\"identifier\":{\"key\":\"7fa5749b-8969-494c-9d85-c272516d333c\",\"namespace\":\"\"},\"name\":\"Unnamed Overlay Plot\",\"type\":\"telemetry.plot.overlay\",\"composition\":[{\"key\":\"67cbb9fc-af46-4148-b9e5-aea11179ae4b\",\"namespace\":\"\"}],\"configuration\":{\"series\":[{\"identifier\":{\"key\":\"67cbb9fc-af46-4148-b9e5-aea11179ae4b\",\"namespace\":\"\"}}]},\"modified\":1658619413566,\"location\":\"mine\",\"persisted\":1658619413567},\"67cbb9fc-af46-4148-b9e5-aea11179ae4b\":{\"name\":\"Unnamed Sine Wave Generator\",\"type\":\"generator\",\"identifier\":{\"key\":\"67cbb9fc-af46-4148-b9e5-aea11179ae4b\",\"namespace\":\"\"},\"telemetry\":{\"period\":10,\"amplitude\":1,\"offset\":0,\"dataRateInHz\":1,\"phase\":0,\"randomness\":0,\"loadDelay\":\"5000\"},\"modified\":1658619413552,\"location\":\"7fa5749b-8969-494c-9d85-c272516d333c\",\"persisted\":1658619413552}}"
},
{
"name": "mct-tree-expanded",
"value": "[\"/browse/mine\"]"
}
]
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,54 @@
{
"Groups": [
{
"name": "Group 1"
},
{
"name": "Group 2"
}
],
"Group 2": [
{
"name": "Past event 3",
"start": 1660493208000,
"end": 1660503981000,
"type": "Group 2",
"color": "orange",
"textColor": "white"
},
{
"name": "Past event 4",
"start": 1660579608000,
"end": 1660624108000,
"type": "Group 2",
"color": "orange",
"textColor": "white"
},
{
"name": "Past event 5",
"start": 1660666008000,
"end": 1660681529000,
"type": "Group 2",
"color": "orange",
"textColor": "white"
}
],
"Group 1": [
{
"name": "Past event 1",
"start": 1660320408000,
"end": 1660343797000,
"type": "Group 1",
"color": "orange",
"textColor": "white"
},
{
"name": "Past event 2",
"start": 1660406808000,
"end": 1660429160000,
"type": "Group 1",
"color": "orange",
"textColor": "white"
}
]
}

View File

@ -6,7 +6,8 @@
"end": 1660343797000,
"type": "Group 1",
"color": "orange",
"textColor": "white"
"textColor": "white",
"id": 1
},
{
"name": "Past event 2",
@ -14,7 +15,8 @@
"end": 1660429160000,
"type": "Group 1",
"color": "orange",
"textColor": "white"
"textColor": "white",
"id": 2
},
{
"name": "Past event 3",
@ -22,7 +24,8 @@
"end": 1660503981000,
"type": "Group 1",
"color": "orange",
"textColor": "white"
"textColor": "white",
"id": 3
},
{
"name": "Past event 4",
@ -30,7 +33,8 @@
"end": 1660624108000,
"type": "Group 1",
"color": "orange",
"textColor": "white"
"textColor": "white",
"id": 4
},
{
"name": "Past event 5",
@ -38,7 +42,8 @@
"end": 1660681529000,
"type": "Group 1",
"color": "orange",
"textColor": "white"
"textColor": "white",
"id": 5
}
]
}

View File

@ -0,0 +1,42 @@
{
"Group 1": [
{
"name": "Time until birthday",
"start": 1650320402000,
"end": 1660343797000,
"type": "Group 1",
"color": "orange",
"textColor": "white",
"id": 1
},
{
"name": "Time until supper",
"start": 1650320402000,
"end": 1650420410000,
"type": "Group 2",
"color": "blue",
"textColor": "white",
"id": 2
}
],
"Group 2": [
{
"name": "Time since the last time I ate",
"start": 1650320102001,
"end": 1650320102001,
"type": "Group 2",
"color": "green",
"textColor": "white",
"id": 3
},
{
"name": "Time since last accident",
"start": 1650320102002,
"end": 1650320102002,
"type": "Group 1",
"color": "yellow",
"textColor": "white",
"id": 4
}
]
}

Some files were not shown because too many files have changed in this diff Show More