初始提交: Gitea 项目代码

This commit is contained in:
root
2026-05-30 22:47:36 +08:00
commit f288f76350
6116 changed files with 776822 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import {env} from 'node:process';
import {test, expect} from '@playwright/test';
import {logout} from './utils.ts';
test('homepage', async ({page}) => {
await page.goto('/');
await expect(page.getByRole('img', {name: 'Logo'})).toHaveAttribute('src', '/assets/img/logo.svg');
});
test('login form and logout', async ({page}) => {
await page.goto('/user/login');
await page.getByLabel('Username or Email Address').fill(env.GITEA_TEST_E2E_USER);
await page.getByLabel('Password').fill(env.GITEA_TEST_E2E_PASSWORD);
await page.getByRole('button', {name: 'Sign In'}).click();
await expect(page.getByRole('link', {name: 'Sign In'})).toBeHidden();
await logout(page);
});