feat(dashboard): 🛂 Limit create folder to Pro user
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import test, { expect, Page } from '@playwright/test'
|
||||
import path from 'path'
|
||||
import { generate } from 'short-uuid'
|
||||
import { createFolders, createTypebots } from '../services/database'
|
||||
import { deleteButtonInConfirmDialog } from '../services/selectorUtils'
|
||||
@ -72,6 +73,20 @@ test.describe('Dashboard page', () => {
|
||||
await page.click('a:has-text("Back")')
|
||||
await expect(typebotButton).toBeVisible()
|
||||
})
|
||||
|
||||
test.describe('Free user', () => {
|
||||
test.use({
|
||||
storageState: path.join(__dirname, '../freeUser.json'),
|
||||
})
|
||||
test("create folder shouldn't be available", async ({ page }) => {
|
||||
await page.goto('/typebots')
|
||||
await page.click('text=Create a folder')
|
||||
await expect(
|
||||
page.locator('text="You can\'t create folders with the basic plan"')
|
||||
).toBeVisible()
|
||||
await expect(page.locator('text=Upgrade now')).toBeVisible()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
const waitForNextApiCall = (page: Page, path?: string) =>
|
||||
|
Reference in New Issue
Block a user