2023-05-14 13:52:47 +02:00
|
|
|
import { test } from '@playwright/test'
|
2023-05-25 10:17:01 +02:00
|
|
|
import { Files, getFileChecksum } from '../../files'
|
|
|
|
import { checkLinkForDownload, createNote } from '../../utils'
|
2023-05-14 13:52:47 +02:00
|
|
|
|
|
|
|
test.describe('@web', () => {
|
|
|
|
test('multiple', async ({ page }) => {
|
|
|
|
const files = [Files.PDF, Files.Image]
|
|
|
|
const checksums = await Promise.all(files.map(getFileChecksum))
|
|
|
|
const link = await createNote(page, { files, views: 2 })
|
2023-05-25 10:17:01 +02:00
|
|
|
await checkLinkForDownload(page, { link, text: 'image.jpg', checksum: checksums[1] })
|
|
|
|
await checkLinkForDownload(page, { link, text: 'AES.pdf', checksum: checksums[0] })
|
2023-05-14 13:52:47 +02:00
|
|
|
})
|
|
|
|
})
|