@@ -1,7 +1,11 @@
|
||||
import { TextInput } from '@/components/inputs'
|
||||
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
|
||||
import { FormLabel, Stack } from '@chakra-ui/react'
|
||||
import { EmailInputOptions, Variable } from '@typebot.io/schemas'
|
||||
import {
|
||||
EmailInputOptions,
|
||||
Variable,
|
||||
invalidEmailDefaultRetryMessage,
|
||||
} from '@typebot.io/schemas'
|
||||
import React from 'react'
|
||||
|
||||
type Props = {
|
||||
@@ -33,7 +37,9 @@ export const EmailInputSettings = ({ options, onOptionsChange }: Props) => {
|
||||
/>
|
||||
<TextInput
|
||||
label="Retry message:"
|
||||
defaultValue={options.retryMessageContent}
|
||||
defaultValue={
|
||||
options.retryMessageContent ?? invalidEmailDefaultRetryMessage
|
||||
}
|
||||
onChange={handleRetryMessageChange}
|
||||
/>
|
||||
<Stack>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
|
||||
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
|
||||
import { defaultEmailInputOptions, InputBlockType } from '@typebot.io/schemas'
|
||||
import {
|
||||
defaultEmailInputOptions,
|
||||
InputBlockType,
|
||||
invalidEmailDefaultRetryMessage,
|
||||
} from '@typebot.io/schemas'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
|
||||
test.describe('Email input block', () => {
|
||||
@@ -35,7 +39,7 @@ test.describe('Email input block', () => {
|
||||
await expect(page.locator('text=Your email...')).toBeVisible()
|
||||
await page.getByLabel('Button label:').fill('Go')
|
||||
await page.fill(
|
||||
`input[value="${defaultEmailInputOptions.retryMessageContent}"]`,
|
||||
`input[value="${invalidEmailDefaultRetryMessage}"]`,
|
||||
'Try again bro'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user