Skip to content

Commit

Permalink
style: use space for indents
Browse files Browse the repository at this point in the history
  • Loading branch information
escapedcat committed Dec 23, 2024
1 parent 18aa8c8 commit 178520a
Show file tree
Hide file tree
Showing 150 changed files with 11,429 additions and 11,429 deletions.
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
"indentStyle": "space"
},
"organizeImports": {
"enabled": true
Expand Down
32 changes: 16 additions & 16 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
.content-container {
/* biome-ignore lint/correctness/noUnknownFunction: <explanation> */
min-height: calc(100vh - theme("spacing.16"));
/* biome-ignore lint/correctness/noUnknownFunction: <explanation> */
min-height: calc(100vh - theme("spacing.16"));
}

.sidebar {
/* biome-ignore lint/correctness/noUnknownFunction: <explanation> */
max-height: calc(100vh - theme("spacing.16"));
/* biome-ignore lint/correctness/noUnknownFunction: <explanation> */
max-height: calc(100vh - theme("spacing.16"));
}

/* Custom Scrollbar Chrome */
::-webkit-scrollbar {
width: 5px;
width: 5px;
}

::-webkit-scrollbar-thumb {
background: darkgray;
border-radius: 25px;
background: darkgray;
border-radius: 25px;
}

::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px #ccc;
border-radius: 10px;
box-shadow: inset 0 0 5px #ccc;
border-radius: 10px;
}

/* Custom Scrollbar Firefox */

div,
ul {
scrollbar-width: thin;
scrollbar-width: thin;
}

/* Blur Hidden Text */

.text-blur {
color: transparent;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
user-select: none;
pointer-events: none;
cursor: default;
overflow: hidden;
color: transparent;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
user-select: none;
pointer-events: none;
cursor: default;
overflow: hidden;
}
92 changes: 46 additions & 46 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,58 @@ import { http, HttpResponse, server } from "./testServer";
const mockedUsedNavigate = vi.fn();

vi.mock("react-router-dom", async () => {
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
const reactRouterDom: any = await vi.importActual("react-router-dom");
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
const reactRouterDom: any = await vi.importActual("react-router-dom");

return { ...reactRouterDom, useNavigate: () => mockedUsedNavigate };
return { ...reactRouterDom, useNavigate: () => mockedUsedNavigate };
});

describe("App", () => {
afterEach(() => {
server.resetHandlers();
});
afterEach(() => {
server.resetHandlers();
});

test("should route to /setup if setup is not done", async () => {
server.use(
http.get("/api/setup/status", () => {
return HttpResponse.json(
{
setupPhase: "starting",
state: "",
message: "",
},
{ status: 200 },
);
}),
);
test("should route to /setup if setup is not done", async () => {
server.use(
http.get("/api/setup/status", () => {
return HttpResponse.json(
{
setupPhase: "starting",
state: "",
message: "",
},
{ status: 200 },
);
}),
);

render(
<I18nextProvider i18n={i18n}>
<App />
</I18nextProvider>,
);
await waitFor(() => expect(mockedUsedNavigate).toHaveBeenCalledTimes(1));
});
render(
<I18nextProvider i18n={i18n}>
<App />
</I18nextProvider>,
);
await waitFor(() => expect(mockedUsedNavigate).toHaveBeenCalledTimes(1));
});

test("should route to /login if setup is done", async () => {
server.use(
http.get("/api/setup/status", () => {
return HttpResponse.json(
{
setupPhase: "done",
state: "",
message: "",
},
{ status: 200 },
);
}),
);
test("should route to /login if setup is done", async () => {
server.use(
http.get("/api/setup/status", () => {
return HttpResponse.json(
{
setupPhase: "done",
state: "",
message: "",
},
{ status: 200 },
);
}),
);

render(
<I18nextProvider i18n={i18n}>
<App />
</I18nextProvider>,
);
expect(await screen.findByText("login.login")).toBeInTheDocument();
});
render(
<I18nextProvider i18n={i18n}>
<App />
</I18nextProvider>,
);
expect(await screen.findByText("login.login")).toBeInTheDocument();
});
});
Loading

0 comments on commit 178520a

Please sign in to comment.