fixed tests

This commit is contained in:
peterkogo
2024-06-20 13:03:09 +02:00
parent 8346b79a9d
commit 7c8c40a0d5
3 changed files with 634 additions and 383 deletions
+4 -3
View File
@@ -32,14 +32,14 @@ test.describe('Node Toolbar', async () => {
}); });
test('all toolbars are positioned correctly', async ({ page }) => { test('all toolbars are positioned correctly', async ({ page }) => {
permutations.forEach(async (permutation) => { const tests = permutations.map((permutation) => async () => {
const toolbar = page const toolbar = page
.locator(`[data-id="${permutation.id}"]`) .locator(`[data-id="${permutation.id}"]`)
.and(page.locator(`.${FRAMEWORK}-flow__node-toolbar`)); .and(page.locator(`.${FRAMEWORK}-flow__node-toolbar`));
const node = page.locator(`[data-id="${permutation.id}"]`).and(page.locator(`.${FRAMEWORK}-flow__node`)); const node = page.locator(`[data-id="${permutation.id}"]`).and(page.locator(`.${FRAMEWORK}-flow__node`));
await expect(toolbar).toBeAttached(); await expect(toolbar).toBeAttached({ timeout: 5000 });
await expect(node).toBeAttached(); await expect(node).toBeAttached({ timeout: 5000 });
const toolbarBox = await toolbar.boundingBox(); const toolbarBox = await toolbar.boundingBox();
const nodeBox = await node.boundingBox(); const nodeBox = await node.boundingBox();
@@ -78,6 +78,7 @@ test.describe('Node Toolbar', async () => {
break; break;
} }
}); });
await Promise.all(tests.map((t) => t()));
}); });
test('toolbar default behaviour', async ({ page }) => { test('toolbar default behaviour', async ({ page }) => {
+622 -372
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -13,15 +13,15 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.42.1", "@playwright/test": "^1.44.1",
"@types/node": "^18.7.16" "@types/node": "^20.14.6"
}, },
"dependencies": { "dependencies": {
"@playwright/experimental-ct-react": "^1.42.1", "@playwright/experimental-ct-react": "^1.44.1",
"@types/react": "^18.2.31", "@types/react": "^18.3.3",
"@types/react-dom": "^18.2.14", "@types/react-dom": "^18.3.0",
"react": "^18.2.0", "react": "^18.3.1",
"react-dom": "^18.2.0", "react-dom": "^18.3.1",
"typescript": "^5.2.2" "typescript": "^5.4.5"
} }
} }