cryptgeon/test/web/file/multiple.spec.ts

14 lines
610 B
TypeScript
Raw Normal View History

import { test } from '@playwright/test'
import { Files, getFileChecksum } from '../../files'
2024-08-26 22:09:51 +00:00
import { checkLinkForDownload, createNoteSuccessfully } from '../../utils'
test.describe('@web', () => {
test('multiple', async ({ page }) => {
const files = [Files.PDF, Files.Image]
const checksums = await Promise.all(files.map(getFileChecksum))
2024-08-26 22:09:51 +00:00
const link = await createNoteSuccessfully(page, { files, views: 2 })
await checkLinkForDownload(page, { link, text: 'image.jpg', checksum: checksums[1] })
await checkLinkForDownload(page, { link, text: 'AES.pdf', checksum: checksums[0] })
})
})