feat(results): 🛂 Limit incomplete submissions
This commit is contained in:
@ -2,6 +2,7 @@ import test, { expect, Page } from '@playwright/test'
|
||||
import { readFileSync } from 'fs'
|
||||
import { defaultTextInputOptions, InputStepType } from 'models'
|
||||
import { parse } from 'papaparse'
|
||||
import path from 'path'
|
||||
import { generate } from 'short-uuid'
|
||||
import {
|
||||
createResults,
|
||||
@ -86,6 +87,17 @@ test.describe('Results page', () => {
|
||||
const { data: dataAll } = parse(fileAll)
|
||||
validateExportAll(dataAll)
|
||||
})
|
||||
|
||||
test.describe('Free user', () => {
|
||||
test.use({
|
||||
storageState: path.join(__dirname, '../freeUser.json'),
|
||||
})
|
||||
test("Incomplete results shouldn't be displayed", async ({ page }) => {
|
||||
await page.goto(`/typebots/${typebotId}/results`)
|
||||
await page.click('text=Unlock 200 results')
|
||||
await expect(page.locator('text=Upgrade now')).toBeVisible()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
const validateExportSelection = (data: unknown[]) => {
|
||||
|
Reference in New Issue
Block a user