Debian Codegraph @

test/playwright/tests/api.spec.mjs

raw
1 import {expect, test} from "@playwright/test";
2
3 test("API /stat endpoint is available and returns version", async ({request}, testInfo) => {
4 const {readOnlyPassword} = testInfo.project.use.rspamdPasswords;
5
6 const response = await request.get("/stat", {headers: {Password: readOnlyPassword}});
7 expect(response.ok()).toBeTruthy();
8 const data = await response.json();
9 expect(data).toHaveProperty("version");
10 });