2023-05-14 13:52:47 +02:00
|
|
|
import { test } from '@playwright/test'
|
2024-08-27 00:09:51 +02:00
|
|
|
import { checkLinkDoesNotExist, checkLinkForText, createNoteSuccessfully } from '../../utils'
|
2023-05-14 13:52:47 +02:00
|
|
|
|
|
|
|
test.describe('@web', () => {
|
2024-08-27 14:35:39 +02:00
|
|
|
test('1 minute', async ({ page, browserName }) => {
|
|
|
|
test.skip(browserName === 'webkit')
|
2023-05-14 13:52:47 +02:00
|
|
|
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 })
|
2023-05-25 10:17:01 +02:00
|
|
|
await checkLinkForText(page, { link, text })
|
|
|
|
await checkLinkForText(page, { link, text })
|
2023-05-14 13:52:47 +02:00
|
|
|
await page.waitForTimeout(timeout)
|
2023-05-25 10:17:01 +02:00
|
|
|
await checkLinkDoesNotExist(page, link)
|
2023-05-14 13:52:47 +02:00
|
|
|
})
|
|
|
|
})
|