// SPDX-FileCopyrightText: 2024 Aravinth Manivannan // // SPDX-License-Identifier: AGPL-3.0-or-later import { test, expect } from "@playwright/test"; import * as config from "./config"; import User from "./user"; test("Create admin fixture @setup", async ({ page }) => { const admin = new User(config.ADMIN_USERNAME); admin.setAdmin(); try { await admin.register(page); await admin.logout(page); await expect(page).toHaveTitle("Forgejo: Beyond coding. We forge."); } catch { console.log("looks like admin is already registered"); } });