2
0

feat(input): ️ Better payment accessibility

This commit is contained in:
Baptiste Arnaud
2022-06-01 08:47:15 +02:00
parent 89d17a9ed3
commit c1461f0758
8 changed files with 78 additions and 31 deletions

View File

@ -75,7 +75,13 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
const handleButtonLabelChange = (button: string) =>
onOptionsChange({
...options,
labels: { button },
labels: { ...options.labels, button },
})
const handleSuccessLabelChange = (success: string) =>
onOptionsChange({
...options,
labels: { ...options.labels, success },
})
return (
@ -130,6 +136,14 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
placeholder="Pay"
/>
</Stack>
<Stack>
<Text>Success message:</Text>
<Input
onChange={handleSuccessLabelChange}
defaultValue={options.labels.success ?? 'Success'}
placeholder="Success"
/>
</Stack>
<Accordion allowToggle>
<AccordionItem>
<AccordionButton justifyContent="space-between">

View File

@ -61,6 +61,7 @@ test.describe('Free workspace', () => {
},
])
await page.goto(`/typebots/${typebotId}/share`)
await expect(page.locator('text=Pro')).toBeVisible()
await page.click('text=Add my domain')
await expect(page.locator('text=For solo creator')).toBeVisible()
})

View File

@ -11,6 +11,7 @@ test.describe.parallel('Templates page', () => {
test('From file should import correctly', async ({ page }) => {
await page.goto('/typebots/create')
await page.waitForTimeout(1000)
await page.setInputFiles(
'input[type="file"]',
path.join(__dirname, '../fixtures/typebots/singleChoiceTarget.json')