cryptgeon/test/web/text/expiration.spec.ts

18 lines
701 B
TypeScript
Raw Normal View History

import { test } from '@playwright/test'
2024-08-27 00:09:51 +02:00
import { checkLinkDoesNotExist, checkLinkForText, createNoteSuccessfully } from '../../utils'
test.describe('@web', () => {
2024-08-27 14:35:39 +02:00
test('1 minute', async ({ page, browserName }) => {
test.skip(browserName === 'webkit')
const text = `Virtues value ascetic revaluation sea dead strong burying.`
const minutes = 1
const timeout = minutes * 60_000
test.setTimeout(timeout * 2)
2024-08-27 00:09:51 +02:00
const link = await createNoteSuccessfully(page, { text, expiration: minutes })
await checkLinkForText(page, { link, text })
await checkLinkForText(page, { link, text })
await page.waitForTimeout(timeout)
await checkLinkDoesNotExist(page, link)
})
})