Skip to content

Commit

Permalink
fix: change url path
Browse files Browse the repository at this point in the history
  • Loading branch information
kweripx committed Jan 24, 2024
1 parent 6532b54 commit e054043
Show file tree
Hide file tree
Showing 159 changed files with 333 additions and 334 deletions.
2 changes: 1 addition & 1 deletion apps/builder/public/bots/onboarding-dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" },
"hostAvatar": {
"isEnabled": true,
"url": "https://s3.eu-west-3.amazonaws.com/typebot/public/typebots/cl0s4zy9m247009l1ybkoojxe/me-square.png"
"url": "https://s3.eu-west-3.amazonaws.com/typebot/public/toolzz/cl0s4zy9m247009l1ybkoojxe/me-square.png"
}
},
"general": {
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/features/account/UserProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const UserProvider = ({ children }: { children: ReactNode }) => {
if (!router.isReady) return
if (status === 'loading') return
const isSignInPath = ['/signin', '/register'].includes(router.pathname)
const isPathPublicFriendly = /\/typebots\/.+\/(edit|theme|settings)/.test(
const isPathPublicFriendly = /\/toolzz\/.+\/(edit|theme|settings)/.test(
router.pathname
)
if (isSignInPath || isPathPublicFriendly) return
Expand Down
4 changes: 2 additions & 2 deletions apps/builder/src/features/account/account.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { userId } from '@typebot.io/lib/playwright/databaseSetup'
test.describe.configure({ mode: 'parallel' })

test('should display user info properly', async ({ page }) => {
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Settings & Members')
expect(
page.locator('input[type="email"]').getAttribute('disabled')
Expand All @@ -27,7 +27,7 @@ test('should display user info properly', async ({ page }) => {
})

test('should be able to create and delete api tokens', async ({ page }) => {
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Settings & Members')
await expect(page.locator('text=Github')).toBeVisible()
await page.click('text="Create"')
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/features/analytics/analytics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('analytics are not available for non-pro workspaces', async ({ page }) => {
}
)
await injectFakeResults({ typebotId, count: 10 })
await page.goto(`/typebots/${typebotId}/results/analytics`)
await page.goto(`/toolzz/${typebotId}/results/analytics`)
const firstDropoffBox = page.locator('text="%" >> nth=0')
await firstDropoffBox.hover()
await expect(
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/features/analytics/api/getTotalAnswers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const getTotalAnswers = authenticatedProcedure
.meta({
openapi: {
method: 'GET',
path: '/v1/typebots/{typebotId}/analytics/totalAnswersInBlocks',
path: '/v1/toolzz/{typebotId}/analytics/totalAnswersInBlocks',
protect: true,
summary: 'List total answers in blocks',
tags: ['Analytics'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const getTotalVisitedEdges = authenticatedProcedure
.meta({
openapi: {
method: 'GET',
path: '/v1/typebots/{typebotId}/analytics/totalVisitedEdges',
path: '/v1/toolzz/{typebotId}/analytics/totalVisitedEdges',
protect: true,
summary: 'List total edges used in results',
tags: ['Analytics'],
Expand Down
6 changes: 3 additions & 3 deletions apps/builder/src/features/auth/components/OnboardingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const OnboardingPage = () => {
useEffect(() => {
if (!user?.createdAt) return
if (isNewUser === false || !env.NEXT_PUBLIC_ONBOARDING_TYPEBOT_ID)
replace({ pathname: '/typebots', query })
replace({ pathname: '/toolzz', query })
}, [isNewUser, query, replace, user?.createdAt])

const initConfettis = () => {
Expand Down Expand Up @@ -83,7 +83,7 @@ export const OnboardingPage = () => {
right="5"
variant="ghost"
size="sm"
onClick={() => replace({ pathname: '/typebots', query })}
onClick={() => replace({ pathname: '/toolzz', query })}
>
{t('skip')}
</Button>
Expand All @@ -96,7 +96,7 @@ export const OnboardingPage = () => {
onEnd={() => {
setTimeout(() => {
replace({
pathname: '/typebots',
pathname: '/toolzz',
query: { ...query, isFirstBot: true },
})
}, 2000)
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/features/auth/components/SignInForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const SignInForm = ({

useEffect(() => {
if (status === 'authenticated') {
router.replace(router.query.redirectPath?.toString() ?? '/typebots')
router.replace(router.query.redirectPath?.toString() ?? '/toolzz')
return
}
;(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const SocialLoginButtons = ({ providers }: Props) => {
await signIn(provider, {
callbackUrl:
query.callbackUrl?.toString() ??
`/typebots?${stringify(omit(query, 'error', 'callbackUrl'))}`,
`/toolzz?${stringify(omit(query, 'error', 'callbackUrl'))}`,
})
setTimeout(() => setAuthLoading(undefined), 3000)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const getBillingPortalUrl = authenticatedProcedure
})
const portalSession = await stripe.billingPortal.sessions.create({
customer: workspace.stripeId,
return_url: `${env.NEXTAUTH_URL}/typebots`,
return_url: `${env.NEXTAUTH_URL}/toolzz`,
})
return {
billingPortalUrl: portalSession.url,
Expand Down
18 changes: 9 additions & 9 deletions apps/builder/src/features/billing/billing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test.afterAll(async () => {
})

test('should display valid usage', async ({ page }) => {
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Settings & Members')
await page.click('text=Billing & Usage')
await expect(page.locator('text="/ 10,000"')).toBeVisible()
Expand Down Expand Up @@ -111,7 +111,7 @@ test('should display valid usage', async ({ page }) => {
test('plan changes should work', async ({ page }) => {
test.setTimeout(80000)
// Upgrade to STARTER
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Pro workspace')
await page.click('text=Plan Change Workspace')
await page.click('text=Settings & Members')
Expand All @@ -138,7 +138,7 @@ test('plan changes should work', async ({ page }) => {
)

// Update plan with additional quotas
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Settings & Members')
await page.click('text=Billing & Usage')
await expect(page.locator('text="/ 2,000"')).toBeVisible()
Expand Down Expand Up @@ -166,7 +166,7 @@ test('plan changes should work', async ({ page }) => {
await cancelSubscription(stripeId)

// Cancel subscription
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Settings & Members')
await page.click('text=Billing & Usage')
await expect(
Expand All @@ -176,7 +176,7 @@ test('plan changes should work', async ({ page }) => {
})

test('should display invoices', async ({ page }) => {
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Settings & Members')
await page.click('text=Billing & Usage')
await expect(page.locator('text="Invoices"')).toBeHidden()
Expand All @@ -193,7 +193,7 @@ test('should display invoices', async ({ page }) => {
})

test('custom plans should work', async ({ page }) => {
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Pro workspace')
await page.click('text=Enterprise Workspace')
await page.click('text=Settings & Members')
Expand All @@ -212,14 +212,14 @@ test('custom plans should work', async ({ page }) => {
description: 'Description of the deal',
})

await page.goto('/typebots?claimCustomPlan=true')
await page.goto('/toolzz?claimCustomPlan=true')

await expect(page.getByRole('list').getByText('$239.00')).toBeVisible()
await expect(page.getByText('Subscribe to Acme custom plan')).toBeVisible()
})

test('custom plans should work in BRL', async ({ page }) => {
await page.goto('/typebots')
await page.goto('/toolzz')
await page.click('text=Pro workspace')
await page.click('text=Enterprise Workspace')
await page.click('text=Settings & Members')
Expand All @@ -238,7 +238,7 @@ test('custom plans should work in BRL', async ({ page }) => {
description: 'Description of the deal',
})

await page.goto('/typebots?claimCustomPlan=true')
await page.goto('/toolzz?claimCustomPlan=true')

await expect(page.getByRole('list').getByText('R$239.00')).toBeVisible()
await expect(page.getByText('Subscribe to Acme custom plan')).toBeVisible()
Expand Down
6 changes: 3 additions & 3 deletions apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('should work as expected', async ({ page }) => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.getByText('Click to edit...').click()
await page
.getByPlaceholder('Paste the audio file link...')
Expand All @@ -31,15 +31,15 @@ test('should work as expected', async ({ page }) => {
await expect(page.locator('audio')).toHaveAttribute(
'src',
RegExp(
`/public/workspaces/${proWorkspaceId}/typebots/${typebotId}/blocks`,
`/public/workspaces/${proWorkspaceId}/toolzz/${typebotId}/blocks`,
'gm'
)
)
await page.getByRole('button', { name: 'Test', exact: true }).click()
await expect(page.locator('audio')).toHaveAttribute(
'src',
RegExp(
`/public/workspaces/${proWorkspaceId}/typebots/${typebotId}/blocks`,
`/public/workspaces/${proWorkspaceId}/toolzz/${typebotId}/blocks`,
'gm'
)
)
Expand Down
4 changes: 2 additions & 2 deletions apps/builder/src/features/blocks/bubbles/embed/embed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.describe.parallel('Embed bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.click('text=Click to edit...')
await page.fill('input[placeholder="Paste the link or code..."]', pdfSrc)
await expect(page.locator('text="Show embed"')).toBeVisible()
Expand All @@ -43,7 +43,7 @@ test.describe.parallel('Embed bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.click('text=Test')
await expect(page.locator('iframe#embed-bubble-content')).toHaveAttribute(
'src',
Expand Down
10 changes: 5 additions & 5 deletions apps/builder/src/features/blocks/bubbles/image/image.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ test.describe.parallel('Image bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('text=Click to edit...')
await page.getByRole('button', { name: 'Upload' }).click()
await page.setInputFiles('input[type="file"]', getTestAsset('avatar.jpg'))
await expect(page.locator('img')).toHaveAttribute(
'src',
new RegExp(
`/public/workspaces/${proWorkspaceId}/typebots/${typebotId}/blocks/block2`,
`/public/workspaces/${proWorkspaceId}/toolzz/${typebotId}/blocks/block2`,
'gm'
)
)
Expand All @@ -47,7 +47,7 @@ test.describe.parallel('Image bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('text=Click to edit...')
await page.fill(
Expand All @@ -68,7 +68,7 @@ test.describe.parallel('Image bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('text=Click to edit...')
await page.click('text=Giphy')
Expand Down Expand Up @@ -115,7 +115,7 @@ test.describe.parallel('Image bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.click('text=Test')
await expect(page.locator('img')).toHaveAttribute('src', unsplashImageSrc)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test.describe('Text bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('[data-testid="bold-button"]')
await page.type('div[role="textbox"]', 'Bold text')
Expand Down
8 changes: 4 additions & 4 deletions apps/builder/src/features/blocks/bubbles/video/video.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.describe.parallel('Video bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('text=Click to edit...')
await page.fill('input[placeholder="Paste the video link..."]', videoSrc)
Expand All @@ -50,7 +50,7 @@ test.describe.parallel('Video bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.click('text=Test')
await expect(page.locator('video').nth(1)).toHaveAttribute(
'src',
Expand All @@ -74,7 +74,7 @@ test.describe.parallel('Video bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.click('text=Test')
await expect(page.locator('iframe').nth(1)).toHaveAttribute(
'src',
Expand All @@ -98,7 +98,7 @@ test.describe.parallel('Video bubble block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.click('text=Test')
await expect(page.locator('iframe').nth(1)).toHaveAttribute(
'src',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test.describe.parallel('Buttons input block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.fill('input[value="Click to edit"]', 'Item 1')
await page.press('input[value="Item 1"]', 'Enter')
await page.fill('input[value="Click to edit"]', 'Item 2')
Expand Down Expand Up @@ -76,7 +76,7 @@ test('Variable buttons should work', async ({ page }) => {
}
)

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.click('text=Test')
await page.getByRole('button', { name: 'Variable item' }).click()
await expect(page.getByTestId('guest-bubble')).toHaveText('Variable item')
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/features/blocks/inputs/date/date.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test.describe('Date input block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('text=Test')
await expect(page.locator('[data-testid="from-date"]')).toHaveAttribute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.describe('Email input block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('text=Test')
await expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test('options should work', async ({ page }) => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('text=Test')
await expect(page.locator(`text=Click to upload`)).toBeVisible()
Expand Down Expand Up @@ -63,7 +63,7 @@ test.describe('Free workspace', () => {
workspaceId: freeWorkspaceId,
},
])
await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)
await page.click('text="Collect file"')
await page.click('text="Allow multiple files?"')
await page.click('text="Publish"')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.describe('Number input block', () => {
},
])

await page.goto(`/typebots/${typebotId}/edit`)
await page.goto(`/toolzz/${typebotId}/edit`)

await page.click('text=Test')
await expect(
Expand Down
Loading

0 comments on commit e054043

Please sign in to comment.