Skip to content

Commit

Permalink
🧪 test(schema): remove system profile tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thrownullexception committed Feb 10, 2024
1 parent cc980f7 commit 6025293
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
16 changes: 0 additions & 16 deletions src/__tests__/users/[username]/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ describe("pages/users/[username]/index", () => {
expect(screen.getByLabelText("Role")).toBeDisabled();
});
expect(screen.getByLabelText("Name")).not.toBeDisabled();

expect(screen.getByLabelText("System Profile")).not.toBeDisabled();
});

it("should show user details", async () => {
Expand All @@ -55,10 +53,6 @@ describe("pages/users/[username]/index", () => {
expect(container.querySelector(`input[name="role"]`)).toHaveValue(
"viewer"
);

expect(screen.getByLabelText("System Profile")).toHaveValue(
`{"foo": "bar"}`
);
});

it("should update user details", async () => {
Expand All @@ -81,12 +75,6 @@ describe("pages/users/[username]/index", () => {
await userEvent.type(screen.getByLabelText("Role"), "Creator");
await userEvent.keyboard("{Enter}");

await userEvent.clear(screen.getByLabelText("System Profile"));
await userEvent.type(
screen.getByLabelText("System Profile"),
`{{"update": "profile"}`
);

await userEvent.click(
screen.getByRole("button", { name: "Update User" })
);
Expand Down Expand Up @@ -116,10 +104,6 @@ describe("pages/users/[username]/index", () => {
expect(container.querySelector(`input[name="role"]`)).toHaveValue(
"creator"
);

expect(screen.getByLabelText("System Profile")).toHaveValue(
`{"update": "profile"}`
);
});
});

Expand Down
8 changes: 4 additions & 4 deletions src/__tests__/users/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ setupApiHandlers();
describe("pages/users", () => {
const useRouter = jest.spyOn(require("next/router"), "useRouter");

it("should list users with system profile", async () => {
it("should list users", async () => {
useRouter.mockImplementation(() => ({
asPath: "/",
isReady: true,
Expand All @@ -25,17 +25,17 @@ describe("pages/users", () => {

expect(
await screen.findByRole("row", {
name: "Username Sort By Username Filter Username By Search Name Sort By Name Filter Name By Search Role Sort By Role Filter Role By Status Email Station Action",
name: "Username Sort By Username Filter Username By Search Name Sort By Name Filter Name By Search Role Sort By Role Filter Role By Status Action",
})
).toBeInTheDocument();
expect(
screen.getByRole("row", {
name: "user-1 User 1 Role 1 [email protected] station - 1 Edit User",
name: "user-1 User 1 Role 1 Edit User",
})
).toBeInTheDocument();
expect(
screen.getByRole("row", {
name: "user-2 User 2 Role 2 [email protected] Edit User",
name: "user-2 User 2 Role 2 Edit User",
})
).toBeInTheDocument();
expect(
Expand Down
4 changes: 0 additions & 4 deletions src/backend/data/data-access/RDBMS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ export class RDBMSDataApiService extends BaseDataAccessService<Knex.QueryBuilder
);
}

console.log(query.toQuery());

return await query;
}

Expand All @@ -187,8 +185,6 @@ export class RDBMSDataApiService extends BaseDataAccessService<Knex.QueryBuilder
queryFilter
);

console.log(query.toQuery());

return await query.first();
}

Expand Down

0 comments on commit 6025293

Please sign in to comment.