tests(Playwright): Introduction of Page Object Models (POMs) to Playwright tests (#5557)
This commit is contained in:
1 parent
1c991037ee
commit
bdad2264ed
59 files changed
+1040
-756
No files matched your search
+7
-12
@@ -1,10 +1,10 @@
|
||||
import { test } from 'playwright-test-coverage';
|
||||
import {
|
||||
visitStudy,
|
||||
checkForScreenshot,
|
||||
screenShotPaths,
|
||||
reduce3DViewportSize,
|
||||
attemptAction,
|
||||
checkForScreenshot,
|
||||
reduce3DViewportSize,
|
||||
screenShotPaths,
|
||||
test,
|
||||
visitStudy,
|
||||
} from './utils';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
@@ -14,13 +14,8 @@ test.beforeEach(async ({ page }) => {
|
||||
});
|
||||
|
||||
test.describe('3D main Test', async () => {
|
||||
test('should render 3D main correctly.', async ({ page }) => {
|
||||
await page.getByTestId('Layout').click();
|
||||
await page
|
||||
.locator('div')
|
||||
.filter({ hasText: /^3D main$/ })
|
||||
.first()
|
||||
.click();
|
||||
test('should render 3D main correctly.', async ({ page, mainToolbarPageObject }) => {
|
||||
await mainToolbarPageObject.layoutSelection.threeDMain.click();
|
||||
await attemptAction(() => reduce3DViewportSize(page), 10, 100);
|
||||
await page.waitForTimeout(5000);
|
||||
await checkForScreenshot(page, page, screenShotPaths.threeDMain.threeDMainDisplayedCorrectly);
|
||||
|
||||
Reference in new issue
Block a user