Skip to content

Commit

Permalink
chore: test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Oct 29, 2024
1 parent 68646ad commit a00de91
Showing 1 changed file with 4 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AuthContext } from "@flanksource-ui/context";
import { AuthContext, FakeUser, Roles } from "@flanksource-ui/context";
import { UserAccessStateContextProvider } from "@flanksource-ui/context/UserAccessContext/UserAccessContext";
import { QueryClient } from "@tanstack/query-core";
import { QueryClientProvider } from "@tanstack/react-query";
Expand Down Expand Up @@ -53,15 +53,7 @@ describe("ConnectionForm", () => {
it("renders form when provided with initial value", async () => {
render(
<QueryClientProvider client={client}>
<AuthContext.Provider
value={{
user: {
id: "b149b5ee-db1c-4c0c-9711-98d06f1f1ce7",
email: "admin@local",
name: "John Doe"
}
}}
>
<AuthContext.Provider value={FakeUser([Roles.admin])}>
<UserAccessStateContextProvider>
<ConnectionFormModal
formValue={formInitialValue}
Expand Down Expand Up @@ -105,15 +97,7 @@ describe("ConnectionForm", () => {
it("renders list of connection types", async () => {
render(
<QueryClientProvider client={client}>
<AuthContext.Provider
value={{
user: {
id: "b149b5ee-db1c-4c0c-9711-98d06f1f1ce7",
email: "admin@local",
name: "John Doe"
}
}}
>
<AuthContext.Provider value={FakeUser([Roles.admin])}>
<UserAccessStateContextProvider>
<ConnectionFormModal
formValue={undefined}
Expand All @@ -134,15 +118,7 @@ describe("ConnectionForm", () => {
it("renders form when connection type is selected", async () => {
render(
<QueryClientProvider client={client}>
<AuthContext.Provider
value={{
user: {
id: "b149b5ee-db1c-4c0c-9711-98d06f1f1ce7",
email: "admin@local",
name: "John Doe"
}
}}
>
<AuthContext.Provider value={FakeUser([Roles.admin])}>
<UserAccessStateContextProvider>
<ConnectionFormModal
formValue={undefined}
Expand Down

0 comments on commit a00de91

Please sign in to comment.