feat: add worker operations and fix gitea actions
Some checks failed
docker-images / build-and-push (admin, admin, termi-astro-admin, admin/Dockerfile) (push) Successful in 29s
docker-images / build-and-push (backend, backend, termi-astro-backend, backend/Dockerfile) (push) Successful in 33m13s
docker-images / build-and-push (frontend, frontend, termi-astro-frontend, frontend/Dockerfile) (push) Successful in 58s
ui-regression / playwright-regression (push) Failing after 13m24s

This commit is contained in:
2026-04-02 03:43:37 +08:00
parent ee0bec4a78
commit a516be2e91
37 changed files with 3890 additions and 879 deletions

View File

@@ -24,6 +24,36 @@ test('首页过滤、热门区和文章详情链路可用', async ({ page }) =>
await expect(page).toHaveURL(/\/articles\/playwright-regression-workflow$/)
await expect(page.getByRole('heading', { name: 'Playwright 回归工作流设计' })).toBeVisible()
await expect(page.locator('.paragraph-comment-marker').first()).toBeVisible()
await page.goto('/categories/frontend-engineering')
await expect(page.getByRole('heading', { name: '前端工程' })).toBeVisible()
await expect(page.getByText('Astro 终端博客信息架构实战')).toBeVisible()
await page.goto('/tags/playwright')
await expect(page.getByRole('heading', { name: 'Playwright', exact: true })).toBeVisible()
await expect(page.getByText('Playwright 回归工作流设计')).toBeVisible()
await page.goto('/reviews')
await expect(page.getByText('《宇宙探索编辑部》')).toHaveCount(0)
await page.goto('/reviews/4')
await expect(page.getByRole('heading', { name: '评价不存在' })).toBeVisible()
await page.goto('/reviews/1')
await page.getByRole('link', { name: '#年度最佳' }).click()
await expect(page).toHaveURL(/\/reviews\?tag=%E5%B9%B4%E5%BA%A6%E6%9C%80%E4%BD%B3$/)
await expect(page.getByText('《漫长的季节》')).toBeVisible()
await page.goto('/reviews/1')
await page.getByRole('link', { name: '动画' }).click()
await expect(page).toHaveURL(/\/reviews\?type=anime$/)
await expect(page.locator('#reviews-subtitle')).toContainText('动画')
await expect(page.getByText('《漫长的季节》')).toBeVisible()
await page.goto('/reviews/1')
await page.getByRole('link', { name: '已完成' }).click()
await expect(page).toHaveURL(/\/reviews\?status=completed$/)
await expect(page.locator('#reviews-subtitle')).toContainText('已完成')
await expect(page.getByText('《漫长的季节》')).toBeVisible()
})
test('文章评论、搜索和 AI 问答链路可用', async ({ page, request }) => {
@@ -64,16 +94,27 @@ test('友链申请与订阅确认/偏好/退订链路可用', async ({ page, req
expect(friendState.friend_links.some((item: { site_name: string }) => item.site_name === 'Playwright Friend')).toBeTruthy()
await page.goto('/')
await page.locator('[data-subscribe-form] input[name="displayName"]').fill('首页订阅用户')
await page.locator('[data-subscribe-form] input[name="email"]').fill('inline-subscriber@example.com')
await page.locator('[data-subscribe-form] button[type="submit"]').click()
await expect(page.locator('[data-subscribe-status]')).toContainText('订阅')
await page.locator('[data-subscription-popup-open]').click()
await page.locator('[data-subscription-popup-form] input[name="displayName"]').fill('弹窗订阅用户')
await page.locator('[data-subscription-popup-email]').fill('playwright-subscriber@example.com')
await page.locator('[data-subscription-popup-form] button[type="submit"]').click()
await expect(page.locator('[data-subscription-popup-status]')).toContainText('订阅')
const subscriptionState = await getDebugState(request)
const inlineRecord = subscriptionState.subscriptions.find(
(item: { target: string; display_name: string }) => item.target === 'inline-subscriber@example.com',
)
expect(inlineRecord?.display_name).toBe('首页订阅用户')
const latest = subscriptionState.subscriptions.find(
(item: { target: string }) => item.target === 'playwright-subscriber@example.com',
(item: { target: string; display_name: string }) => item.target === 'playwright-subscriber@example.com',
)
expect(latest).toBeTruthy()
expect(latest.display_name).toBe('弹窗订阅用户')
await page.goto(`/subscriptions/confirm?token=${encodeURIComponent(latest.confirm_token)}`)
await expect(page.getByText('订阅已确认')).toBeVisible()