mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-25 21:01:54 +08:00
🚑️ Fix edge case when calling link to typebot after input
This commit is contained in:
parent
25808a97f0
commit
601ddf3c07
@ -16,6 +16,14 @@
|
||||
"title": "Group #1",
|
||||
"graphCoordinates": { "x": 363, "y": 199 },
|
||||
"blocks": [
|
||||
{
|
||||
"id": "py3nbq24fal5hgvzlejibzkd",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Hey!" }] }]
|
||||
}
|
||||
},
|
||||
{ "id": "r26l9tdez17sgx4xiwku15mk", "type": "text input" },
|
||||
{
|
||||
"id": "y3ptzm07xpl272zhokvjoqa4",
|
||||
"type": "Typebot link",
|
||||
@ -36,8 +44,8 @@
|
||||
},
|
||||
{
|
||||
"id": "vs65r7x7budygdfg9vhxcq7m",
|
||||
"graphCoordinates": { "x": -8, "y": 458 },
|
||||
"title": "Group #2",
|
||||
"graphCoordinates": { "x": -8, "y": 458 },
|
||||
"blocks": [
|
||||
{
|
||||
"id": "t4u8h07eq17f6oqmsydcqyaj",
|
||||
@ -84,7 +92,7 @@
|
||||
}
|
||||
},
|
||||
"createdAt": "2022-03-08T15:58:49.720Z",
|
||||
"updatedAt": "2022-03-08T16:07:18.899Z",
|
||||
"updatedAt": "2025-04-16T19:56:24.043Z",
|
||||
"icon": null,
|
||||
"folderId": null,
|
||||
"publicId": "cl0ibhi7s0018n21aarlmg0cm-public",
|
||||
|
||||
@ -31,6 +31,8 @@ test.beforeAll(async () => {
|
||||
|
||||
test("should work as expected", async ({ page }) => {
|
||||
await page.goto(`/${typebotId}-public`);
|
||||
await page.getByPlaceholder("Type your answer...").fill("Start");
|
||||
await page.getByPlaceholder("Type your answer...").press("Enter");
|
||||
await expect(page.getByText("First test message")).toBeVisible();
|
||||
await page.getByPlaceholder("Type your answer...").fill("Hello there!");
|
||||
await page.getByPlaceholder("Type your answer...").press("Enter");
|
||||
|
||||
@ -68,9 +68,11 @@ export const walkFlowForward = async (
|
||||
let nextEdge: { id: string; isOffDefaultPath: boolean } | undefined =
|
||||
startingPoint.type === "nextEdge" ? startingPoint.nextEdge : undefined;
|
||||
|
||||
let i = -1;
|
||||
do {
|
||||
i += 1;
|
||||
const nextGroupResponse =
|
||||
startingPoint.type === "group" && !nextEdge
|
||||
i === 0 && startingPoint.type === "group" && !nextEdge
|
||||
? {
|
||||
group: startingPoint.group,
|
||||
newSessionState,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user