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: DisplayLayout and FlexibleLayout toolbar actions only apply to selected layout #7184

Merged
merged 25 commits into from Nov 2, 2023

Conversation

ozyx
Copy link
Member

@ozyx ozyx commented Oct 30, 2023

Closes #7176

Describe your changes:

  • Adds a keyString to the event name emitted by toolbar context actions to uniquely apply the action against the selected object
  • Adds e2e tests for adding/removing layout objects into a display layout with child layouts
  • Adds e2e test stubs for other toolbar action tests

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)

@ozyx ozyx added this to the Target:3.2.0 milestone Oct 30, 2023
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #7184 (f58465d) into master (bdff210) will decrease coverage by 4.07%.
The diff coverage is 88.18%.

@@            Coverage Diff             @@
##           master    #7184      +/-   ##
==========================================
- Coverage   59.97%   55.91%   -4.07%     
==========================================
  Files         415      652     +237     
  Lines       12941    26187   +13246     
  Branches        0     2524    +2524     
==========================================
+ Hits         7762    14643    +6881     
- Misses       5179    10839    +5660     
- Partials        0      705     +705     
Flag Coverage Δ *Carryforward flag
e2e-full 41.44% <ø> (-0.32%) ⬇️ Carriedforward from bdff210
e2e-stable 57.93% <84.82%> (+0.56%) ⬆️
unit 49.33% <47.67%> (?)

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

Files Coverage Δ
src/plugins/displayLayout/components/BoxView.vue 0.00% <ø> (ø)
...plugins/displayLayout/components/DisplayLayout.vue 12.47% <100.00%> (ø)
...ins/displayLayout/components/DisplayLayoutGrid.vue 0.00% <ø> (ø)
...c/plugins/displayLayout/components/EllipseView.vue 0.00% <ø> (ø)
src/plugins/displayLayout/components/TextView.vue 0.00% <ø> (ø)
src/plugins/displayLayout/plugin.js 91.66% <100.00%> (-0.23%) ⬇️
...ugins/flexibleLayout/flexibleLayoutViewProvider.js 95.83% <100.00%> (-0.17%) ⬇️
src/ui/toolbar/components/ToolbarMenu.vue 0.00% <ø> (ø)
src/plugins/displayLayout/components/LineView.vue 22.01% <0.00%> (ø)
src/plugins/flexibleLayout/toolbarProvider.js 63.46% <55.55%> (+0.41%) ⬆️
... and 3 more

... and 375 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 bdff210...f58465d. Read the comment docs.

@deploysentinel
Copy link

deploysentinel bot commented Oct 30, 2023

Current Playwright Test Results Summary

✅ 14 Passing

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

(Last updated on 11/02/2023 08:42:12pm UTC)

Run Details

Running Workflow e2e-couchdb on Github Actions

Commit: f58465d

Started: 11/02/2023 08:40:41pm UTC

View Detailed Build Results


Current Playwright Test Results Summary

✅ 152 Passing - ⚠️ 8 Flaky

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

(Last updated on 11/02/2023 08:42:12pm UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: f58465d

Started: 11/02/2023 08:14:21pm 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 2Retry 1Initial Attempt
2.97% (3) 3 / 101 runs
failed over last 7 days
53.47% (54) 54 / 101 runs
flaked over last 7 days

📄   functional/plugins/notebook/restrictedNotebook.e2e.spec.js • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Restricted Notebook with a page locked and with an embed @addinit Allows embeds to be deleted if page unlocked @addinit
Retry 1Initial Attempt
5.36% (6) 6 / 112 runs
failed over last 7 days
37.50% (42) 42 / 112 runs
flaked over last 7 days
Restricted Notebook with a page locked and with an embed @addinit Disallows embeds to be deleted if page locked @addinit
Retry 1Initial Attempt
6.60% (7) 7 / 106 runs
failed over last 7 days
35.85% (38) 38 / 106 runs
flaked over last 7 days

📄   functional/planning/ganttChart.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Gantt Chart Can select a single activity and display its details in the inspector
Retry 1Initial Attempt
0.70% (1) 1 / 143 run
failed over last 7 days
0.70% (1) 1 / 143 run
flaked over last 7 days

📄   functional/planning/timelist.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Time List Create a Time List, add a single Plan to it and verify all the activities are displayed with no milliseconds
Retry 1Initial Attempt
5.59% (8) 8 / 143 runs
failed over last 7 days
51.05% (73) 73 / 143 runs
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Flexible Layout items in a flexible layout can be removed with object tree context menu when viewing the flexible layout
Retry 1Initial Attempt
0% (0) 0 / 129 runs
failed over last 7 days
0.78% (1) 1 / 129 run
flaked over last 7 days

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Snapshot image tests Can drop an image onto a notebook and create a new entry
Retry 1Initial Attempt
3.57% (4) 4 / 112 runs
failed over last 7 days
66.96% (75) 75 / 112 runs
flaked over last 7 days

📄   functional/plugins/imagery/exampleImagery.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Example Imagery Object Can use Mouse Wheel to zoom in and out of latest image
Retry 1Initial Attempt
0% (0) 0 / 112 runs
failed over last 7 days
4.46% (5) 5 / 112 runs
flaked over last 7 days

View Detailed Build Results


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.

Excellent work @ozyx!

Before:

before.mov

After:

Screen.Recording.2023-10-31.at.9.41.38.AM.mov

Had some minor comments, but otherwise looking good.

@ozyx ozyx marked this pull request as ready for review November 1, 2023 20:58
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.

Tested and looked good. Had a question about checking in the JSON representation of the nest display layouts. Did we want to check this in? Will it change from run to run?

e2e/test-data/display_layout_with_child_layouts.json Outdated Show resolved Hide resolved
@ozyx ozyx requested a review from scottbell November 2, 2023 18:41
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 2, 2023
@ozyx ozyx enabled auto-merge (squash) November 2, 2023 20:41
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 2, 2023
@ozyx ozyx merged commit 02f1013 into master Nov 2, 2023
14 of 16 checks passed
@ozyx ozyx deleted the mct7176 branch November 2, 2023 20:42
ozyx added a commit that referenced this pull request Nov 2, 2023
…ions only apply to selected layout

* 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
ozyx added a commit that referenced this pull request Nov 3, 2023
…ions only apply to selected layout

* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Display Layout] Adding a Drawing Object to a parent layout also adds it to the child layout
2 participants