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

arshad pushed a commit to branch frontend-refactor
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/frontend-refactor by this push:
     new f910cf0c8b AMBARI-26565 : Fix build issues (#4098)
f910cf0c8b is described below

commit f910cf0c8b462f0bfe5295302b56994466e7d071
Author: Himanshu Maurya <[email protected]>
AuthorDate: Fri Dec 19 15:01:38 2025 +0530

    AMBARI-26565 : Fix build issues (#4098)
---
 .../src/components/AddVersionModal/index.tsx       | 17 +++++++++
 .../src/tests/StackVersions/Register.test.tsx      | 42 +++++++++++-----------
 2 files changed, 38 insertions(+), 21 deletions(-)

diff --git 
a/ambari-admin/src/main/resources/ui/ambari-admin/src/components/AddVersionModal/index.tsx
 
b/ambari-admin/src/main/resources/ui/ambari-admin/src/components/AddVersionModal/index.tsx
index 1380807872..a5e3dcb2c2 100644
--- 
a/ambari-admin/src/main/resources/ui/ambari-admin/src/components/AddVersionModal/index.tsx
+++ 
b/ambari-admin/src/main/resources/ui/ambari-admin/src/components/AddVersionModal/index.tsx
@@ -1,3 +1,20 @@
+/**
+ * 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 { ChangeEvent, useState } from 'react'
 import { Button, Form, FormControl, Modal } from 'react-bootstrap'
 import toast from 'react-hot-toast'
diff --git 
a/ambari-admin/src/main/resources/ui/ambari-admin/src/tests/StackVersions/Register.test.tsx
 
b/ambari-admin/src/main/resources/ui/ambari-admin/src/tests/StackVersions/Register.test.tsx
index 1f81084412..bda3913f84 100644
--- 
a/ambari-admin/src/main/resources/ui/ambari-admin/src/tests/StackVersions/Register.test.tsx
+++ 
b/ambari-admin/src/main/resources/ui/ambari-admin/src/tests/StackVersions/Register.test.tsx
@@ -44,7 +44,7 @@ describe("Register Component", () => {
   it("renders without crashing", () => {
     render(
       <AppContent.Provider value={mockContext}>
-        <Router history={createMemoryHistory()}>
+        <Router history={createMemoryHistory() as any}>
           <Register readOnly={false} />
         </Router>
       </AppContent.Provider>
@@ -54,7 +54,7 @@ describe("Register Component", () => {
   it("Check for all Version Definitions to be present on screen", async () => {
     render(
       <AppContent.Provider value={mockContext}>
-        <Router history={createMemoryHistory()}>
+        <Router history={createMemoryHistory() as any}>
           <Register readOnly={false} />
         </Router>
       </AppContent.Provider>
@@ -67,7 +67,7 @@ describe("Register Component", () => {
   it("Check for Stack Services Table to be present on the screen", async () => 
{
     render(
       <AppContent.Provider value={mockContext}>
-        <Router history={createMemoryHistory()}>
+        <Router history={createMemoryHistory() as any}>
           <Register readOnly={false} />
         </Router>
       </AppContent.Provider>
@@ -80,7 +80,7 @@ describe("Register Component", () => {
   it("Check for Operating Systems to be present on the screen", async () => {
     render(
       <AppContent.Provider value={mockContext}>
-        <Router history={createMemoryHistory()}>
+        <Router history={createMemoryHistory() as any}>
           <Register readOnly={false} />
         </Router>
       </AppContent.Provider>
@@ -94,7 +94,7 @@ describe("Register Component", () => {
   it("renders operating systems with repositories", async () => {
     render(
       <AppContent.Provider value={mockContext}>
-        <Router history={createMemoryHistory()}>
+        <Router history={createMemoryHistory() as any}>
           <Register readOnly={false} />
         </Router>
       </AppContent.Provider>
@@ -116,7 +116,7 @@ describe("Register Component", () => {
   it('should add an operating system when the dropdown option is clicked', 
async () => {
       render(
           <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
               <Register readOnly={false} />
           </Router>
           </AppContent.Provider>
@@ -134,7 +134,7 @@ describe("Register Component", () => {
   it("should only show the operating systems to be added when remove was 
clicked", async () => {
     render(
         <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
             <Register readOnly={false} />
           </Router>
         </AppContent.Provider>
@@ -165,7 +165,7 @@ describe("Register Component", () => {
   it('should  render modal on clicking why is this disabled', async () => {
     render(
         <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
             <Register readOnly={false} />
           </Router>
         </AppContent.Provider>
@@ -180,7 +180,7 @@ describe("Register Component", () => {
   it('should render Use Local Repository when the checkbox is clicked', async 
() => {
       render(
           <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
               <Register readOnly={false} />
           </Router>
           </AppContent.Provider>
@@ -192,7 +192,7 @@ describe("Register Component", () => {
   it('should render Skip Validation as unchecked by default', async () => {
       render(
           <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
               <Register readOnly={false} />
           </Router>
           </AppContent.Provider>
@@ -204,7 +204,7 @@ describe("Register Component", () => {
   it('should render Use RedHat Satellite/Spacewalk as unchecked by default', 
async () => {
     render(
         <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
             <Register readOnly={false} />
           </Router>
         </AppContent.Provider>
@@ -216,7 +216,7 @@ describe("Register Component", () => {
   it('should check and uncheck the Skip Validation checkbox', async () => {
     render(
         <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
             <Register readOnly={false} />
           </Router>
         </AppContent.Provider>
@@ -235,7 +235,7 @@ describe("Register Component", () => {
   it('should check and uncheck the RedHat Satellite/Spacewalk checkbox', async 
() => {
     render(
         <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
             <Register readOnly={false} />
           </Router>
         </AppContent.Provider>
@@ -254,7 +254,7 @@ describe("Register Component", () => {
   it('should render the modal when the checkbox is clicked', async () => {
       render(
           <AppContent.Provider value={mockContext}>
-            <Router history={createMemoryHistory()}>
+            <Router history={createMemoryHistory() as any}>
               <Register readOnly={false} />
             </Router>
           </AppContent.Provider>
@@ -292,7 +292,7 @@ describe("Register Component", () => {
   it('should show pencil icon when redhat satellite is checked', async () => {
     render(
         <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
             <Register readOnly={false} />
           </Router>
         </AppContent.Provider>
@@ -313,7 +313,7 @@ describe("Register Component", () => {
   it('should render the cancel button', async () => {
       render(
           <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
               <Register readOnly={false} />
           </Router>
           </AppContent.Provider>
@@ -325,7 +325,7 @@ describe("Register Component", () => {
   it('should render repo-base-url-input when there is no base url', async () 
=> {
     render(
         <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
             <Register readOnly={false} />
           </Router>
         </AppContent.Provider>
@@ -342,7 +342,7 @@ describe("Register Component", () => {
       'display invalid when Version Number is invalid', async () => {
       render(
           <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
               <Register readOnly={false} />
           </Router>
           </AppContent.Provider>
@@ -365,7 +365,7 @@ describe("Register Component", () => {
   it('should click on checkbox skip repository url validation and click on 
save', async () => {
       render(
           <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
               <Register readOnly={false} />
           </Router>
           </AppContent.Provider>
@@ -384,7 +384,7 @@ describe("Register Component", () => {
   it('should click on version-dropdown', async () => {
       render(
           <AppContent.Provider value={mockContext}>
-          <Router history={createMemoryHistory()}>
+          <Router history={createMemoryHistory() as any}>
               <Register readOnly={false} />
           </Router>
           </AppContent.Provider>
@@ -395,4 +395,4 @@ describe("Register Component", () => {
       const versionDropdown = await waitFor(() => 
screen.getByTestId('version-dropdown'));
       fireEvent.click(versionDropdown);
   });
-});
\ No newline at end of file
+});


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to