Copilot commented on code in PR #6789:
URL: https://github.com/apache/texera/pull/6789#discussion_r3628091108
##########
frontend/src/app/workspace/component/property-editor/property-editor.component.spec.ts:
##########
@@ -57,9 +61,15 @@ describe("PropertyEditorComponent", () => {
fixture = TestBed.createComponent(PropertyEditorComponent);
component = fixture.componentInstance;
workflowActionService = TestBed.inject(WorkflowActionService);
+ panelService = TestBed.inject(PanelService);
fixture.detectChanges();
});
+ afterEach(() => {
+ vi.restoreAllMocks();
+ fixture.destroy();
+ });
Review Comment:
`PropertyEditorComponent` schedules a `setTimeout` in
`updateHeightBasedOnContent()` (invoked by highlight handlers). Many tests
trigger highlight events, so pending macro-tasks can still be running when
teardown happens, which can cause flaky failures (callbacks firing after the
fixture is destroyed). Also, localStorage keys written during
`ngOnDestroy`/`beforeunload` can leak across tests.
Consider awaiting fixture stability before teardown, destroy the fixture
before restoring mocks, and clearing the right-panel localStorage keys in
`afterEach`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]