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

MMT-3895: Now pulls in ALL selected collections. #1301

Merged
merged 4 commits into from
Sep 24, 2024
Merged

MMT-3895: Now pulls in ALL selected collections. #1301

merged 4 commits into from
Sep 24, 2024

Conversation

cgokey
Copy link
Collaborator

@cgokey cgokey commented Sep 23, 2024

Overview

What is the feature?

A user reported that its primary access policy that exposes > 800 collections in ops was reduced to only 20 collections after a update the ACL.

What is the Solution?

The selected collections pane was only retrieving 20 collections, even though the ACL could have many more. Therefore, when the ACL was updated, it would only update with the 20 collections it retrieved and not the full list of collections in the ACL.

The solution is to use fetchMore provided by Apollo to request all the collections in the ACL.

What areas of the application does this impact?

The collection permissions page.

Testing

Try finding a ACL that has over 20 collections (or create a ACL that includes more than 20). Verify you can add and remove collections. Verify all collections you add show up in the right pane and the submit works properly with your additions and subtractions.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.66%. Comparing base (81eff52) to head (3a7353f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1301      +/-   ##
==========================================
+ Coverage   97.52%   97.66%   +0.13%     
==========================================
  Files         362      362              
  Lines        5540     5565      +25     
  Branches     1155     1162       +7     
==========================================
+ Hits         5403     5435      +32     
+ Misses        136      129       -7     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -270,7 +270,7 @@ describe('CollectionSelector', () => {

await user.type(searchField, 'C')

expect(await screen.findByText('Showing 2 items')).toBeInTheDocument()
expect(await screen.findByText('Showing 1 items')).toBeInTheDocument()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this change to 1 again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure, but the mock only has 1 collection as the result. So it is correct.

@cgokey cgokey merged commit e7e5afa into main Sep 24, 2024
5 checks passed
@cgokey cgokey deleted the MMT-3895 branch September 24, 2024 19:56
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.

4 participants