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