test(e2e): assert generation marks source usage
Deploy / Build Production Runtime Images (push) Successful in 8m57s
Deploy / Deploy Production (push) Successful in 46s
Deploy / Production Browser E2E (push) Failing after 48s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
Deploy / Deploy Staging (push) Has been skipped
Deploy / Build Production Runtime Images (push) Successful in 8m57s
Deploy / Deploy Production (push) Successful in 46s
Deploy / Production Browser E2E (push) Failing after 48s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
Deploy / Deploy Staging (push) Has been skipped
This commit is contained in:
@@ -151,5 +151,16 @@ test.describe('Core generation and download flow', () => {
|
||||
expect(videoResponse.headers()['content-type'] || '').toContain('video/mp4');
|
||||
const videoBody = await videoResponse.body();
|
||||
expect(videoBody.length).toBeGreaterThan(1024);
|
||||
|
||||
const assetsAfterGeneration = await request.get(`${apiBase}/assets`, {
|
||||
headers,
|
||||
params: { library_id: libraryData.id },
|
||||
});
|
||||
expect(assetsAfterGeneration.status(), await assetsAfterGeneration.text()).toBe(200);
|
||||
const assetsAfterGenerationData = (await assetsAfterGeneration.json()) as { items: Array<{ name: string; metadata: Record<string, unknown> }> };
|
||||
const sourceAsset = assetsAfterGenerationData.items.find((item) => item.name === 'e2e-generation-source.mp4');
|
||||
expect(sourceAsset?.metadata.generation_use_count).toBe(1);
|
||||
expect(sourceAsset?.metadata.review_status).toBe('pending_review');
|
||||
expect(sourceAsset?.metadata.last_used_at).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user