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

+8 -8
View File
@@ -1,13 +1,11 @@
import { test } from 'playwright-test-coverage';
import { visitStudy, checkForScreenshot, screenShotPaths } from './utils';
import { checkForScreenshot, screenShotPaths, test, visitStudy } from './utils';
test('should display the dicom tag browser', async ({ page }) => {
test('should display the dicom tag browser', async ({ page, mainToolbarPageObject }) => {
const studyInstanceUID = '1.3.6.1.4.1.25403.345050719074.3824.20170125095438.5';
const mode = 'viewer';
await visitStudy(page, studyInstanceUID, mode, 2000);
await page.getByTestId('MoreTools-split-button-secondary').click();
await page.getByTestId('TagBrowser').click();
await mainToolbarPageObject.moreTools.tagBrowser.click();
await checkForScreenshot(
page,
page,
@@ -15,13 +13,15 @@ test('should display the dicom tag browser', async ({ page }) => {
);
});
test('should render the scroll bar with the correct look-and-feel', async ({ page }) => {
test('should render the scroll bar with the correct look-and-feel', async ({
page,
mainToolbarPageObject,
}) => {
const studyInstanceUID = '1.3.6.1.4.1.25403.345050719074.3824.20170125095438.5';
const mode = 'viewer';
await visitStudy(page, studyInstanceUID, mode, 2000);
await page.getByTestId('MoreTools-split-button-secondary').click();
await page.getByTestId('TagBrowser').click();
await mainToolbarPageObject.moreTools.tagBrowser.click();
await checkForScreenshot({
page,
normalizedClip: { x: 0.77, y: 0.25, width: 0.03, height: 0.75 },