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

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


The following commit(s) were added to refs/heads/main by this push:
     new 397d2757f3 test(frontend): add ConflictingFileModalContentComponent 
unit tests (#5631)
397d2757f3 is described below

commit 397d2757f3094818c96681261324cc9a9ff17763
Author: lie18uci <[email protected]>
AuthorDate: Fri Jun 12 09:52:41 2026 -0700

    test(frontend): add ConflictingFileModalContentComponent unit tests (#5631)
    
    ### What changes were proposed in this PR?
    
    Frontend unit tests for ConflictingFileModalContentComponent are added
    in this PR.
    
    The updated specification confirms that:
    
    1. The component has been successfully generated.
    2. The modal data inserted through NZ_MODAL_DATA is exposed by the
    component.
    
    Without altering current behavior, this increases test coverage for a
    minor presentational modal component.
    
    
    ### Any related issues, documentation, discussions?
    
    Closes #5465
    
    
    ### How was this PR tested?
    Ran the following command locally from the frontend directory:
    yarn test
    --include='**/conflicting-file-modal-content.component.spec.ts'
    The test passed successfully with 1 test file passed and 2 tests passed.
    
    Also ran:
    yarn lint
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: ChatGPT
    
    ChatGPT assisted me in finding the location of the component,
    structuring the unit test, and executing the test command. I read
    through the guidance provided by ChatGPT, made the necessary changes
    locally, and ran the test myself.
---
 ...onflicting-file-modal-content.component.spec.ts | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git 
a/frontend/src/app/dashboard/component/user/files-uploader/conflicting-file-modal-content/conflicting-file-modal-content.component.spec.ts
 
b/frontend/src/app/dashboard/component/user/files-uploader/conflicting-file-modal-content/conflicting-file-modal-content.component.spec.ts
new file mode 100644
index 0000000000..01149133b2
--- /dev/null
+++ 
b/frontend/src/app/dashboard/component/user/files-uploader/conflicting-file-modal-content/conflicting-file-modal-content.component.spec.ts
@@ -0,0 +1,46 @@
+/**
+ * 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 { ComponentFixture, TestBed } from "@angular/core/testing";
+import { NZ_MODAL_DATA } from "ng-zorro-antd/modal";
+import { ConflictingFileModalContentComponent } from 
"./conflicting-file-modal-content.component";
+
+describe("ConflictingFileModalContentComponent", () => {
+  const data = { fileName: "a.csv", path: "/a.csv", size: "1 KB" };
+  let component: ConflictingFileModalContentComponent;
+  let fixture: ComponentFixture<ConflictingFileModalContentComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [ConflictingFileModalContentComponent],
+      providers: [{ provide: NZ_MODAL_DATA, useValue: data }],
+    }).compileComponents();
+    fixture = TestBed.createComponent(ConflictingFileModalContentComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it("should create", () => {
+    expect(component).toBeTruthy();
+  });
+
+  it("should expose injected modal data", () => {
+    expect(component.data).toEqual(data);
+  });
+});

Reply via email to