Skip to content

Commit 198b772

Browse files
committed
hard wait after edge creation
fixes issue where edges were not successfully added and not visible on narrative
1 parent a80ab4a commit 198b772

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

e2e/01_protocols.spec.ts

+16-11
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ test.describe('Complete E2E Test Protocol interview', () => {
233233
await expect(
234234
page.locator('line[stroke="var(--nc-edge-color-seq-6)"]'),
235235
).toBeVisible();
236+
237+
// hard wait so that the redux store is updated before proceeding
238+
await page.waitForTimeout(2000);
239+
await page.getByTestId('navigation-button').nth(1).click();
240+
236241
console.log('☑️ Sociogram');
237242
});
238243

@@ -348,17 +353,17 @@ test.describe('Complete E2E Test Protocol interview', () => {
348353

349354
expect(await page.locator('.node--selected').count()).toBe(0);
350355
await expect(page.getByTestId('edge-label-0')).toBeVisible();
351-
// await expect(
352-
// page.locator('line[stroke="var(--nc-edge-color-seq-1)"]'),
353-
// ).toBeVisible();
354-
// await expect(
355-
// page.locator('line[stroke="var(--nc-edge-color-seq-6)"]'),
356-
// ).toBeVisible();
357-
// await page.getByTestId('accordion').nth(1).click();
358-
// // the lines should not be visible
359-
// await expect(
360-
// page.locator('line[stroke="var(--nc-edge-color-seq-1)"]'),
361-
// ).not.toBeVisible();
356+
await expect(
357+
page.locator('line[stroke="var(--nc-edge-color-seq-1)"]'),
358+
).toBeVisible();
359+
await expect(
360+
page.locator('line[stroke="var(--nc-edge-color-seq-6)"]'),
361+
).toBeVisible();
362+
await page.getByTestId('accordion').nth(1).click();
363+
// the lines should not be visible
364+
await expect(
365+
page.locator('line[stroke="var(--nc-edge-color-seq-1)"]'),
366+
).not.toBeVisible();
362367
await expect(page.getByTestId('group-label-0')).toBeVisible();
363368
await expect(
364369
page.locator('.convex-hull.convex-hull__cat-color-seq-1'),

0 commit comments

Comments
 (0)