Skip to content

Commit

Permalink
refactor: change import file logic in generated-credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
shrey-dadhaniya committed Feb 12, 2024
1 parent d86f61f commit b455937
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion e2e/routes/seeds/generated-credentials.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from "fs";
import { test, expect } from "@playwright/test";
import seedCredentials from "../../../public/temp/seed-credentials.json" assert { type: "json" };
import { getApiContext } from "../../common.js";

let apiContext;
Expand All @@ -16,6 +16,11 @@ test.describe("Get credentials", () => {
test("should return public/temp/seed-credentials.json content", async ({
page,
}) => {
const seedCredentialsText = fs.readFileSync(
"./public/temp/seed-credentials.json",
"utf8"
);
const seedCredentials = JSON.parse(seedCredentialsText);
const res = await apiContext.get("/api/v1/seed/generated-credentials");
const json = await res.json();
expect(res.status()).toEqual(200);
Expand Down

0 comments on commit b455937

Please sign in to comment.