restrucutred svelte examples

This commit is contained in:
Peter
2023-10-25 13:23:14 +02:00
parent 81ae72f497
commit 117b4a4cb6
6 changed files with 1399 additions and 441 deletions
@@ -1,16 +1,16 @@
import { test, expect } from '@playwright/test';
const framework = process.env.FRAMEWORK;
import { FRAMEWORK } from './constants';
test('Delete Node with backspace', async ({ page }) => {
await page.goto('/');
await page.locator(`.${framework}-flow__node`).nth(0).click();
await page.locator(`.${FRAMEWORK}-flow__node`).nth(0).click();
// await page.getByTestId('rf__node-1').click();
await page.keyboard.press('Backspace');
const nodes = await page.locator(`.${framework}-flow__node`).all();
const nodes = await page.locator(`.${FRAMEWORK}-flow__node`).all();
expect(nodes).toHaveLength(3);
const edges = await page.locator(`.${framework}-flow__edge`).all();
const edges = await page.locator(`.${FRAMEWORK}-flow__edge`).all();
expect(edges).toHaveLength(0);
});
+1
View File
@@ -0,0 +1 @@
export const FRAMEWORK = process.env.FRAMEWORK;
+14
View File
@@ -0,0 +1,14 @@
import { test, expect } from '@playwright/test';
import { FRAMEWORK } from './constants';
test.describe('NODES', () => {
test.beforeEach(async ({ page }) => {
// Go to the starting url before each test.
await page.goto('/tests/nodes');
});
test.describe('selection', () => {
test('selecting a node', async ({ page }) => {});
});
});