10-audio-edit.spec.ts 928 B

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