Refactor Gitea workflow and update package dependencies
All checks were successful
RenovateBot / renovate (push) Successful in 25s
Test / Basic (push) Successful in 3m24s

- Simplified the Gitea workflow by removing the E2E testing section and renaming the integration tests job.
- Updated package-lock.json to include new dependencies for escape-string-regexp and removed outdated dependencies.
- Removed Playwright configuration and related test files from the playground directory to streamline testing processes.
This commit is contained in:
2026-02-05 21:53:51 +00:00
parent 7a0e6615d0
commit d387c7bf8a
6 changed files with 1488 additions and 2223 deletions

View File

@@ -1,68 +0,0 @@
import { expect, test } from '@playwright/test';
const adminEmail = process.env.STRAPI_ADMIN_EMAIL ?? 'admin@example.com';
const adminPassword = process.env.STRAPI_ADMIN_PASSWORD ?? 'Admin12345';
const contentTypeName = 'Checkbox Item E2E';
test('custom field works in admin UI', async ({ page }) => {
await page.goto('/admin');
await page.getByLabel(/email/i).fill(adminEmail);
await page.getByLabel(/password/i).fill(adminPassword);
await page.getByRole('button', { name: /log in|sign in/i }).click();
await page.waitForURL(/\/admin(\/)?$/);
await page.getByRole('link', { name: /content[- ]type builder/i }).click();
await page.getByRole('button', { name: /create new collection type/i }).click();
await page.getByLabel(/display name/i).fill(contentTypeName);
await page.getByRole('button', { name: /continue|next/i }).click();
await page.getByRole('button', { name: /add (another|new) field/i }).click();
const searchInput = page.getByPlaceholder(/search/i);
if (await searchInput.count()) {
await searchInput.fill('checkbox');
}
await page.getByRole('button', { name: /checkbox list/i }).click();
await page.getByLabel(/name/i).fill('choices');
await page.getByLabel(/values/i).fill('alpha\nbeta\ngamma');
await page.getByRole('tab', { name: /advanced/i }).click();
await page.getByLabel(/required field/i).check();
await page.getByRole('button', { name: /select default values/i }).click();
await page.getByRole('option', { name: 'alpha' }).click();
await page.keyboard.press('Escape');
await page.getByRole('button', { name: /finish|save/i }).click();
await page.getByRole('button', { name: /save/i }).click();
await expect(page.getByText(/saved/i)).toBeVisible({ timeout: 60_000 });
await page.getByRole('link', { name: /content[- ]type builder/i }).click();
await page.getByText(contentTypeName).click();
await page.getByText('choices').click();
await page.getByLabel(/values/i).fill('alpha\nbeta\ngamma\ndelta');
await page.getByRole('button', { name: /finish|save/i }).click();
await page.getByRole('button', { name: /save/i }).click();
await expect(page.getByText(/saved/i)).toBeVisible({ timeout: 60_000 });
await page.getByRole('link', { name: /content manager/i }).click();
await page.getByRole('link', { name: /checkbox item e2e/i }).click();
await page.getByRole('button', { name: /create new entry/i }).click();
const alphaCheckbox = page.getByRole('checkbox', { name: 'alpha' });
await expect(alphaCheckbox).toBeChecked();
await alphaCheckbox.click();
await page.getByRole('button', { name: /save/i }).click();
await expect(page.getByText(/required/i)).toBeVisible();
await page.getByRole('checkbox', { name: 'beta' }).check();
await page.getByRole('checkbox', { name: 'delta' }).check();
await page.getByRole('button', { name: /save/i }).click();
await expect(page.getByText(/saved/i)).toBeVisible();
await page.getByRole('checkbox', { name: 'gamma' }).check();
await page.getByRole('button', { name: /save/i }).click();
await expect(page.getByText(/saved/i)).toBeVisible();
});

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,6 @@
"deploy": "strapi deploy",
"dev": "strapi develop",
"develop": "strapi develop",
"e2e": "playwright test",
"seed:example": "node ./scripts/seed.js",
"start": "strapi start",
"strapi": "strapi",
@@ -31,7 +30,6 @@
"styled-components": "^6.0.0"
},
"devDependencies": {
"@playwright/test": "^1.53.0",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",

View File

@@ -1,17 +0,0 @@
import { defineConfig } from '@playwright/test';
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? 'http://127.0.0.1:1337';
export default defineConfig({
testDir: './e2e',
timeout: 120_000,
expect: {
timeout: 10_000,
},
retries: process.env.CI ? 1 : 0,
use: {
baseURL,
headless: true,
trace: 'on-first-retry',
},
});