⬆️ Upgrade dependencies
This commit is contained in:
@@ -56,7 +56,7 @@ test.describe.parallel('Video bubble block', () => {
|
||||
|
||||
await page.goto(`/typebots/${typebotId}/edit`)
|
||||
await page.click('text=Preview')
|
||||
await expect(page.locator('video > source').nth(1)).toHaveAttribute(
|
||||
await expect(page.locator('video').nth(1)).toHaveAttribute(
|
||||
'src',
|
||||
videoSrc
|
||||
)
|
||||
|
||||
@@ -26,7 +26,7 @@ test.describe('Builder', () => {
|
||||
)
|
||||
await page.click('text=Test the request')
|
||||
await expect(page.locator('div[role="textbox"] >> nth=-1')).toContainText(
|
||||
`"Group #1": "answer value", "Group #2": "20", "Group #2 (1)": "Yes"`
|
||||
`"Group #1": "answer value", "Group #2": "20", "Group #2 (1)": "Yes"`, {timeout: 10000}
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@ export const CreateBotButton = ({
|
||||
|
||||
return (
|
||||
<Button
|
||||
mr={{ sm: 6 }}
|
||||
mb={6}
|
||||
style={{ width: '225px', height: '270px' }}
|
||||
onClick={handleClick}
|
||||
paddingX={6}
|
||||
|
||||
@@ -156,8 +156,6 @@ export const FolderButton = ({
|
||||
export const ButtonSkeleton = () => (
|
||||
<Button
|
||||
as={VStack}
|
||||
mr={{ sm: 6 }}
|
||||
mb={6}
|
||||
style={{ width: '225px', height: '270px' }}
|
||||
paddingX={6}
|
||||
whiteSpace={'normal'}
|
||||
|
||||
@@ -117,8 +117,6 @@ export const TypebotButton = ({
|
||||
variant="outline"
|
||||
w="225px"
|
||||
h="270px"
|
||||
mr={{ sm: 6 }}
|
||||
mb={6}
|
||||
rounded="lg"
|
||||
whiteSpace="normal"
|
||||
opacity={draggedTypebot?.id === typebot.id ? 0.2 : 1}
|
||||
|
||||
@@ -3,7 +3,6 @@ import test, { expect } from '@playwright/test'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { defaultTextInputOptions } from '@typebot.io/schemas'
|
||||
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
|
||||
import { freeWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup'
|
||||
|
||||
test.describe.parallel('Settings page', () => {
|
||||
test.describe('General', () => {
|
||||
@@ -13,12 +12,7 @@ test.describe.parallel('Settings page', () => {
|
||||
id: typebotId,
|
||||
})
|
||||
await page.goto(`/typebots/${typebotId}/settings`)
|
||||
await expect(
|
||||
page.locator('a:has-text("Made with Typebot")')
|
||||
).toHaveAttribute('href', 'https://www.typebot.io/?utm_source=litebadge')
|
||||
await page.click('text="Typebot.io branding"')
|
||||
await expect(page.locator('a:has-text("Made with Typebot")')).toBeHidden()
|
||||
|
||||
|
||||
await page.click('text="Remember user"')
|
||||
|
||||
await expect(page.getByPlaceholder('Type your answer...')).toHaveValue(
|
||||
@@ -103,25 +97,4 @@ test.describe.parallel('Settings page', () => {
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
test.describe('Free workspace', () => {
|
||||
test("can't remove branding", async ({ page }) => {
|
||||
const typebotId = createId()
|
||||
await importTypebotInDatabase(getTestAsset('typebots/settings.json'), {
|
||||
id: typebotId,
|
||||
workspaceId: freeWorkspaceId,
|
||||
})
|
||||
await page.goto(`/typebots/${typebotId}/settings`)
|
||||
await expect(page.locator('text="What\'s your name?"')).toBeVisible()
|
||||
await expect(
|
||||
page.locator('[data-testid="starter-lock-tag"]')
|
||||
).toBeVisible()
|
||||
await page.click('text=Typebot.io branding')
|
||||
await expect(
|
||||
page.locator(
|
||||
'text="You need to upgrade your plan in order to remove branding"'
|
||||
)
|
||||
).toBeVisible()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@ import { getTestAsset } from '@/test/utils/playwright'
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
|
||||
import { freeWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup'
|
||||
|
||||
const hostAvatarUrl =
|
||||
'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1760&q=80'
|
||||
@@ -20,8 +21,15 @@ test.describe.parallel('Theme page', () => {
|
||||
await page.goto(`/typebots/${typebotId}/theme`)
|
||||
await expect(page.getByRole('button', { name: 'Go' })).toBeVisible()
|
||||
|
||||
// Branding
|
||||
await page.getByRole('button', { name: 'Global' }).click()
|
||||
await expect(
|
||||
page.locator('a:has-text("Made with Typebot")')
|
||||
).toHaveAttribute('href', 'https://www.typebot.io/?utm_source=litebadge')
|
||||
await page.click('text="Show Typebot brand"')
|
||||
await expect(page.locator('a:has-text("Made with Typebot")')).toBeHidden()
|
||||
|
||||
// Font
|
||||
await page.getByRole('button', { name: 'Font & Background' }).click()
|
||||
await page.getByRole('textbox').fill('Roboto Slab')
|
||||
await expect(page.locator('.typebot-container')).toHaveCSS(
|
||||
'font-family',
|
||||
@@ -252,3 +260,25 @@ test.describe.parallel('Theme page', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
test.describe('Free workspace', () => {
|
||||
test("can't remove branding", async ({ page }) => {
|
||||
const typebotId = createId()
|
||||
await importTypebotInDatabase(getTestAsset('typebots/settings.json'), {
|
||||
id: typebotId,
|
||||
workspaceId: freeWorkspaceId,
|
||||
})
|
||||
await page.goto(`/typebots/${typebotId}/theme`)
|
||||
await expect(page.locator('text="What\'s your name?"')).toBeVisible()
|
||||
await page.getByRole('button', { name: 'Global' }).click()
|
||||
await expect(
|
||||
page.locator('[data-testid="starter-lock-tag"]')
|
||||
).toBeVisible()
|
||||
await page.click('text=Show Typebot brand')
|
||||
await expect(
|
||||
page.locator(
|
||||
'text="You need to upgrade your plan in order to remove branding"'
|
||||
)
|
||||
).toBeVisible()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -19,13 +19,12 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
const credentialsId = req.query.credentialsId as string | undefined
|
||||
if (!credentialsId) return badRequest(res)
|
||||
const spreadsheetId = req.query.id as string
|
||||
const doc = new GoogleSpreadsheet(spreadsheetId)
|
||||
const auth = await getAuthenticatedGoogleClient(user.id, credentialsId)
|
||||
if (!auth)
|
||||
return res
|
||||
.status(404)
|
||||
.send({ message: "Couldn't find credentials in database" })
|
||||
doc.useOAuth2Client(auth.client)
|
||||
const doc = new GoogleSpreadsheet(spreadsheetId, auth.client)
|
||||
await doc.loadInfo()
|
||||
return res.send({
|
||||
sheets: (
|
||||
|
||||
Reference in New Issue
Block a user