/** * L2 回归测试:音频编辑 * 注意:GET /api/audio 路由不存在,只有 POST /api/audio/trim, /api/audio/merge */ import { test, expect } from '@playwright/test'; import { apiPost, initApiClient, disposeApiClient } from '../helpers/api-client'; test.describe('音频编辑 (AudioEdit)', () => { test.beforeAll(async () => { await initApiClient(); }); test.afterAll(async () => { await disposeApiClient(); }); test('AE01: 获取音频编辑列表 - 路由不存在,跳过', async () => { // /api/audio GET 路由不存在,只有 POST /api/audio/trim 和 /merge test.skip(); }); test('AE02: 音频合并 POST /api/audio/merge', async () => { const res = await apiPost('/api/audio/merge', { audioIds: ['audio-001', 'audio-002'], order: [1, 2], }); // 可能成功(0)、参数错误(400)或需要认证(401) expect([0, 400, 401]).toContain(res.code); }); });