Added playwright e2e tests for svelte & react

This commit is contained in:
Peter
2023-10-24 16:19:29 +02:00
parent 747c136ced
commit 87c1e225b9
8 changed files with 663 additions and 0 deletions
@@ -0,0 +1,16 @@
import { test, expect } from '@playwright/test';
const framework = process.env.FRAMEWORK;
test('Delete Node with backspace', async ({ page }) => {
await page.goto('/');
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();
expect(nodes).toHaveLength(3);
const edges = await page.locator(`.${framework}-flow__edge`).all();
expect(edges).toHaveLength(0);
});