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(#7552): Fix notebook snapshot image annotations #7555

Merged
merged 16 commits into from
Mar 13, 2024
Merged

Conversation

ozyx
Copy link
Contributor

@ozyx ozyx commented Mar 5, 2024

Closes #7552

Describe your changes:

Fixes imports for painterro as it is exporting CJS, and this is now ESM.

Needed to change:

this.painterro = Painterro(this.config);

to

this.painterro = Painterro.default(this.config);
  • Adds minimal e2e smoke test for notebook snapshot image annotation

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 a notable change 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?
  • 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.
  • Is this a breaking change to be called out in the release notes?
  • 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?

@ozyx ozyx added the type:bug label Mar 5, 2024
@ozyx ozyx added this to the Target:4.0.0 milestone Mar 5, 2024
@ozyx ozyx requested a review from unlikelyzero March 5, 2024 21:38
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 56.16%. Comparing base (18e976a) to head (3aa84a5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7555      +/-   ##
==========================================
+ Coverage   56.04%   56.16%   +0.11%     
==========================================
  Files         672      672              
  Lines       27108    27104       -4     
  Branches     2629     2630       +1     
==========================================
+ Hits        15194    15224      +30     
+ Misses      11591    11557      -34     
  Partials      323      323              
Flag Coverage Δ
e2e-full 23.60% <0.00%> (ø)
e2e-stable 59.98% <100.00%> (+0.24%) ⬆️
unit 49.12% <66.66%> (-0.01%) ⬇️
Files Coverage Δ
src/api/overlays/components/OverlayComponent.vue 75.00% <ø> (ø)
src/plugins/notebook/components/NotebookEmbed.vue 0.00% <ø> (ø)
src/plugins/notebook/utils/painterroInstance.js 88.88% <100.00%> (+85.18%) ⬆️
src/plugins/timelist/TimelistComponent.vue 63.58% <80.00%> (+0.77%) ⬆️

... and 8 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 18e976a...3aa84a5. Read the comment docs.

@@ -516,6 +516,30 @@ test.describe('foo test suite', () => {
- Working with multiple pages
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.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is great, although I'm worried that without something specific to our e2e testing framework we're just reproducing the Playwright docs here?

Comment on lines +146 to +157
// Save as JPG
await Promise.all([
page.waitForEvent('download'), // Waits for the download event
page.getByLabel('Export as JPG').click() // Triggers the download
]);

// Save as PNG
await expect(page.getByLabel('Modal Overlay').getByRole('img')).toBeVisible();
await Promise.all([
page.waitForEvent('download'), // Waits for the download event
page.getByLabel('Export as PNG').click() // Triggers the download
]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

awesome!

@ozyx ozyx requested a review from jvigliotta March 8, 2024 19:38
Copy link
Contributor

@jvigliotta jvigliotta left a comment

Choose a reason for hiding this comment

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

Looks great, one suggestion.

@unlikelyzero unlikelyzero self-requested a review March 11, 2024 23:00
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.

LGTM

@ozyx ozyx requested a review from jvigliotta March 11, 2024 23:41
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 12, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 12, 2024
Copy link
Contributor

@jvigliotta jvigliotta left a comment

Choose a reason for hiding this comment

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

Looks great! Nice work.

@jvigliotta jvigliotta enabled auto-merge (squash) March 12, 2024 17:43
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 12, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 12, 2024
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 13, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 13, 2024
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 13, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 13, 2024
@jvigliotta jvigliotta merged commit faed27c into master Mar 13, 2024
21 checks passed
@jvigliotta jvigliotta deleted the mct7552 branch March 13, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annotating image notebook snapshots is broken
3 participants