- 新增 settlement-operations 合并列表 API,收付/调账接口改为标准分页 - actionable_only 流水在内存过滤后正确分页 - 已结账单流水不再展示补差/冲正快捷动作 - 坏账核销支持 idempotency_key 并写入 result_bill_id - 补充操作记录、流水与坏账幂等相关测试
30 lines
1.4 KiB
TypeScript
30 lines
1.4 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
const ADMIN_URL = process.env.PLAYWRIGHT_ADMIN_URL ?? 'http://localhost:3801';
|
|
const ADMIN_ACCOUNT = process.env.E2E_ADMIN_USERNAME ?? 'admin';
|
|
const ADMIN_PASSWORD = process.env.E2E_ADMIN_PASSWORD ?? '12345678';
|
|
|
|
test('超管进入结算中心 → 账期管理页可见', async ({ page }) => {
|
|
test.setTimeout(120_000);
|
|
|
|
await page.goto(`${ADMIN_URL}/admin/login`);
|
|
const account = page.locator('#admin-account');
|
|
await account.waitFor({ state: 'visible', timeout: 60_000 });
|
|
await account.fill(ADMIN_ACCOUNT);
|
|
await page.locator('#admin-password').fill(ADMIN_PASSWORD);
|
|
await page.locator('img[src^="data:image"]').waitFor({ state: 'visible', timeout: 30_000 });
|
|
await page.locator('#admin-captcha').fill('LOTTERY_E2E_BYPASS');
|
|
await page.getByRole('button', { name: /^登录$|Sign in|submit/i }).click();
|
|
await page.waitForURL(/\/admin(?!\/login)/, { timeout: 45_000 });
|
|
|
|
await page.goto(`${ADMIN_URL}/admin/settlement-center`);
|
|
await expect(page.getByText(/结算中心|Settlement center/i).first()).toBeVisible({
|
|
timeout: 60_000,
|
|
});
|
|
await expect(page.getByText(/账期管理|Period/i).first()).toBeVisible({ timeout: 30_000 });
|
|
const periodAction = page
|
|
.getByRole('button', { name: /开账|Open period|关账|Close period/i })
|
|
.first();
|
|
await expect(periodAction).toBeVisible({ timeout: 30_000 });
|
|
});
|