tests(Playwright): Full implementation of Page Object Models (POMs) to Playwright tests (#5608)

This commit is contained in:
Vinícius Alves de Faria Resende authored and GitHub committed 2025-12-12 11:46:45 -05:00
1 parent 7b12dcf048
commit d917e74e68
58 files changed
+1167 -496

No files matched your search

+11 -11
View File
@@ -8,10 +8,12 @@ test.beforeEach(async ({ page }) => {
test('should display the arrow tool and allow free-form text to be entered', async ({
page,
DOMOverlayPageObject,
mainToolbarPageObject,
rightPanelPageObject,
viewportPageObject,
}) => {
await page.getByTestId('trackedMeasurements-btn').click();
await rightPanelPageObject.measurementsPanel.select();
await mainToolbarPageObject.measurementTools.arrowAnnotate.click();
@@ -20,10 +22,11 @@ test('should display the arrow tool and allow free-form text to be entered', asy
{ x: 344, y: 232 },
]);
await page.getByTestId('dialog-input').fill('Ringo Starr was the drummer for The Beatles');
await page.getByTestId('input-dialog-save-button').click();
await DOMOverlayPageObject.dialog.input.fillAndSave(
'Ringo Starr was the drummer for The Beatles'
);
await page.getByTestId('prompt-begin-tracking-yes-btn').click();
await DOMOverlayPageObject.viewport.measurementTracking.confirm.click();
await page.waitForTimeout(2000);
@@ -37,8 +40,7 @@ test('should display the arrow tool and allow free-form text to be entered', asy
await viewportPageObject.active.doubleClickAt({ x: 164, y: 234 });
await page.getByTestId('dialog-input').fill('Neil Peart was the drummer for Rush');
await page.getByTestId('input-dialog-save-button').click();
await DOMOverlayPageObject.dialog.input.fillAndSave('Neil Peart was the drummer for Rush');
await page.waitForTimeout(2000);
@@ -50,11 +52,9 @@ test('should display the arrow tool and allow free-form text to be entered', asy
// Now edit the label and the text should not change.
await page.getByTestId('actionsMenuTrigger').click();
await page.getByTestId('Rename').click();
await page.getByTestId('dialog-input').fill('Drummer annotation arrow');
await page.getByTestId('input-dialog-save-button').click();
await rightPanelPageObject.measurementsPanel.panel
.nthMeasurement(0)
.actions.rename('Drummer annotation arrow');
await page.waitForTimeout(2000);