2023-05-14 13:52:47 +02:00
|
|
|
import { test } from '@playwright/test'
|
|
|
|
import { checkLinkDoesNotExist, checkLinkForText, createNote } from '../../utils'
|
|
|
|
|
|
|
|
test.describe('@web', () => {
|
|
|
|
test('only shown once', async ({ page }) => {
|
|
|
|
const text = `Christian victorious reason suicide dead. Right ultimate gains god hope truth burying selfish society joy. Ultimate.`
|
2023-05-25 10:17:01 +02:00
|
|
|
const link = await createNote(page, { text })
|
|
|
|
await checkLinkForText(page, { link, text })
|
|
|
|
await checkLinkDoesNotExist(page, link)
|
2023-05-14 13:52:47 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
test('view 3 times', async ({ page }) => {
|
|
|
|
const text = `Justice holiest overcome fearful strong ultimate holiest christianity.`
|
2023-05-25 10:17:01 +02:00
|
|
|
const link = await createNote(page, { text, views: 3 })
|
|
|
|
await checkLinkForText(page, { link, text })
|
|
|
|
await checkLinkForText(page, { link, text })
|
|
|
|
await checkLinkForText(page, { link, text })
|
|
|
|
await checkLinkDoesNotExist(page, link)
|
2023-05-14 13:52:47 +02:00
|
|
|
})
|
|
|
|
})
|