Files
Q-A_test/apps/e2e/scenarios/create-project.spec.ts
SDI 12e4f17b62
CI / typecheck (push) Successful in 1m8s
CI / format (push) Failing after 1m6s
CI / lint (push) Failing after 49s
CI / test (push) Failing after 1m8s
first commit
2026-07-15 18:05:12 +09:00

40 lines
1.3 KiB
TypeScript

import { expect, test } from '@playwright/test';
export default () => {
test('creating a project succeeds', async ({ page }) => {
await page.goto('http://localhost:3000/main/project/create', {
waitUntil: 'domcontentloaded',
});
await expect(page.getByRole('button', { name: 'Next' })).toBeVisible({
timeout: 1000,
});
await page.waitForTimeout(1000);
await page.getByRole('button', { name: 'Next' }).click();
await page.getByRole('button', { name: 'Next' }).click();
await page.getByRole('button', { name: 'Confirm' }).click();
await page.locator("input[name='name']").click();
await page.locator("input[name='name']").fill('TestProject');
await page.getByRole('button', { name: 'Next' }).click();
await page.waitForTimeout(1000);
await page.getByRole('button', { name: 'Next' }).click();
await page.waitForTimeout(1000);
await page.getByRole('button', { name: 'Complete' }).click();
await page.waitForTimeout(1000);
await expect(
page.getByRole('heading', {
level: 2,
name: /project creation complete/i,
}),
).toBeVisible();
await expect(page.locator("input[name='name']")).toHaveValue('TestProject');
await page.getByRole('button', { name: 'Later' }).click();
});
};