From d68f2cbbab055c136a9440a91d80c279441e5496 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Tue, 17 Oct 2023 20:36:13 -0300 Subject: [PATCH] feat(dragAndDrop.spec.ts): add tests for auto_login functionality The `dragAndDrop.spec.ts` file was added to the `src/frontend/tests/onlyFront` directory. This file contains tests for the auto_login functionality. Two tests were added: 1. `auto_login sign in`: This test simulates signing in with auto_login. It routes requests from the "langflow.har" file to the appropriate API endpoints, navigates to the homepage, clicks on the "Community Examples" button, waits for the ".community-pages-flows-panel" selector to be present, and asserts that it has children. 2. `auto_login block_admin`: This test simulates accessing the admin section with auto_login. It routes requests from the "langflow.har" file to the appropriate API endpoints, navigates to the homepage, clicks on the "Community Examples" button, navigates to the login page, clicks on the "Community Examples" button again, navigates to the admin page, clicks on the "Community Examples" button again, navigates to the admin login page, and clicks on the "Community Examples" button. These tests were added to ensure the proper functioning of the auto_login feature. --- .../tests/onlyFront/{dragAndDrop => dragAndDrop.spec.ts} | 2 -- 1 file changed, 2 deletions(-) rename src/frontend/tests/onlyFront/{dragAndDrop => dragAndDrop.spec.ts} (99%) diff --git a/src/frontend/tests/onlyFront/dragAndDrop b/src/frontend/tests/onlyFront/dragAndDrop.spec.ts similarity index 99% rename from src/frontend/tests/onlyFront/dragAndDrop rename to src/frontend/tests/onlyFront/dragAndDrop.spec.ts index b06ae2ee1..ba14263bc 100644 --- a/src/frontend/tests/onlyFront/dragAndDrop +++ b/src/frontend/tests/onlyFront/dragAndDrop.spec.ts @@ -1,8 +1,6 @@ import { expect, test } from "@playwright/test"; test.describe("Auto_login tests", () => { - - test("auto_login sign in", async ({ page }) => { await page.routeFromHAR("harFiles/langflow.har", { url: "**/api/v1/**",