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

View File

@@ -32,14 +32,14 @@ test.describe('Node Toolbar', async () => {
});
test('all toolbars are positioned correctly', async ({ page }) => {
permutations.forEach(async (permutation) => {
const tests = permutations.map((permutation) => async () => {
const toolbar = page
.locator(`[data-id="${permutation.id}"]`)
.and(page.locator(`.${FRAMEWORK}-flow__node-toolbar`));
const node = page.locator(`[data-id="${permutation.id}"]`).and(page.locator(`.${FRAMEWORK}-flow__node`));
await expect(toolbar).toBeAttached();
await expect(node).toBeAttached();
await expect(toolbar).toBeAttached({ timeout: 5000 });
await expect(node).toBeAttached({ timeout: 5000 });
const toolbarBox = await toolbar.boundingBox();
const nodeBox = await node.boundingBox();
@@ -78,6 +78,7 @@ test.describe('Node Toolbar', async () => {
break;
}
});
await Promise.all(tests.map((t) => t()));
});
test('toolbar default behaviour', async ({ page }) => {