Skip to content

Commit 4e82df9

Browse files
committed
fix(ms2/e2e): modeler tests wait for hydration
1 parent 4f2e8f4 commit 4e82df9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/ms2/processes/documentation-page/documentation-page.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,9 @@ test('allow a different user that was given the share link to import the shared
897897
await newPage.goto(`${clipboardData}`);
898898
await newPage.waitForURL(`${clipboardData}`);
899899

900+
await expect(documentationPage.getByText('Loading process data')).toBeVisible();
901+
await expect(documentationPage.getByText('Loading process data')).toBeHidden();
902+
900903
// check that the add to workspace button is visible since the user does not own the process
901904
await expect(newPage.getByRole('button', { name: 'Edit' })).toBeVisible();
902905

tests/ms2/processes/process-modeler/process-modeler.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Browser, Page, chromium, firefox } from '@playwright/test';
22
import { test, expect } from '../processes.fixtures';
3-
import { openModal, closeModal } from '../../testUtils';
3+
import { openModal, closeModal, waitForHydration } from '../../testUtils';
44

55
test('process modeler', async ({ processModelerPage, processListPage }) => {
66
test.slow();
@@ -322,6 +322,9 @@ test('share-modal', async ({ processListPage, ms2Page }) => {
322322
await newPage.goto(`${clipboardData}`);
323323
await newPage.waitForURL(`${clipboardData}`);
324324

325+
// Wait for hydration
326+
await newPage.getByText('Loading process data').waitFor({ state: 'hidden' });
327+
325328
// Add the shared process to the workspace
326329
await openModal(newPage, async () => {
327330
await newPage.getByRole('button', { name: 'edit' }).click();

0 commit comments

Comments
 (0)