From 26253f9880f0089bb83190d42737c81c477776f4 Mon Sep 17 00:00:00 2001 From: "Huu Le (Lee)" <39040748+leehuwuj@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:57:38 +0700 Subject: [PATCH] fix: add --no-llama-parse and improve e2e test (#607) --- e2e/basic.spec.ts | 24 +++++++++++++----------- e2e/utils.ts | 1 + 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/e2e/basic.spec.ts b/e2e/basic.spec.ts index 2090e0fe..93e3edfb 100644 --- a/e2e/basic.spec.ts +++ b/e2e/basic.spec.ts @@ -91,17 +91,19 @@ for (const templateType of templateTypes) { test.skip(appType === "--no-frontend"); await page.goto(`http://localhost:${port}`); await page.fill("form input", "hello"); - await page.click("form button[type=submit]"); - const response = await page.waitForResponse( - (res) => { - return ( - res.url().includes("/api/chat") && res.status() === 200 - ); - }, - { - timeout: 1000 * 60, - }, - ); + const [response] = await Promise.all([ + page.waitForResponse( + (res) => { + return ( + res.url().includes("/api/chat") && res.status() === 200 + ); + }, + { + timeout: 1000 * 60, + }, + ), + page.click("form button[type=submit]"), + ]); const text = await response.text(); console.log("AI response when submitting message: ", text); expect(response.ok()).toBeTruthy(); diff --git a/e2e/utils.ts b/e2e/utils.ts index 87a6df8e..739930c7 100644 --- a/e2e/utils.ts +++ b/e2e/utils.ts @@ -119,6 +119,7 @@ export async function runCreateLlama( postInstallAction, "--tools", "none", + "--no-llama-parse", ].join(" "); console.log(`running command '${command}' in ${cwd}`); const appProcess = exec(command, { -- GitLab