fix(editor): 🐛 Variables button in text editor
This commit is contained in:
@ -144,6 +144,7 @@ export const TextBubbleEditor = ({ initialValue, onClose }: Props) => {
|
|||||||
rounded="md"
|
rounded="md"
|
||||||
bgColor="white"
|
bgColor="white"
|
||||||
w="250px"
|
w="250px"
|
||||||
|
zIndex={10}
|
||||||
>
|
>
|
||||||
<VariableSearchInput
|
<VariableSearchInput
|
||||||
onSelectVariable={handleVariableSelected}
|
onSelectVariable={handleVariableSelected}
|
||||||
|
@ -60,7 +60,7 @@ export const VariableSearchInput = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const variable = variables.find((v) => v.name === debouncedInputValue)
|
const variable = variables.find((v) => v.name === debouncedInputValue)
|
||||||
onSelectVariable(variable)
|
if (variable) onSelectVariable(variable)
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [debouncedInputValue])
|
}, [debouncedInputValue])
|
||||||
|
|
||||||
|
@ -49,6 +49,11 @@ test.describe('Text bubble step', () => {
|
|||||||
})
|
})
|
||||||
await page.click('[data-testid="link-button"]')
|
await page.click('[data-testid="link-button"]')
|
||||||
|
|
||||||
|
await page.press('div[role="textbox"]', 'Shift+Enter')
|
||||||
|
await page.click('button >> text=Variables')
|
||||||
|
await page.fill('[data-testid="variables-input"]', 'test')
|
||||||
|
await page.click('text=Create "test"')
|
||||||
|
|
||||||
await page.click('text=Preview')
|
await page.click('text=Preview')
|
||||||
await expect(
|
await expect(
|
||||||
typebotViewer(page).locator('span.slate-bold >> nth=0')
|
typebotViewer(page).locator('span.slate-bold >> nth=0')
|
||||||
|
Reference in New Issue
Block a user