diff --git a/packages/inscription-view/src/components/parts/output/OutputPart.test.tsx b/packages/inscription-view/src/components/parts/output/OutputPart.test.tsx index 23b418d08..08fd557e1 100644 --- a/packages/inscription-view/src/components/parts/output/OutputPart.test.tsx +++ b/packages/inscription-view/src/components/parts/output/OutputPart.test.tsx @@ -1,5 +1,5 @@ import type { DeepPartial } from 'test-utils'; -import { render, screen, TableUtil, renderHook, waitFor, CollapsableUtil } from 'test-utils'; +import { render, screen, TableUtil, renderHook, CollapsableUtil } from 'test-utils'; import { useOutputPart } from './OutputPart'; import type { PartStateFlag } from '../../editors/part/usePart'; import type { ElementData, OutputData } from '@axonivy/process-editor-inscription-protocol'; diff --git a/playwright/tests/page-objects/inscription/responsible-component.ts b/playwright/tests/page-objects/inscription/responsible-component.ts index 0a9f5b860..ff83a027d 100644 --- a/playwright/tests/page-objects/inscription/responsible-component.ts +++ b/playwright/tests/page-objects/inscription/responsible-component.ts @@ -16,29 +16,29 @@ export class ResponsibleComponent { this.select = new Select(part.page, locator, { nth: 1 }); } - async fill(type: ValuesAsUnion, responsible?: string) { + async fill(type: ValuesAsUnion, responsible = '') { await this.typeSelect.choose(type); switch (type) { case 'Role from Attr.': case 'User from Attr.': - await this.script.fill(responsible!); + await this.script.fill(responsible); break; case 'Role': - await this.select.choose(responsible!); + await this.select.choose(responsible); break; case 'Nobody & delete': } } - async expectFill(type: ValuesAsUnion, responsible?: string) { + async expectFill(type: ValuesAsUnion, responsible = '') { await this.typeSelect.expectValue(type); switch (type) { case 'Role from Attr.': case 'User from Attr.': - await this.script.expectValue(responsible!); + await this.script.expectValue(responsible); break; case 'Role': - await this.select.expectValue(responsible!); + await this.select.expectValue(responsible); break; case 'Nobody & delete': } diff --git a/playwright/tests/screenshots/editor/editor.spec.ts b/playwright/tests/screenshots/editor/editor.spec.ts index dbaf4a800..006ea147f 100644 --- a/playwright/tests/screenshots/editor/editor.spec.ts +++ b/playwright/tests/screenshots/editor/editor.spec.ts @@ -56,8 +56,10 @@ test('connector-user', async ({ page }) => { const editor = await ProcessEditor.openProcess(page, { file: '/processes/market/UserEnroll.p.json', waitFor: '.sprotty-graph' }); const subCall = editor.element('subProcessCall'); const inscription = await subCall.inscribe(); - await expect(subCall.locator().getByRole('img').first()).toHaveAttribute('src', /.+user.png/); - await page.waitForTimeout(1000); // wait for user.png being rendered + const img = subCall.locator().getByRole('img').first(); + await expect(img).toHaveJSProperty('complete', true); + await expect(img).not.toHaveJSProperty('naturalWidth', 0); + // await page.waitForTimeout(1000); // wait for user.png being rendered const process = inscription.accordion('Process'); await process.toggle(); await screenshot(page, 'connector-user.png', { height: 400 }); diff --git a/playwright/tests/viewer/read-only.spec.ts b/playwright/tests/viewer/read-only.spec.ts index 68466ea48..38fa27859 100644 --- a/playwright/tests/viewer/read-only.spec.ts +++ b/playwright/tests/viewer/read-only.spec.ts @@ -6,6 +6,7 @@ test('node removal disabled', async ({ page }) => { const start = processEditor.startElement; await start.select(); await page.keyboard.press('Delete'); + // eslint-disable-next-line playwright/no-wait-for-timeout await page.waitForTimeout(500); await start.isSelected(); });