mengw15 commented on code in PR #5037:
URL: https://github.com/apache/texera/pull/5037#discussion_r3237983720


##########
frontend/src/app/workspace/component/workspace.component.spec.ts:
##########
@@ -130,12 +130,16 @@ describe("WorkspaceComponent", () => {
     routerMock = { navigate: vi.fn() };
     locationMock = { go: vi.fn() };
 
-    // TODO(#5015): drop this template override once CodeEditorComponent's
-    // own spec is fixed. Real child rendering would let us assert
-    // editor-lifecycle wiring; today we stub the host element so the
-    // heavyweight children don't compile in the test build.
+    // Replace the component imports with an empty list and rely on 
NO_ERRORS_SCHEMA
+    // so the heavyweight children (workflow editor, panels, menu, etc.) become
+    // unknown elements at compile time. The real template still renders, which
+    // means the `<ng-template #codeEditor>` outlet is wired up and the 
@ViewChild
+    // query in WorkspaceComponent resolves to a real ViewContainerRef. 
Children's
+    // own dependency trees never come into the test build, which keeps the 
spec
+    // hermetic without the previous `<div #codeEditor>` template stub. (See
+    // #5015 for why the previous template-override hack existed.)

Review Comment:
   Also "rely on NO_ERRORS_SCHEMA" is this correct?
   



-- 
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]

Reply via email to