added snapshots for macOS
test fixes updated methods for macOS
|
@ -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'",
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
10
pages/workspace/prototype-panel-page.js
vendored
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
);
|
||||
|
|
After Width: | Height: | Size: 652 B |
After Width: | Height: | Size: 383 B |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 750 B |
After Width: | Height: | Size: 504 B |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 737 B |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 648 B |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 643 B |
After Width: | Height: | Size: 648 B |
After Width: | Height: | Size: 326 B |
After Width: | Height: | Size: 759 B |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 742 B |
After Width: | Height: | Size: 759 B |
After Width: | Height: | Size: 420 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 885 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 537 B |
|
@ -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');
|
||||
|
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 39 KiB |