-
Notifications
You must be signed in to change notification settings - Fork 32
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
[ME]: Clean up attachments on publishing #1004
Conversation
Affected libs:
|
1d14433
to
7156342
Compare
📷 Screenshots are here! |
e49a41a
to
6205ee3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good and tested OK, thanks!
I just have a few questions, but for my own understanding.
it('dispatch markRecordAsChanged', () => { | ||
actions = hot('-a-|', { | ||
a: EditorActions.saveRecordSuccess(), | ||
}) | ||
const expected = hot('---|') | ||
expect(effects.cleanRecordAttachments$).toBeObservable(expected) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this test... Is it the proper it
description?
Also, the way I read the marble test, no emit is expected on the observable. Is it really what we want, or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to change the it after the copy pasta. The observable returns void so I don't know if I can marble that differently ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is that no event is different from an event with no content. Searching on SO, most people expect an undefined tick: https://stackoverflow.com/questions/64258427/how-do-i-marble-test-an-observable-of-void-values
6205ee3
to
8b83fc7
Compare
… action that delete all ressources that are not used in the record.
5ae18ca
to
4bccb25
Compare
4bccb25
to
4ee2cf9
Compare
This PR add an effect cleanRecordAttachments on saveRecordSuccess action that delete all ressources that are not used in the record.
Quality Assurance Checklist
breaking change
labelbackport <release branch>
labelThis work is sponsored by.