restrucutred svelte examples
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export const FRAMEWORK = process.env.FRAMEWORK;
|
||||
@@ -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 }) => {});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user