add configuration to run all tests
This commit is contained in:
parent
ea8b5faad2
commit
92aa159f39
16 changed files with 69 additions and 15 deletions
|
|
@ -12,7 +12,7 @@ import { defineConfig, devices } from "@playwright/test";
|
|||
export default defineConfig({
|
||||
testDir: "./tests",
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: true,
|
||||
fullyParallel: false,
|
||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||
forbidOnly: !!process.env.CI,
|
||||
/* Retry on CI only */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(1000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test.describe("Auto_login tests", () => {
|
||||
test("auto_login sign in", async ({ page }) => {
|
||||
await page.goto("http:localhost:3000/");
|
||||
|
|
@ -9,11 +12,18 @@ test.describe("Auto_login tests", () => {
|
|||
test("auto_login block_admin", async ({ page }) => {
|
||||
await page.goto("http:localhost:3000/");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("http:localhost:3000/login");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("http:localhost:3000/admin");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("http:localhost:3000/admin/login");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.waitForTimeout(5000);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(2000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("CodeAreaModalComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(3000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test.describe("drag and drop test", () => {
|
||||
/// <reference lib="dom"/>
|
||||
test("drop collection", async ({ page }) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(4000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("dropDownComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(5000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("FloatComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
import { Page, test } from "@playwright/test";
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(6000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
|
||||
test.describe("Flow Page tests", () => {
|
||||
async function goToFlowPage(page: Page) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(7000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test.describe("group node test", () => {
|
||||
/// <reference lib="dom"/>
|
||||
test("group and ungroup updating values", async ({ page }) => {
|
||||
|
|
@ -27,7 +30,7 @@ test.describe("group node test", () => {
|
|||
return dt;
|
||||
}, jsonContent);
|
||||
|
||||
page.waitForTimeout(2000);
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// Now dispatch
|
||||
await page.dispatchEvent(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(8000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("InputComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(9000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("IntComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(10000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("KeypairListComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import uaParser from "ua-parser-js";
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(11000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("LangflowShortcuts", async ({ page }) => {
|
||||
const getUA = await page.evaluate(() => navigator.userAgent);
|
||||
const userAgentInfo = uaParser(getUA);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(12000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("NestedComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(13000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("PromptTemplateComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
import { Page, expect, test } from "@playwright/test";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(14000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test.describe("save component tests", () => {
|
||||
async function saveComponent(page: Page, pattern: RegExp, n: number) {
|
||||
for (let i = 0; i < n; i++) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.waitForTimeout(15000);
|
||||
test.setTimeout(120000);
|
||||
});
|
||||
test("ToggleComponent", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue