This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-9375-03290bca816b6ece6e448c23be86d38b2094ada1
in repository https://gitbox.apache.org/repos/asf/texera.git

commit a2ba591b33c80b180c4399e5da3896187a7476d2
Author: Xinyuan Lin <[email protected]>
AuthorDate: Mon Nov 9 07:52:23 2026 +0000

    test(frontend): remove unused test scaffolding (#9375)
    
    ### What changes were proposed in this PR?
    Remove unused frontend test scaffolding in one cleanup: fixture defaults
    that no caller selects, an unused setup mode, unread fixture variables,
    and unused imports. Keep all assertions, providers, and
    dependency-injection calls.
    
    ### Any related issues, documentation, discussions?
    Closes #9373.
    
    ### How was this PR tested?
    All 609 existing cases pass before and after. From `frontend/`:
    
    ```bash
    node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng.js test \
      --watch=false \
      --reporters=junit \
      --output-file=junit.xml \
      
--include=src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.spec.ts
 \
      
--include=src/app/dashboard/component/admin/execution/admin-execution.component.spec.ts
 \
      
--include=src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.spec.ts
 \
      --include=src/app/dashboard/type/search-filter-parameters.spec.ts \
      
--include=src/app/hub/component/browse-section/browse-section.component.spec.ts 
\
      
--include=src/app/workspace/component/result-panel/ai-fix/ai-workflow-fixer.service.spec.ts
 \
      
--include=src/app/workspace/component/agent/agent-panel/agent-chat/agent-chat.component.spec.ts
 \
      
--include=src/app/workspace/service/operator-metadata/operator-metadata.service.spec.ts
 \
      
--include=src/app/workspace/service/workflow-result-export/workflow-result-export.service.spec.ts
 \
      
--include=src/app/workspace/service/workflow-status/operator-reuse-cache-status.service.spec.ts
 \
      
--include=src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
 \
      
--include=src/app/hub/component/hub-search-result/hub-search-result.component.spec.ts
    node .yarn/releases/yarn-4.14.1.cjs format:ci
    node node_modules/typescript/bin/tsc --noEmit -p src/tsconfig.app.json
    node node_modules/typescript/bin/tsc --noEmit -p src/tsconfig.spec.json
    node .yarn/releases/yarn-4.14.1.cjs run build
    ```
    
    ### Was this PR authored or co-authored using generative AI tooling?
    Generated-by: Codex (GPT-6)
---
 .../computing-unit-create-modal.component.spec.ts                 | 2 +-
 .../component/admin/execution/admin-execution.component.spec.ts   | 2 +-
 .../workflow-execution-history.component.spec.ts                  | 2 +-
 frontend/src/app/dashboard/type/search-filter-parameters.spec.ts  | 4 ++--
 .../hub/component/browse-section/browse-section.component.spec.ts | 2 +-
 .../hub-search-result/hub-search-result.component.spec.ts         | 6 ++----
 .../agent/agent-panel/agent-chat/agent-chat.component.spec.ts     | 2 +-
 .../power-button/computing-unit-selection.component.spec.ts       | 2 +-
 .../result-panel/ai-fix/ai-workflow-fixer.service.spec.ts         | 1 -
 .../service/operator-metadata/operator-metadata.service.spec.ts   | 3 +--
 .../workflow-result-export/workflow-result-export.service.spec.ts | 8 ++------
 .../workflow-status/operator-reuse-cache-status.service.spec.ts   | 3 +--
 12 files changed, 14 insertions(+), 23 deletions(-)

diff --git 
a/frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.spec.ts
 
b/frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.spec.ts
index 5760e7d6c9..c3503910ab 100644
--- 
a/frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.spec.ts
+++ 
b/frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.spec.ts
@@ -40,7 +40,7 @@ import { buildLocalComputingUnitUri, getJvmMemorySliderConfig 
} from "../../util
 describe("ComputingUnitCreateModalComponent", () => {
   let component: ComputingUnitCreateModalComponent;
   let fixture: ComponentFixture<ComputingUnitCreateModalComponent>;
-  const curatedImage = (over: Partial<CuImage> = {}): CuImage => ({
+  const curatedImage = (over: Partial<CuImage>): CuImage => ({
     iid: 1,
     name: "Python ML",
     sourceRef: "owner/name:1",
diff --git 
a/frontend/src/app/dashboard/component/admin/execution/admin-execution.component.spec.ts
 
b/frontend/src/app/dashboard/component/admin/execution/admin-execution.component.spec.ts
index 7a8bd7818a..4281a38838 100644
--- 
a/frontend/src/app/dashboard/component/admin/execution/admin-execution.component.spec.ts
+++ 
b/frontend/src/app/dashboard/component/admin/execution/admin-execution.component.spec.ts
@@ -197,7 +197,7 @@ describe("AdminExecutionComponent methods (#6550)", () => {
 
   const NOW = 1_700_000_000_000; // fixed clock (ms) for Date.now()-based logic
 
-  function makeExecution(over: Partial<Execution> = {}): Execution {
+  function makeExecution(over: Partial<Execution>): Execution {
     return {
       access: true,
       workflowId: 1,
diff --git 
a/frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.spec.ts
 
b/frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.spec.ts
index 033312b469..2541e89054 100644
--- 
a/frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.spec.ts
+++ 
b/frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.spec.ts
@@ -40,7 +40,7 @@ import { NoopAnimationsModule } from 
"@angular/platform-browser/animations";
 import { NzPopoverDirective } from "ng-zorro-antd/popover";
 import type { MockInstance } from "vitest";
 
-function makeEntry(overrides: Partial<WorkflowExecutionsEntry> = {}): 
WorkflowExecutionsEntry {
+function makeEntry(overrides: Partial<WorkflowExecutionsEntry>): 
WorkflowExecutionsEntry {
   return {
     eId: 1,
     vId: 1,
diff --git a/frontend/src/app/dashboard/type/search-filter-parameters.spec.ts 
b/frontend/src/app/dashboard/type/search-filter-parameters.spec.ts
index 531663d346..02c7483e3e 100644
--- a/frontend/src/app/dashboard/type/search-filter-parameters.spec.ts
+++ b/frontend/src/app/dashboard/type/search-filter-parameters.spec.ts
@@ -168,7 +168,7 @@ interface WorkflowEntryOverrides {
   operatorTypes?: string[];
 }
 
-function makeWorkflowEntry(overrides: WorkflowEntryOverrides = {}): 
DashboardEntry {
+function makeWorkflowEntry(overrides: WorkflowEntryOverrides): DashboardEntry {
   const operators = (overrides.operatorTypes ?? []).map(
     (operatorType, i) => ({ operatorID: `op${i}`, operatorType }) as unknown 
as OperatorPredicate
   );
@@ -201,7 +201,7 @@ function makeWorkflowEntry(overrides: 
WorkflowEntryOverrides = {}): DashboardEnt
   return new DashboardEntry(workflow);
 }
 
-function makeDatasetEntry(name = "dataset"): DashboardEntry {
+function makeDatasetEntry(name: string): DashboardEntry {
   const dataset: DashboardDataset = {
     isOwner: false,
     ownerEmail: "[email protected]",
diff --git 
a/frontend/src/app/hub/component/browse-section/browse-section.component.spec.ts
 
b/frontend/src/app/hub/component/browse-section/browse-section.component.spec.ts
index 93df3c08c6..7756582937 100644
--- 
a/frontend/src/app/hub/component/browse-section/browse-section.component.spec.ts
+++ 
b/frontend/src/app/hub/component/browse-section/browse-section.component.spec.ts
@@ -280,7 +280,7 @@ describe("BrowseSectionComponent rendering", () => {
     return fixture.nativeElement as HTMLElement;
   }
 
-  const entity = (over: Partial<Record<string, unknown>> = {}) =>
+  const entity = (over: Partial<Record<string, unknown>>) =>
     ({ id: 1, type: "dataset", accessibleUserIds: [], name: "flow", ...over }) 
as unknown as DashboardEntry;
 
   it("renders nothing at all for an empty section", () => {
diff --git 
a/frontend/src/app/hub/component/hub-search-result/hub-search-result.component.spec.ts
 
b/frontend/src/app/hub/component/hub-search-result/hub-search-result.component.spec.ts
index 5ba06789d7..2344b45766 100644
--- 
a/frontend/src/app/hub/component/hub-search-result/hub-search-result.component.spec.ts
+++ 
b/frontend/src/app/hub/component/hub-search-result/hub-search-result.component.spec.ts
@@ -148,13 +148,11 @@ describe("HubSearchResultComponent", () => {
     });
   }
 
-  function build(entityType?: EntityType, detectChanges: boolean = true): void 
{
+  function build(entityType?: EntityType): void {
     configure(entityType);
     fixture = TestBed.createComponent(HubSearchResultComponent);
     component = fixture.componentInstance;
-    if (detectChanges) {
-      fixture.detectChanges();
-    }
+    fixture.detectChanges();
   }
 
   function makeFiltersMock(list: ReadonlyArray<string> = ["a"]): FiltersMock {
diff --git 
a/frontend/src/app/workspace/component/agent/agent-panel/agent-chat/agent-chat.component.spec.ts
 
b/frontend/src/app/workspace/component/agent/agent-panel/agent-chat/agent-chat.component.spec.ts
index bb17ef1794..ad78b7eda9 100644
--- 
a/frontend/src/app/workspace/component/agent/agent-panel/agent-chat/agent-chat.component.spec.ts
+++ 
b/frontend/src/app/workspace/component/agent/agent-panel/agent-chat/agent-chat.component.spec.ts
@@ -24,7 +24,7 @@ import { By } from "@angular/platform-browser";
 import { NoopAnimationsModule } from "@angular/platform-browser/animations";
 import { NzModalComponent, NzModalService } from "ng-zorro-antd/modal";
 import { MarkdownModule } from "ngx-markdown";
-import { BehaviorSubject, Observable, Subject, of, throwError } from "rxjs";
+import { BehaviorSubject, Observable, of, throwError } from "rxjs";
 import { AgentChatComponent } from "./agent-chat.component";
 import { ReActStepDetailModalComponent } from 
"../react-step-detail-modal/react-step-detail-modal.component";
 import { AgentInfo, AgentService, AgentSettingsApi } from 
"../../../../service/agent/agent.service";
diff --git 
a/frontend/src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
 
b/frontend/src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
index c3085c0792..29cdc4cf3f 100644
--- 
a/frontend/src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
+++ 
b/frontend/src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
@@ -85,7 +85,7 @@ function makeComputingUnit(
     uri = `uri-${cuid}`,
     type = "kubernetes",
     status = "Running",
-    statusReason = undefined,
+    statusReason,
     isOwner = true,
     accessPrivilege = "WRITE",
   } = overrides;
diff --git 
a/frontend/src/app/workspace/component/result-panel/ai-fix/ai-workflow-fixer.service.spec.ts
 
b/frontend/src/app/workspace/component/result-panel/ai-fix/ai-workflow-fixer.service.spec.ts
index f47800315b..3467a433a6 100644
--- 
a/frontend/src/app/workspace/component/result-panel/ai-fix/ai-workflow-fixer.service.spec.ts
+++ 
b/frontend/src/app/workspace/component/result-panel/ai-fix/ai-workflow-fixer.service.spec.ts
@@ -29,7 +29,6 @@ import {
 } from "./ai-workflow-fixer.service";
 import { WorkflowActionService } from 
"../../../service/workflow-graph/model/workflow-action.service";
 import { ExecuteWorkflowService } from 
"../../../service/execute-workflow/execute-workflow.service";
-import { GuiConfigService } from 
"../../../../common/service/gui-config.service";
 import { commonTestProviders } from "../../../../common/testing/test-utils";
 import { OperatorMetadataService } from 
"../../../service/operator-metadata/operator-metadata.service";
 import { WorkflowConsoleService } from 
"../../../service/workflow-console/workflow-console.service";
diff --git 
a/frontend/src/app/workspace/service/operator-metadata/operator-metadata.service.spec.ts
 
b/frontend/src/app/workspace/service/operator-metadata/operator-metadata.service.spec.ts
index 7b57e3aa2e..08e040bb5c 100644
--- 
a/frontend/src/app/workspace/service/operator-metadata/operator-metadata.service.spec.ts
+++ 
b/frontend/src/app/workspace/service/operator-metadata/operator-metadata.service.spec.ts
@@ -28,7 +28,6 @@ import type { OperatorMetadata } from 
"../../types/operator-schema.interface";
 
 describe("OperatorMetadataService", () => {
   let service: OperatorMetadataService;
-  let httpClient: HttpClient;
   let httpTestingController: HttpTestingController;
 
   beforeEach(() => {
@@ -37,7 +36,7 @@ describe("OperatorMetadataService", () => {
       providers: [OperatorMetadataService, ...commonTestProviders],
     });
 
-    httpClient = TestBed.inject(HttpClient);
+    TestBed.inject(HttpClient);
     httpTestingController = TestBed.inject(HttpTestingController);
     service = TestBed.inject(OperatorMetadataService);
   });
diff --git 
a/frontend/src/app/workspace/service/workflow-result-export/workflow-result-export.service.spec.ts
 
b/frontend/src/app/workspace/service/workflow-result-export/workflow-result-export.service.spec.ts
index a1b13898d6..09e68751a9 100644
--- 
a/frontend/src/app/workspace/service/workflow-result-export/workflow-result-export.service.spec.ts
+++ 
b/frontend/src/app/workspace/service/workflow-result-export/workflow-result-export.service.spec.ts
@@ -39,13 +39,11 @@ import { MockGuiConfigService } from 
"../../../common/service/gui-config.service
 import { DashboardWorkflowComputingUnit } from 
"../../../common/type/workflow-computing-unit";
 describe("WorkflowResultExportService", () => {
   let service: WorkflowResultExportService;
-  let workflowWebsocketServiceSpy: Mocked<WorkflowWebsocketService>;
   let workflowActionServiceSpy: Mocked<WorkflowActionService>;
   let notificationServiceSpy: Mocked<NotificationService>;
   let executeWorkflowServiceSpy: Mocked<ExecuteWorkflowService>;
   let workflowResultServiceSpy: Mocked<WorkflowResultService>;
   let downloadServiceSpy: Mocked<DownloadService>;
-  let datasetServiceSpy: Mocked<DatasetService>;
 
   let jointGraphWrapperSpy: Mocked<JointGraphWrapper>;
   let texeraGraphSpy: Mocked<WorkflowGraph>;
@@ -121,15 +119,13 @@ describe("WorkflowResultExportService", () => {
 
     // Inject the service and spies
     service = TestBed.inject(WorkflowResultExportService);
-    workflowWebsocketServiceSpy = TestBed.inject(
-      WorkflowWebsocketService
-    ) as unknown as Mocked<WorkflowWebsocketService>;
+    TestBed.inject(WorkflowWebsocketService) as unknown as 
Mocked<WorkflowWebsocketService>;
     workflowActionServiceSpy = TestBed.inject(WorkflowActionService) as 
unknown as Mocked<WorkflowActionService>;
     notificationServiceSpy = TestBed.inject(NotificationService) as unknown as 
Mocked<NotificationService>;
     executeWorkflowServiceSpy = TestBed.inject(ExecuteWorkflowService) as 
unknown as Mocked<ExecuteWorkflowService>;
     workflowResultServiceSpy = TestBed.inject(WorkflowResultService) as 
unknown as Mocked<WorkflowResultService>;
     downloadServiceSpy = TestBed.inject(DownloadService) as unknown as 
Mocked<DownloadService>;
-    datasetServiceSpy = TestBed.inject(DatasetService) as unknown as 
Mocked<DatasetService>;
+    TestBed.inject(DatasetService) as unknown as Mocked<DatasetService>;
 
     // Reset the GuiConfig to a known baseline (export disabled) so tests that
     // enable it via enableExport() do not leak state and become 
order-dependent.
diff --git 
a/frontend/src/app/workspace/service/workflow-status/operator-reuse-cache-status.service.spec.ts
 
b/frontend/src/app/workspace/service/workflow-status/operator-reuse-cache-status.service.spec.ts
index 08cadef93e..54821d7379 100644
--- 
a/frontend/src/app/workspace/service/workflow-status/operator-reuse-cache-status.service.spec.ts
+++ 
b/frontend/src/app/workspace/service/workflow-status/operator-reuse-cache-status.service.spec.ts
@@ -50,7 +50,6 @@ describe("OperatorCacheStatusService", () => {
 });
 
 describe("OperatorCacheStatusService - behavior", () => {
-  let service: OperatorReuseCacheStatusService;
   let reuseCacheOpsChanged$: Subject<any>;
   let mockJointUIService: any;
   let mockJointGraphWrapper: any;
@@ -87,7 +86,7 @@ describe("OperatorCacheStatusService - behavior", () => {
       ],
     });
 
-    service = TestBed.inject(OperatorReuseCacheStatusService);
+    TestBed.inject(OperatorReuseCacheStatusService);
   });
 
   it("calls changeOperatorReuseCacheStatus for all ops in a reuse cache 
operators changed event", () => {

Reply via email to