Separate the internal API and nginx ports, align browser BDD fixtures with tenant and Go Loose requirements, and correct the invitation outcome interaction order. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
25 lines
816 B
JavaScript
25 lines
816 B
JavaScript
import { After, Before, Status, setDefaultTimeout } from "@cucumber/cucumber";
|
|
import { chromium } from "playwright";
|
|
|
|
setDefaultTimeout(Number(process.env.BDD_STEP_TIMEOUT_MS ?? 15000));
|
|
|
|
Before(async function () {
|
|
this.browser = await chromium.launch({
|
|
headless: process.env.BDD_HEADLESS !== "false",
|
|
args: ["--host-resolver-rules=MAP ypto.guess.local 127.0.0.1"],
|
|
});
|
|
this.context = await this.browser.newContext();
|
|
this.page = await this.context.newPage();
|
|
this.baseURL = process.env.BDD_BASE_URL ?? "http://127.0.0.1:8080";
|
|
});
|
|
|
|
After(async function ({ result }) {
|
|
if (result?.status === Status.FAILED && this.page) {
|
|
await this.attach(
|
|
await this.page.screenshot({ fullPage: true }),
|
|
"image/png",
|
|
);
|
|
}
|
|
await this.context?.close();
|
|
await this.browser?.close();
|
|
});
|