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 component destroy leak #6522

Conversation

sherlock1982
Copy link
Contributor

fixes #6499 #5999

@codecov
Copy link

codecov bot commented Jan 3, 2023

Codecov Report

Merging #6522 (e39ca03) into development (663c70e) will decrease coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #6522      +/-   ##
===============================================
- Coverage        76.98%   76.97%   -0.01%     
===============================================
  Files              315      315              
  Lines            10701    10701              
  Branches          2988     2988              
===============================================
- Hits              8238     8237       -1     
- Misses            2461     2462       +1     
  Partials             2        2              
Impacted Files Coverage Δ
...hemes/bs/bs-daterangepicker-container.component.ts 71.72% <0.00%> (-2.76%) ⬇️
src/chronos/i18n/sk.ts 85.00% <0.00%> (-2.50%) ⬇️
src/chronos/i18n/cs.ts 87.36% <0.00%> (-2.11%) ⬇️
...ker/themes/bs/bs-datepicker-container.component.ts 85.14% <0.00%> (-1.99%) ⬇️
src/chronos/i18n/pl.ts 85.24% <0.00%> (ø)
src/chronos/i18n/uk.ts 90.62% <0.00%> (+3.12%) ⬆️
src/modal/modal-container.component.ts 53.84% <0.00%> (+8.97%) ⬆️

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 663c70e...e39ca03. Read the comment docs.

@cypress
Copy link

cypress bot commented Jan 3, 2023



Test summary

803 35 14 0


Run details

Project ngx-bootstrap
Status Failed
Commit 362cecd ℹ️
Started Jan 5, 2023 7:41 AM
Ended Jan 5, 2023 8:17 AM
Duration 36:06 💡
OS Linux Ubuntu - 22.04
Browser Electron 100

View run in Cypress Dashboard ➡️


Failures

datepicker/locales_spec.ts Failed
1 Datepicker demo testing suite: Locales > Change Locale Datepicker > when user chose locale es-pr for "Datepicker", container shown in appropriate language
2 Datepicker demo testing suite: Locales > Change Locale DateRangepicker > when user chose locale es-pr for "Daterangepicker", container shown in this language
modals_service_page_spec.ts Failed
1 Modals demo page testing suite: Service examples > Component modals with interceptor > when user clicks on "Close" button, triggers the interceptor and doesn't close the modal
2 Modals demo page testing suite: Service examples > Component modals with interceptor > when user clicks on "Yes" button, closes the modal
3 Modals demo page testing suite: Service examples > Component modals with interceptor > when user clicks on "No" button, doesn't close the modal
4 Modals demo page testing suite: Service examples > Nested modals > when user clicks on the button "Open second modal" then the second modal with title "Second modal" is opened, "Close self" is present
5 Modals demo page testing suite: Service examples > Events > when user closes modal by click on the cross then should be messages "onHide event has been fired" and "onHidden event has been fired"
6 Modals demo page testing suite: Service examples > Events > when user closes modal by pressing ESC button then modal is closed and should be messages "onHide event has been fired" and "onHidden event has been fired"
7 Modals demo page testing suite: Service examples > Confirm Window > when user clicks on "Open modal" button then modal is opened, it contains two buttons: "Yes" and "No"
8 Modals demo page testing suite: Service examples > Custom css class > when user clicks on the cross button then the modal is closed
This comment includes only the first 10 test failures. See all 35 failures in the Cypress Dashboard.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link

@Alexveselun Alexveselun left a comment

Choose a reason for hiding this comment

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

Testing completed. Locally work correctly. No critical issues were found.

@sherlock1982
Copy link
Contributor Author

Are these failures caused by my changes or it's just something random? I checked one of the tests and it looks like it's just stuck in the middle.

@SvetlanaMuravlova
Copy link
Contributor

Are these failures caused by my changes or it's just something random? I checked one of the tests and it looks like it's just stuck in the middle.

failures in full e2e tests don't connect with your changes, not all tests are fixed, for some reasons

@@ -228,6 +228,7 @@ export class ComponentLoader<T extends object> {
this._contentRef?.viewRef?.destroy();

this._contentRef = void 0;
this._componentRef.destroy();
Copy link
Member

Choose a reason for hiding this comment

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

I would go with this._componentRef?.destroy()

@lexasq
Copy link
Contributor

lexasq commented Oct 17, 2024

Was merged another PR with the same code

@lexasq lexasq closed this Oct 17, 2024
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.

ngx-bootstrap ComponentLoader have to run destroy() method when component hide?
5 participants