diff --git a/e2e/basic.spec.ts b/e2e/basic.spec.ts index da6a739cf2c8cbd393551298415d4644c169b4be..dbc4411416035203c4e4eb733a03f68067de956a 100644 --- a/e2e/basic.spec.ts +++ b/e2e/basic.spec.ts @@ -27,7 +27,9 @@ for (const templateType of templateTypes) { } const appType: AppType = templateFramework === "express" || templateFramework === "fastapi" - ? "--frontend" + ? templateType === "simple" + ? "--no-frontend" // simple templates don't have frontends + : "--frontend" : ""; test(`try create-llama ${templateType} ${templateFramework} ${templateEngine} ${templateUI} ${appType}`, async ({ page, @@ -46,8 +48,10 @@ for (const templateType of templateTypes) { const cps = await runApp(cwd, name, appType, port); // test frontend - await page.goto(`http://localhost:${port}`); - await expect(page.getByText("Built by LlamaIndex")).toBeVisible(); + if (appType !== "--no-frontend") { + await page.goto(`http://localhost:${port}`); + await expect(page.getByText("Built by LlamaIndex")).toBeVisible(); + } // TODO: test backend using curl (would need OpenAI key) // clean processes cps.forEach((cp) => cp.kill()); diff --git a/e2e/utils.ts b/e2e/utils.ts index 6e134495ea3d7276fc091153ba481b4dac4e976c..3085263d11c437b9dc4e467fa69e87dc735b6404 100644 --- a/e2e/utils.ts +++ b/e2e/utils.ts @@ -17,11 +17,6 @@ export async function runApp( try { switch (appType) { - case "--no-frontend": - cps.push( - await createProcess("npm run dev", `${cwd}/${name}/backend`, port), - ); - break; case "--frontend": cps.push( await createProcess(