aglinxinyuan commented on code in PR #9472:
URL: https://github.com/apache/texera/pull/9472#discussion_r4622906996


##########
frontend/src/react/testing/react-host.browser.spec.ts:
##########
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { AfterViewInit, Component, ElementRef, OnDestroy, viewChild } from 
"@angular/core";
+import { TestBed } from "@angular/core/testing";
+import { createElement } from "react";
+import { createRoot, type Root } from "react-dom/client";
+import { ReactCounter } from "./react-counter.fixture";
+
+@Component({
+  template: `<span>Angular host</span>
+    <div #container></div>`,
+})
+class ReactHostComponent implements AfterViewInit, OnDestroy {
+  private readonly container = 
viewChild.required<ElementRef<HTMLElement>>("container");
+  private root?: Root;
+
+  ngAfterViewInit(): void {
+    this.root = createRoot(this.container().nativeElement);

Review Comment:
   Moved into #9529 in `2fcfe7b015`. The About host now mounts and unmounts 
React outside Angular's zone, and a regression test checks that a React click 
leaves Angular stable.
   



##########
frontend/.eslintrc.json:
##########
@@ -20,7 +20,7 @@
   "ignorePatterns": ["projects/**/*"],
   "overrides": [
     {
-      "files": ["*.ts"],
+      "files": ["*.ts", "*.tsx"],

Review Comment:
   Folded into #9529 in `14342ff7c3`. Both test runners now discover the 
appropriate TSX specs, with matching TypeScript, ESLint and Codecov rules.
   



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