tests(Playwright): Introduction of Page Object Models (POMs) to Playwright tests (#5557)

This commit is contained in:
Vinícius Alves de Faria Resende authored and GitHub committed 2025-11-20 09:29:14 -05:00
1 parent 1c991037ee
commit bdad2264ed
59 files changed
+1040 -756

No files matched your search

@@ -1,5 +1,4 @@
import { test } from 'playwright-test-coverage';
import { visitStudy, checkForScreenshot, screenShotPaths } from './utils';
import { checkForScreenshot, screenShotPaths, test, visitStudy } from './utils';
import { assertNumberOfModalityLoadBadges } from './utils/assertions';
test.beforeEach(async ({ page }) => {
@@ -10,9 +9,11 @@ test.beforeEach(async ({ page }) => {
test('should launch MPR with unhydrated SEG chosen from the data overlay menu', async ({
page,
mainToolbarPageObject,
viewportPageObject,
}) => {
await page.getByTestId('side-panel-header-right').click();
await page.getByTestId('dataOverlayMenu-default-btn').click();
await viewportPageObject.getById('default').overlayMenu.dataOverlay.click();
await page.getByTestId('AddSegmentationDataOverlay-default').click();
await page.getByText('SELECT A SEGMENTATION').click();
await page.getByTestId('Segmentation').click();
@@ -21,7 +22,7 @@ test('should launch MPR with unhydrated SEG chosen from the data overlay menu',
assertNumberOfModalityLoadBadges({ page, expectedCount: 0 });
// Hide the overlay menu.
await page.getByTestId('dataOverlayMenu-default-btn').click();
await viewportPageObject.getById('default').overlayMenu.dataOverlay.click();
await page.waitForTimeout(5000);
@@ -31,8 +32,7 @@ test('should launch MPR with unhydrated SEG chosen from the data overlay menu',
screenShotPaths.segDataOverlayNoHydrationThenMPR.segDataOverlayNoHydrationPreMPR
);
await page.getByTestId('Layout').click();
await page.getByTestId('MPR').click();
await mainToolbarPageObject.layoutSelection.MPR.click();
await page.waitForTimeout(5000);