From 57e6e389c9c05f34fcffbe3aa621502b1e373533 Mon Sep 17 00:00:00 2001
From: Peter
Date: Tue, 7 Nov 2023 13:04:13 +0100
Subject: [PATCH] implemented generic tests for config based test flow creation
---
tests/playwright/e2e/edges.spec.ts | 2 +-
tests/playwright/e2e/nodes.spec.ts | 2 +-
tests/playwright/e2e/pane.spec.ts | 5 ++---
tests/playwright/playwright.svelte.config.ts | 4 ++--
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/tests/playwright/e2e/edges.spec.ts b/tests/playwright/e2e/edges.spec.ts
index 033bc107..1318ee4b 100644
--- a/tests/playwright/e2e/edges.spec.ts
+++ b/tests/playwright/e2e/edges.spec.ts
@@ -5,7 +5,7 @@ import { FRAMEWORK } from './constants';
test.describe('EDGES', () => {
test.beforeEach(async ({ page }) => {
// Go to the starting url before each test.
- await page.goto('/tests/edges');
+ await page.goto('/tests/generic/edges/general');
// Timeout get's ignored and tests timeout after 200ms ???
// page.waitForSelector('[data-id="edge-with-class"]', { timeout: 5000 });
diff --git a/tests/playwright/e2e/nodes.spec.ts b/tests/playwright/e2e/nodes.spec.ts
index 697cefa6..f0e97b0c 100644
--- a/tests/playwright/e2e/nodes.spec.ts
+++ b/tests/playwright/e2e/nodes.spec.ts
@@ -5,7 +5,7 @@ import { FRAMEWORK } from './constants';
test.describe('NODES', () => {
test.beforeEach(async ({ page }) => {
// Go to the starting url before each test.
- await page.goto('/tests/nodes');
+ await page.goto('/tests/generic/nodes/general');
});
test.describe('selection', () => {
diff --git a/tests/playwright/e2e/pane.spec.ts b/tests/playwright/e2e/pane.spec.ts
index fab03bdb..9c3d83a0 100644
--- a/tests/playwright/e2e/pane.spec.ts
+++ b/tests/playwright/e2e/pane.spec.ts
@@ -1,7 +1,6 @@
import { test, expect } from '@playwright/test';
import { FRAMEWORK } from './constants';
-import { transform } from 'typescript';
const MATCH_ALL_NUMBERS = /[\d\.]+/g;
@@ -23,7 +22,7 @@ async function getTransform(element) {
test.describe('PANE DEFAULT', () => {
test.beforeEach(async ({ page }) => {
// Go to the starting url before each test.
- await page.goto('/tests/pane/default');
+ await page.goto('/tests/generic/pane/general');
// Wait till the edges are rendered
await page.waitForSelector('#first-edge', { timeout: 5000 });
@@ -146,7 +145,7 @@ test.describe('PANE DEFAULT', () => {
test.describe('PANE NON-DEFAULT', () => {
test.beforeEach(async ({ page }) => {
// Go to the starting url before each test.
- await page.goto('/tests/pane/non-default');
+ await page.goto('/tests/generic/pane/non-defaults');
// Wait till the edges are rendered
await page.waitForSelector('#first-edge', { timeout: 5000 });
diff --git a/tests/playwright/playwright.svelte.config.ts b/tests/playwright/playwright.svelte.config.ts
index f92bd3dc..b08b566c 100644
--- a/tests/playwright/playwright.svelte.config.ts
+++ b/tests/playwright/playwright.svelte.config.ts
@@ -1,4 +1,4 @@
-import { defineConfig, devices } from '@playwright/test';
+import { defineConfig } from '@playwright/test';
import { sharedConfigWithPort } from './playwright.shared.config';
const port = 5173;
@@ -6,7 +6,7 @@ const port = 5173;
export default defineConfig({
...sharedConfigWithPort(port),
webServer: {
- command: 'cd ../../examples/svelte && pnpm run dev',
+ command: 'cd ../../examples/svelte && pnpm run dev --port 5173',
port: port,
reuseExistingServer: !process.env.CI,
},