Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and re-enable disabled unit test suites #6990

Merged
merged 35 commits into from
Sep 5, 2023
Merged

Conversation

ozyx
Copy link
Contributor

@ozyx ozyx commented Aug 24, 2023

Closes #7016
Closes #7019

Describe your changes:

Fixes and re-enables most unit test suites that were disabled while we were working through the Vue 3 compat upgrade. Fixes a couple of issues and adds e2e coverage for suites we were unable to re-enable.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests 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.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • 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)

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #6990 (d7a2969) into master (9f7b3b9) will increase coverage by 7.17%.
The diff coverage is 42.85%.

@@            Coverage Diff             @@
##           master    #6990      +/-   ##
==========================================
+ Coverage   48.31%   55.48%   +7.17%     
==========================================
  Files         643      643              
  Lines       25730    25726       -4     
  Branches     2512     2512              
==========================================
+ Hits        12431    14275    +1844     
+ Misses      12819    10761    -2058     
- Partials      480      690     +210     
Flag Coverage Δ *Carryforward flag
e2e-full 42.08% <ø> (+0.02%) ⬆️ Carriedforward from 4fc4879
e2e-stable 57.23% <40.00%> (+0.05%) ⬆️
unit 48.94% <28.57%> (+10.25%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files Changed Coverage Δ
src/api/forms/components/controls/Datetime.vue 2.85% <ø> (ø)
src/plugins/charts/bar/BarGraphPlot.vue 43.29% <ø> (+13.40%) ⬆️
src/plugins/charts/bar/BarGraphViewProvider.js 86.66% <ø> (ø)
src/plugins/plot/Plot.vue 57.31% <0.00%> (+57.31%) ⬆️
src/plugins/plot/legend/PlotLegend.vue 63.46% <ø> (+63.46%) ⬆️
src/plugins/timer/components/Timer.vue 4.76% <0.00%> (ø)
src/plugins/timer/actions/StartTimerAction.js 85.71% <40.00%> (+4.46%) ⬆️
src/plugins/plot/inspector/PlotOptionsEdit.vue 53.12% <50.00%> (+53.12%) ⬆️
src/ui/layout/pane.vue 46.91% <66.66%> (+19.41%) ⬆️
src/utils/testing.js 75.96% <100.00%> (-0.23%) ⬇️

... and 76 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f7b3b9...d7a2969. Read the comment docs.

@deploysentinel
Copy link

deploysentinel bot commented Aug 24, 2023

Current Playwright Test Results Summary

✅ 14 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 09/05/2023 08:52:40am UTC)

Run Details

Running Workflow e2e-couchdb on Github Actions

Commit: d7a2969

Started: 09/05/2023 08:50:23am UTC

⚠️ Flakes

📄   functional/plugins/displayLayout/displayLayout.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Display Layout When multiple plots are contained in a layout, we only ask for annotations once @couchdb
Retry 1Initial Attempt
15% (6) 6 / 40 runs
failed over last 7 days
20% (8) 8 / 40 runs
flaked over last 7 days

View Detailed Build Results


Current Playwright Test Results Summary

✅ 138 Passing - ⚠️ 3 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 09/05/2023 08:52:40am UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: d7a2969

Started: 09/05/2023 08:26:57am UTC

⚠️ Flakes

📄   functional/plugins/plot/logPlot.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Log plot tests Log Plot ticks are functionally correct in regular and log mode and after refresh
Retry 1Initial Attempt
2.15% (2) 2 / 93 runs
failed over last 7 days
41.94% (39) 39 / 93 runs
flaked over last 7 days

📄   functional/plugins/telemetryTable/telemetryTable.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Telemetry Table unpauses and filters data when paused by button and user changes bounds
Retry 1Initial Attempt
4.35% (4) 4 / 92 runs
failed over last 7 days
19.57% (18) 18 / 92 runs
flaked over last 7 days

📄   functional/plugins/notebook/restrictedNotebook.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Restricted Notebook with a page locked and with an embed @addinit Disallows embeds to be deleted if page locked @addinit
Retry 1Initial Attempt
0% (0) 0 / 94 runs
failed over last 7 days
56.38% (53) 53 / 94 runs
flaked over last 7 days

View Detailed Build Results


@ozyx ozyx marked this pull request as ready for review August 30, 2023 23:35
e2e/README.md Outdated
@@ -381,6 +381,27 @@ For best practices with regards to mocking network responses, see our [couchdb.e

The following contains a list of tips and tricks which don't exactly fit into a FAQ or Best Practices doc.

- Overriding the Clock
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overriding the Browser's Clock to control time based elements

Copy link
Collaborator

@unlikelyzero unlikelyzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add hideTree back to improve the speed of execution when using appActions in viper

@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 5, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 5, 2023
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 5, 2023
Copy link
Contributor

@scottbell scottbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timers working well (from what I can tell!):

timers.mov

@scottbell scottbell enabled auto-merge (squash) September 5, 2023 08:45
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 5, 2023
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 5, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 5, 2023
@scottbell scottbell merged commit 0be106f into master Sep 5, 2023
17 of 18 checks passed
@scottbell scottbell deleted the fix-unit-tests branch September 5, 2023 08:53
ozyx added a commit that referenced this pull request Sep 11, 2023
* 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>
ozyx added a commit that referenced this pull request Sep 12, 2023
* 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>
ozyx added a commit that referenced this pull request Sep 12, 2023
* 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>
unlikelyzero added a commit that referenced this pull request Sep 12, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants