-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(portal): Change styles of sonata & seller apis input
- Loading branch information
1 parent
94b6371
commit b99ff8f
Showing
10 changed files
with
93 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
VITE_BASE_API=http://localhost:8001 | ||
VITE_BASE_API="https://kraken-portal-cn.dev.consolecore.cc/api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 38 additions & 13 deletions
51
kraken-app/kraken-app-portal/src/pages/APIServerEditSelection/__test__/index.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,40 @@ | ||
import { render } from "@testing-library/react"; | ||
import { QueryClientProvider } from "@tanstack/react-query"; | ||
import { queryClient } from "@/utils/helpers/reactQuery"; | ||
import { BrowserRouter } from "react-router-dom"; | ||
import { render } from "@/__test__/utils"; | ||
import APIServerEditSelection from ".."; | ||
test("select API", () => { | ||
const { container } = render( | ||
<QueryClientProvider client={queryClient}> | ||
<BrowserRouter> | ||
<APIServerEditSelection /> | ||
</BrowserRouter> | ||
</QueryClientProvider> | ||
); | ||
expect(container).toBeInTheDocument(); | ||
import * as productHooks from '@/hooks/product' | ||
|
||
describe("API server edit selection", () => { | ||
it('should render without detail data', () => { | ||
const { container, getByText } = render( | ||
<APIServerEditSelection /> | ||
); | ||
expect(container).toBeInTheDocument(); | ||
expect(getByText('Seller API Setup')).toBeInTheDocument() | ||
expect(getByText('OK')).toBeInTheDocument() | ||
expect(getByText('Cancel')).toBeInTheDocument() | ||
}) | ||
|
||
it('should render with detail data', () => { | ||
vi.spyOn(productHooks, "useGetComponentDetail").mockReturnValue({ | ||
data: { | ||
facets: { | ||
baseSpec: { | ||
content: "content", | ||
}, | ||
selectedAPIS: [], | ||
metadata: { | ||
name: "metadata", | ||
version: "1.0" | ||
} | ||
}, | ||
}, | ||
isLoading: false, | ||
isFetching: false, | ||
isFetched: true | ||
} as any) | ||
|
||
const { container } = render( | ||
<APIServerEditSelection /> | ||
); | ||
expect(container).toBeInTheDocument(); | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters