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:(SC-3376) Handle delete success/fail toasts on a per object basis #136

Merged
merged 7 commits into from
Oct 25, 2023

Conversation

wilwong89
Copy link
Contributor

@wilwong89 wilwong89 commented Oct 17, 2023

Description

objectStore.ts now uses Promise.allSettled instead of Promise.all and returns an array of objects for each promise with their status.

DeleteObjectButton.vue waits for the array and displays a toast based on each success or fail.

Types of changes

Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Deleting a list of 3 files looks as follows.

Screenshot 2023-10-17 at 2 28 49 PM

@github-actions
Copy link

Coverage Report (Application)

Totals Coverage
Statements: 75% ( 51 / 68 )
Methods: 62.5% ( 5 / 8 )
Lines: 82.61% ( 38 / 46 )
Branches: 57.14% ( 8 / 14 )

@github-actions
Copy link

github-actions bot commented Oct 17, 2023

Coverage Report (Frontend)

Totals Coverage
Statements: 35.69% ( 615 / 1723 )
Methods: 34.64% ( 133 / 384 )
Lines: 42.77% ( 429 / 1003 )
Branches: 15.77% ( 53 / 336 )

Copy link
Contributor

@TimCsaky TimCsaky left a comment

Choose a reason for hiding this comment

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

This all works well now.
aside from the annoying formatting warnings.

wilwong89 and others added 4 commits October 24, 2023 17:06
objectStore.ts now uses Promise.allSettled instead of Promise.all and
returns an array of objects for each promise with their status.

DeleteObjectButton.vue waits for the array and displays a toast based
on each success or fail.
@@ -70,7 +70,7 @@ describe('Object Store', () => {

let createObjectSpy: SpyInstance;
let deleteObjectSpy: SpyInstance;
let fetchObjectsSpy: SpyInstance;
// let fetchObjectsSpy: SpyInstance;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big concern, just wondering why fetchObjectsSpy are commented and not removed?

@jatindersingh93 jatindersingh93 merged commit b597f7e into master Oct 25, 2023
@jujaga jujaga deleted the fix/SC3376 branch October 25, 2023 21:48
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