aboutsummaryrefslogtreecommitdiffstats
path: root/test-ark-create.mjs
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
committerAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
commit56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 (patch)
treed6bc2557c56b93177bb14aa376847c6e123a4862 /test-ark-create.mjs
parent13466248004327e9a026cb89f94926f9b060d1c1 (diff)
downloadcoinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.tar.gz
coinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.zip
format
Diffstat (limited to 'test-ark-create.mjs')
-rw-r--r--test-ark-create.mjs20
1 files changed, 5 insertions, 15 deletions
diff --git a/test-ark-create.mjs b/test-ark-create.mjs
index 7fc9b24e..5e339b04 100644
--- a/test-ark-create.mjs
+++ b/test-ark-create.mjs
@@ -9,17 +9,13 @@ const API_KEY = "test-playwright-key";
const context = await browser.newContext({ ignoreHTTPSErrors: true });
const page = await context.newPage();
- page.on("console", (msg) =>
- console.log(`[browser:${msg.type()}]`, msg.text()),
- );
+ page.on("console", (msg) => console.log(`[browser:${msg.type()}]`, msg.text()));
page.on("pageerror", (err) => console.log("[page error]", err.message));
page.on("request", (req) => {
const u = req.url();
if (u.includes("account") || u.includes("arkade.computer")) {
- console.log(
- `[req] ${req.method()} ${u} ${req.postData()?.substring(0, 500) || ""}`,
- );
+ console.log(`[req] ${req.method()} ${u} ${req.postData()?.substring(0, 500) || ""}`);
}
});
page.on("response", (resp) => {
@@ -27,9 +23,7 @@ const API_KEY = "test-playwright-key";
if (u.includes("account") && !u.includes("__data")) {
resp
.text()
- .then((t) =>
- console.log(`[resp] ${resp.status()} ${u} -> ${t.substring(0, 500)}`),
- )
+ .then((t) => console.log(`[resp] ${resp.status()} ${u} -> ${t.substring(0, 500)}`))
.catch(() => {});
}
});
@@ -45,9 +39,7 @@ const API_KEY = "test-playwright-key";
if (h.name.toLowerCase() === "set-cookie") {
const m = h.value.match(/token=([^;]+)/);
if (m)
- await context.addCookies([
- { name: "token", value: m[1], domain: "172.18.0.9", path: "/" },
- ]);
+ await context.addCookies([{ name: "token", value: m[1], domain: "172.18.0.9", path: "/" }]);
}
}
@@ -106,9 +98,7 @@ const API_KEY = "test-playwright-key";
console.log("\n--- Checking accounts ---");
const acctResp = await page.request.get(`${API}/accounts`, {
headers: {
- cookie: (await context.cookies())
- .map((c) => `${c.name}=${c.value}`)
- .join("; "),
+ cookie: (await context.cookies()).map((c) => `${c.name}=${c.value}`).join("; "),
},
});
const accounts = await acctResp.json();