mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-11-17 19:10:29 +01:00
Nicco
c3b1772728
* testing * try playwrigth * testing * add pr support * not on each commit * add test ids * make backend more configuratble * 2.0.2 * spec
25 lines
883 B
TypeScript
25 lines
883 B
TypeScript
import { test } from '@playwright/test'
|
|
import { checkLinkDoesNotExist, checkLinkForDownload, checkLinkForText, createNote, getFileChecksum } from '../utils'
|
|
import Files from './files'
|
|
|
|
test('simple pdf', async ({ page }) => {
|
|
const files = [Files.PDF]
|
|
const link = await createNote(page, { files })
|
|
await checkLinkForText(page, link, 'AES.pdf')
|
|
await checkLinkDoesNotExist(page, link)
|
|
})
|
|
|
|
test('pdf content', async ({ page }) => {
|
|
const files = [Files.PDF]
|
|
const checksum = await getFileChecksum(files[0])
|
|
const link = await createNote(page, { files })
|
|
await checkLinkForDownload(page, link, 'AES.pdf', checksum)
|
|
})
|
|
|
|
test('image content', async ({ page }) => {
|
|
const files = [Files.Image]
|
|
const checksum = await getFileChecksum(files[0])
|
|
const link = await createNote(page, { files })
|
|
await checkLinkForDownload(page, link, 'alfred-kenneally', checksum)
|
|
})
|