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'
|
2024-08-27 00:09:51 +02:00
|
|
|
import { checkLinkForDownload, createNoteSuccessfully } 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))
|
2024-08-27 00:09:51 +02:00
|
|
|
const link = await createNoteSuccessfully(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
|
|
|
})
|
|
|
|
})
|