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

Make tree items more actionable and add AppAction for expanding the object tree #5997

Merged
merged 9 commits into from Jan 26, 2023

Conversation

ozyx
Copy link
Member

@ozyx ozyx commented Nov 17, 2022

Closes #5994

Describe your changes:

  • Adds visibility css attributes to the .c-disclosure-triangle on the object tree, so that we can better locate expandable tree items within Playwright.
  • Adds an appAction for expanding the entire object tree

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 Nov 17, 2022

Codecov Report

Merging #5997 (b2b2276) into master (01f7249) will decrease coverage by 0.29%.
The diff coverage is 0.00%.

❗ Current head b2b2276 differs from pull request most recent head 3b7a41c. Consider uploading reports for the commit 3b7a41c to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5997      +/-   ##
==========================================
- Coverage   54.70%   54.41%   -0.29%     
==========================================
  Files         607      607              
  Lines       25959    25943      -16     
  Branches     2349     2350       +1     
==========================================
- Hits        14200    14118      -82     
- Misses      11098    11164      +66     
  Partials      661      661              
Flag Coverage Δ *Carryforward flag
e2e-ci 39.49% <ø> (ø) Carriedforward from 3ae6290
e2e-full 51.23% <ø> (ø) Carriedforward from 3ae6290
e2e-stable 49.84% <ø> (-3.73%) ⬇️
unit 49.20% <0.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
src/api/forms/components/controls/Locator.vue 0.00% <ø> (ø)
src/ui/layout/Layout.vue 19.14% <ø> (ø)
src/ui/layout/mct-tree.vue 9.97% <0.00%> (-0.03%) ⬇️
src/api/forms/toggle-check-box-mixin.js 25.00% <0.00%> (-75.00%) ⬇️
src/plugins/imagery/ImageryView.js 50.00% <0.00%> (-46.43%) ⬇️
src/plugins/viewLargeAction/viewLargeAction.js 31.25% <0.00%> (-43.75%) ⬇️
example/imagery/plugin.js 65.85% <0.00%> (-24.40%) ⬇️
...ugins/flexibleLayout/flexibleLayoutViewProvider.js 76.92% <0.00%> (-15.39%) ⬇️
src/plugins/imagery/mixins/imageryData.js 87.78% <0.00%> (-4.59%) ⬇️
src/plugins/displayLayout/DisplayLayoutToolbar.js 69.51% <0.00%> (-3.26%) ⬇️
... and 5 more

Continue to review full report at Codecov.

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

@ozyx
Copy link
Member Author

ozyx commented Nov 28, 2022

Blocked temporarily. Waiting to upgrade to the version with this fix in it: microsoft/playwright#18920

Now also waiting for this fix to drop: microsoft/playwright#18976 (v1.28.2 or v1.29.x)

@ozyx ozyx added this to the Target:2.1.5 milestone Dec 9, 2022
@ozyx ozyx marked this pull request as ready for review December 28, 2022 01:38
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.

Looks great!

What happens when there are two trees on the page (create modal)? Does the secondary tree expand in the same way?

- The purpose of this is so that Playwright can perform actionability checks on the tree items. This will make operations involving expanding tree items much easier to perform in e2e.
- Use dynamic aria-label for different tree implementations

- Get rid of CSS ids which are only for testing

- Update percy tree scope selector
@ozyx
Copy link
Member Author

ozyx commented Jan 25, 2023

Looks great!

What happens when there are two trees on the page (create modal)? Does the secondary tree expand in the same way?

Updated the appAction to be able to take a tree selector so we can use this against both trees. Also updated trees to use aria-labels instead of CSS ids (which were only used for testing anyway). This enables us to better use the getByRole() playwright pattern

@unlikelyzero unlikelyzero enabled auto-merge (squash) January 26, 2023 16:16
@unlikelyzero unlikelyzero merged commit 8d1a2e6 into master Jan 26, 2023
@ozyx ozyx deleted the mct5994 branch January 26, 2023 17:26
ozyx added a commit that referenced this pull request Jan 26, 2023
… for expanding the object tree

* style: add `visibility` to tree expand triangles

- The purpose of this is so that Playwright can perform actionability checks on the tree items. This will make operations involving expanding tree items much easier to perform in e2e.

* feat(e2e): Add AppAction to expand the entire tree

* fix: wait for loading indicator

* test: add test for `expandEntireTree`

* test: update `expandEntireTree` and tree selectors

- Use dynamic aria-label for different tree implementations

- Get rid of CSS ids which are only for testing

- Update percy tree scope selector

* chore(lint): remove unused variable

* refactor(e2e): update tree locators

Co-authored-by: John Hill <john.c.hill@nasa.gov>
unlikelyzero added a commit that referenced this pull request Jan 26, 2023
… for expanding the object tree (#6200)

* style: add `visibility` to tree expand triangles

- The purpose of this is so that Playwright can perform actionability checks on the tree items. This will make operations involving expanding tree items much easier to perform in e2e.

* feat(e2e): Add AppAction to expand the entire tree

* fix: wait for loading indicator

* test: add test for `expandEntireTree`

* test: update `expandEntireTree` and tree selectors

- Use dynamic aria-label for different tree implementations

- Get rid of CSS ids which are only for testing

- Update percy tree scope selector

* chore(lint): remove unused variable

* refactor(e2e): update tree locators

Co-authored-by: John Hill <john.c.hill@nasa.gov>

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
Development

Successfully merging this pull request may close these issues.

[e2e] Make expandable tree items more actionable
2 participants