added snapshots for macOS

test fixes
updated methods for macOS
This commit is contained in:
stanislavchalapko 2024-01-03 16:03:46 +02:00
parent 433d3bd516
commit 653cd2291d
1126 changed files with 42 additions and 34 deletions

View File

@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"test": "npx playwright test --project=chrome -gv 'PERF'",
"updateSnapshots": "npx playwright test --update-snapshots",
"firefox": "npx playwright test --project=firefox -gv 'PERF'",
"webkit": "npx playwright test --project=webkit -gv 'PERF'",
"performance": "npx playwright test --retries=1 --timeout=555550000 --project=chrome -g 'PERF'",

View File

@ -17,7 +17,7 @@ exports.CommentsPanelPage = class CommentsPanelPage extends BasePage {
'div[class*="comments__content"] span[class*="comments__text"]',
);
this.commentCommentsPanelText = page.locator(
'div[class*="comments__threads"] div[class*="comments__content"]',
'div[class*="sidebar"] div[class*="comments__threads"] div[class*="comments__content"]',
);
this.commentReplyText = page.locator(
'div[class*="thread-content"] span[class*="comments__text"] >> nth=1',
@ -27,10 +27,10 @@ exports.CommentsPanelPage = class CommentsPanelPage extends BasePage {
);
this.postCommentButton = page.locator('input[value="Post"]');
this.commentThreadIcon = page.locator(
'div[class="comments-section"] div[class*="thread-bubble"]',
'div[class*="comments-container"] div[class*="thread-bubble"]',
);
this.commentResolvedThreadIcon = page.locator(
'div.comments-section div.main_ui_comments__resolved',
'div[class*="comments-container"] div.main_ui_comments__resolved',
);
this.commentReplyInput = page.locator('textarea[placeholder="Reply"]');
this.commentOptionsButton = page.locator(

View File

@ -129,13 +129,13 @@ exports.MainPage = class MainPage extends BasePage {
this.addPageButton = page.locator('button[class*="add-page"]');
this.pagesBlock = page.locator('div.main_ui_workspace_sidebar_sitemap__sitemap');
this.firstPageListItem = page.locator(
'ul[class*="pages-list"] div[class*="element-list-body"] >>nth=0',
'ul[class*="page-list"] div[class*="element-list-body"] >>nth=0',
);
this.secondPageListItem = page.locator(
'ul[class*="pages-list"] div[class*="element-list-body"] >>nth=1',
'ul[class*="page-list"] div[class*="element-list-body"] >>nth=1',
);
this.pageNameInput = page.locator(
'ul[class*="pages-list"] div[class*="element-list-body"] input',
'ul[class*="page-list"] div[class*="element-list-body"] input',
);
this.renamePageMenuItem = page.locator(
'ul[class*="workspace-context-menu"] li span:has-text("Rename")',
@ -239,23 +239,24 @@ exports.MainPage = class MainPage extends BasePage {
}
async clickViewportTwice() {
await this.page.waitForTimeout(100)
await this.viewport.hover();
await this.viewport.click({ delay: 300, force: true });
await this.viewport.click({ delay: 300, force: true });
await this.viewport.click({ delay: 100, force: true });
await this.page.waitForTimeout(100)
await this.viewport.click({ delay: 100, force: true });
}
async clickViewportByCoordinates(x, y) {
async clickViewportByCoordinates(x, y, count = 1) {
await this.page.waitForTimeout(100)
await this.viewport.hover();
await this.viewport.click({
position: { x: x, y: y },
delay: 300,
force: true,
});
await this.viewport.click({
position: { x: x, y: y },
delay: 300,
force: true,
});
for (let i = 0; i < count; i++) {
await this.page.waitForTimeout(100)
await this.viewport.click({
position: {x: x, y: y},
force: true,
delay: 200,
});
}
}
async isUnSavedChangesDisplayed() {
@ -290,6 +291,7 @@ exports.MainPage = class MainPage extends BasePage {
}
async drawCurve(x1, y1, x2, y2) {
await this.page.waitForTimeout(100)
await this.viewport.hover();
await this.page.mouse.move(x1, y1);
await this.page.mouse.down();
@ -725,21 +727,24 @@ exports.MainPage = class MainPage extends BasePage {
await this.waitForBottomPaletteIsOpened();
}
async createDefaultBoardByCoordinates(x, y) {
async createDefaultBoardByCoordinates(x, y, double = false) {
await this.clickCreateBoardButton();
await this.clickViewportByCoordinates(x, y);
double === true ? await this.clickViewportByCoordinates(x, y) :
await this.waitForChangeIsSaved();
}
async createDefaultRectangleByCoordinates(x, y) {
async createDefaultRectangleByCoordinates(x, y, double = false) {
await this.clickCreateRectangleButton();
await this.clickViewportByCoordinates(x, y);
double === true ? await this.clickViewportByCoordinates(x, y) :
await this.waitForChangeIsSaved();
}
async createDefaultEllipseByCoordinates(x, y) {
async createDefaultEllipseByCoordinates(x, y, double = false) {
await this.clickCreateEllipseButton();
await this.clickViewportByCoordinates(x, y);
double === true ? await this.clickViewportByCoordinates(x, y) :
await this.waitForChangeIsSaved();
}

View File

@ -28,7 +28,7 @@ exports.PrototypePanelPage = class PrototypePanelPage extends BasePage {
this.interactionDestinationField = page.locator(
'//*[text()="Destination"]//parent::div//div[contains(@class, "custom-select")]',
);
this.removeFlowButton = page.locator('div[class*="remove-flow-btn"]');
this.removeFlowButton = page.locator('button[class*="remove-flow-btn"]');
}
async clickPrototypeTab() {
@ -36,7 +36,9 @@ exports.PrototypePanelPage = class PrototypePanelPage extends BasePage {
}
async dragAndDropPrototypeArrowConnector(x, y) {
await this.page.waitForTimeout(200)
await this.prototypeArrowConnector.hover();
await this.viewport.click()
await this.prototypeArrowConnector.dragTo(this.viewport, {
force: false,
targetPosition: { x: x, y: y },
@ -44,11 +46,11 @@ exports.PrototypePanelPage = class PrototypePanelPage extends BasePage {
}
async isFlowNameDisplayedOnPrototypePanel(name) {
await expect(this.prototypePanelFlowNameText).toHaveText(name);
await expect(this.prototypePanelFlowNameInput).toHaveValue(name);
}
async isFlowNameNotDisplayedOnPrototypePanel() {
await expect(this.prototypePanelFlowNameText).not.toBeVisible();
await expect(this.prototypePanelFlowNameInput).not.toBeVisible();
}
async clickAddInteractionButton() {
@ -72,7 +74,7 @@ exports.PrototypePanelPage = class PrototypePanelPage extends BasePage {
}
async renameFlow(newName) {
await this.prototypePanelFlowNameText.dblclick();
await this.prototypePanelFlowNameInput.dblclick();
await this.prototypePanelFlowNameInput.fill(newName);
await this.clickOnEnter();
}

View File

@ -148,7 +148,7 @@ test.describe(() => {
await designPanelPage.clickAddStrokeButton();
await assetsPanelPage.clickAndPressAltFileLibraryColorsColorBullet();
await mainPage.waitForChangeIsSaved();
await mainPage.clickViewportByCoordinates(900, 100);
await mainPage.clickViewportByCoordinates(900, 100, 3);
await expect(mainPage.createdLayer).toHaveScreenshot(
'apply-color-to-stroke-board.png',
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

View File

@ -225,7 +225,7 @@ test.describe(() => {
mainTest('Components - change view list tile', async ({ page }) => {
const mainPage = new MainPage(page);
const assetsPanelPage = new AssetsPanelPage(page);
await mainPage.createDefaultEllipseByCoordinates(100, 200);
await mainPage.createDefaultEllipseByCoordinates(100, 200, true);
await mainPage.createComponentViaRightClick();
await mainPage.waitForChangeIsSaved();
await mainPage.uploadImage('images/sample.jpeg');

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Some files were not shown because too many files have changed in this diff Show More