chore: cleanup package.json and automate api type generation

This commit is contained in:
bipproduction
2026-02-08 12:53:36 +08:00
parent 0f71798389
commit f86ac66820
10 changed files with 217 additions and 233 deletions

View File

@@ -1,27 +1,29 @@
import { test, expect } from '@playwright/test';
import { expect, test } from "@playwright/test";
test.describe('Signup Flow', () => {
test('should see signup page content', async ({ page }) => {
// Go to the signup page
await page.goto('/signup');
test.describe("Signup Flow", () => {
test("should see signup page content", async ({ page }) => {
// Go to the signup page
await page.goto("/signup");
// Check if the signup page content is visible
await expect(page.locator('h1')).toContainText('Create an account');
await expect(page.locator('button:has-text("Create account")')).toBeVisible();
// Check for form fields
await expect(page.getByPlaceholder('Your name')).toBeVisible();
await expect(page.getByPlaceholder('your@email.com')).toBeVisible();
await expect(page.getByPlaceholder('Your password')).toBeVisible();
});
// Check if the signup page content is visible
await expect(page.locator("h1")).toContainText("Create an account");
await expect(
page.locator('button:has-text("Create account")'),
).toBeVisible();
test('should navigate to signin page from signup', async ({ page }) => {
await page.goto('/signup');
// Click on "Sign in" link
await page.click('button:has-text("Sign in")');
// Check for form fields
await expect(page.getByPlaceholder("Your name")).toBeVisible();
await expect(page.getByPlaceholder("your@email.com")).toBeVisible();
await expect(page.getByPlaceholder("Your password")).toBeVisible();
});
// Should be redirected to signin
await expect(page).toHaveURL(/\/signin/);
});
test("should navigate to signin page from signup", async ({ page }) => {
await page.goto("/signup");
// Click on "Sign in" link
await page.click('button:has-text("Sign in")');
// Should be redirected to signin
await expect(page).toHaveURL(/\/signin/);
});
});