forgejo-frontend-integration/tests/create-admin.spec.ts
Aravinth Manivannan 958773125d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: create admin account on startup
2024-01-10 17:49:14 +05:30

20 lines
593 B
TypeScript

// SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
//
// 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");
}
});