update snapshots, refactoring tests with possibility to run in parallel

This commit is contained in:
KateMaruk 2023-11-25 22:48:32 +02:00
parent e44929e676
commit c480bd8f14
49 changed files with 908 additions and 302 deletions

View File

@ -1,23 +1,17 @@
const base = require("@playwright/test"); const base = require("@playwright/test");
const { LoginPage } = require("./pages/login-page.js"); const { LoginPage } = require("./pages/login-page.js");
const { DashboardPage } = require("./pages/dashboard-page.js"); const { DashboardPage } = require("./pages/dashboard/dashboard-page.js");
const { MainPage } = require("./pages/main-page");
const mainTest = base.test.extend({ const mainTest = base.test.extend({
page: async ({ page }, use) => { page: async ({ page }, use) => {
const loginPage = new LoginPage(page); const loginPage = new LoginPage(page);
const dashboardPage = new DashboardPage(page);
await loginPage.goto(); await loginPage.goto();
await loginPage.enterEmail(process.env.LOGIN_EMAIL); await loginPage.enterEmail(process.env.LOGIN_EMAIL);
await loginPage.enterPwd(process.env.LOGIN_PWD); await loginPage.enterPwd(process.env.LOGIN_PWD);
await loginPage.clickLoginButton(); await loginPage.clickLoginButton();
const dashboardPage = new DashboardPage(page);
await dashboardPage.isDashboardOpenedAfterLogin(); await dashboardPage.isDashboardOpenedAfterLogin();
await dashboardPage.isHeaderDisplayed("Projects"); await dashboardPage.isHeaderDisplayed("Projects");
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
const mainPage = new MainPage(page);
await mainPage.isMainPageLoaded();
await use(page); await use(page);
}, },
}); });
@ -32,8 +26,6 @@ const dashboardTest = base.test.extend({
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
await dashboardPage.isDashboardOpenedAfterLogin(); await dashboardPage.isDashboardOpenedAfterLogin();
await dashboardPage.isHeaderDisplayed("Projects"); await dashboardPage.isHeaderDisplayed("Projects");
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await use(page); await use(page);
}, },
}); });

View File

@ -1,5 +1,5 @@
export const random = () => { export const random = () => {
return Math.random().toString(36).substring(2, 7); return Math.random().toString(36).substring(2, 9);
}; };
export function getPlatformName() { export function getPlatformName() {

46
package-lock.json generated
View File

@ -12,17 +12,17 @@
"prettier": "^3.0.1" "prettier": "^3.0.1"
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.39.0", "@playwright/test": "^1.40.0",
"dotenv": "^16.3.1" "dotenv": "^16.3.1"
} }
}, },
"node_modules/@playwright/test": { "node_modules/@playwright/test": {
"version": "1.39.0", "version": "1.40.0",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.39.0.tgz", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.0.tgz",
"integrity": "sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==", "integrity": "sha512-PdW+kn4eV99iP5gxWNSDQCbhMaDVej+RXL5xr6t04nbKLCBwYtA046t7ofoczHOm8u6c+45hpDKQVZqtqwkeQg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"playwright": "1.39.0" "playwright": "1.40.0"
}, },
"bin": { "bin": {
"playwright": "cli.js" "playwright": "cli.js"
@ -58,12 +58,12 @@
} }
}, },
"node_modules/playwright": { "node_modules/playwright": {
"version": "1.39.0", "version": "1.40.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.39.0.tgz", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.0.tgz",
"integrity": "sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw==", "integrity": "sha512-gyHAgQjiDf1m34Xpwzaqb76KgfzYrhK7iih+2IzcOCoZWr/8ZqmdBw+t0RU85ZmfJMgtgAiNtBQ/KS2325INXw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"playwright-core": "1.39.0" "playwright-core": "1.40.0"
}, },
"bin": { "bin": {
"playwright": "cli.js" "playwright": "cli.js"
@ -76,9 +76,9 @@
} }
}, },
"node_modules/playwright-core": { "node_modules/playwright-core": {
"version": "1.39.0", "version": "1.40.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.0.tgz",
"integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==", "integrity": "sha512-fvKewVJpGeca8t0ipM56jkVSU6Eo0RmFvQ/MaCQNDYm+sdvKkMBBWTE1FdeMqIdumRaXXjZChWHvIzCGM/tA/Q==",
"dev": true, "dev": true,
"bin": { "bin": {
"playwright-core": "cli.js" "playwright-core": "cli.js"
@ -104,12 +104,12 @@
}, },
"dependencies": { "dependencies": {
"@playwright/test": { "@playwright/test": {
"version": "1.39.0", "version": "1.40.0",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.39.0.tgz", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.0.tgz",
"integrity": "sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==", "integrity": "sha512-PdW+kn4eV99iP5gxWNSDQCbhMaDVej+RXL5xr6t04nbKLCBwYtA046t7ofoczHOm8u6c+45hpDKQVZqtqwkeQg==",
"dev": true, "dev": true,
"requires": { "requires": {
"playwright": "1.39.0" "playwright": "1.40.0"
} }
}, },
"dotenv": { "dotenv": {
@ -126,19 +126,19 @@
"optional": true "optional": true
}, },
"playwright": { "playwright": {
"version": "1.39.0", "version": "1.40.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.39.0.tgz", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.0.tgz",
"integrity": "sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw==", "integrity": "sha512-gyHAgQjiDf1m34Xpwzaqb76KgfzYrhK7iih+2IzcOCoZWr/8ZqmdBw+t0RU85ZmfJMgtgAiNtBQ/KS2325INXw==",
"dev": true, "dev": true,
"requires": { "requires": {
"fsevents": "2.3.2", "fsevents": "2.3.2",
"playwright-core": "1.39.0" "playwright-core": "1.40.0"
} }
}, },
"playwright-core": { "playwright-core": {
"version": "1.39.0", "version": "1.40.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.0.tgz",
"integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==", "integrity": "sha512-fvKewVJpGeca8t0ipM56jkVSU6Eo0RmFvQ/MaCQNDYm+sdvKkMBBWTE1FdeMqIdumRaXXjZChWHvIzCGM/tA/Q==",
"dev": true "dev": true
}, },
"prettier": { "prettier": {

View File

@ -23,7 +23,7 @@
}, },
"homepage": "https://github.com/penpot/penpotqa#readme", "homepage": "https://github.com/penpot/penpotqa#readme",
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.39.0", "@playwright/test": "^1.40.0",
"dotenv": "^16.3.1" "dotenv": "^16.3.1"
}, },
"dependencies": { "dependencies": {

View File

@ -1,5 +1,6 @@
const { expect } = require("@playwright/test"); const { expect } = require("@playwright/test");
const { getPlatformName } = require("../helpers/string-generator"); const { getPlatformName } = require("../helpers/string-generator");
exports.BasePage = class BasePage { exports.BasePage = class BasePage {
/** /**
* @param {import('@playwright/test').Page} page * @param {import('@playwright/test').Page} page

View File

@ -1,5 +1,5 @@
const { expect } = require("@playwright/test"); const { expect } = require("@playwright/test");
const { BasePage } = require("./base-page"); const { BasePage } = require("../base-page");
exports.DashboardPage = class DashboardPage extends BasePage { exports.DashboardPage = class DashboardPage extends BasePage {
/** /**
@ -92,8 +92,6 @@ exports.DashboardPage = class DashboardPage extends BasePage {
// Import files // Import files
this.fileImport = page.locator('[data-test="file-import"]'); this.fileImport = page.locator('[data-test="file-import"]');
this.modal = page.locator('#modal');
this.modalCloseButton = page.locator('.modal-close-button');
this.modalTitle = page.locator('.modal-header-title h2'); this.modalTitle = page.locator('.modal-header-title h2');
this.modalCancelButton = page.locator('.modal-footer .action-buttons .cancel-button'); this.modalCancelButton = page.locator('.modal-footer .action-buttons .cancel-button');
this.modalAcceptButton = page.locator('.modal-footer .action-buttons .accept-button'); this.modalAcceptButton = page.locator('.modal-footer .action-buttons .accept-button');
@ -132,7 +130,7 @@ exports.DashboardPage = class DashboardPage extends BasePage {
'div.dashboard-templates-section div.title button' 'div.dashboard-templates-section div.title button'
); );
this.librariesAndTemplatesSection = page.locator( this.librariesAndTemplatesSection = page.locator(
'div[class^="dashboard-templates-section"]' 'div[class="dashboard-templates-section "]'
); );
this.librariesAndTemplatesSectionCollapsed = page.locator( this.librariesAndTemplatesSectionCollapsed = page.locator(
'div[class="dashboard-templates-section collapsed"]' 'div[class="dashboard-templates-section collapsed"]'
@ -221,7 +219,7 @@ exports.DashboardPage = class DashboardPage extends BasePage {
async isDashboardOpenedAfterLogin() { async isDashboardOpenedAfterLogin() {
await this.page.waitForURL(/.*dashboard\/team/, { waitUntil: "load" }); await this.page.waitForURL(/.*dashboard\/team/, { waitUntil: "load" });
await this.page.waitForResponse(/push-audit-events/); // await this.page.waitForResponse(/push-audit-events/);
} }
async checkNumberOfFiles(numberOfFiles) { async checkNumberOfFiles(numberOfFiles) {
@ -475,19 +473,6 @@ exports.DashboardPage = class DashboardPage extends BasePage {
await this.deleteFontButton.click(); await this.deleteFontButton.click();
} }
async deleteFonts() {
for (const el of await this.fontOptionsMenuButton.elementHandles()) {
await el.click();
await this.deleteFontMenuItem.click();
await this.deleteFontButton.click();
}
}
async deleteFontsIfExist() {
const fontRecords = await this.page.$$('div[class="font-item table-row"]');
if (fontRecords) await this.deleteFonts();
}
async isFontsTablePlaceholderDisplayed(text) { async isFontsTablePlaceholderDisplayed(text) {
await expect(this.fontsTablePlaceholder).toHaveText(text); await expect(this.fontsTablePlaceholder).toHaveText(text);
} }
@ -515,23 +500,39 @@ exports.DashboardPage = class DashboardPage extends BasePage {
await expect(this.librariesAndTemplatesSection).toBeVisible(); await expect(this.librariesAndTemplatesSection).toBeVisible();
} }
async isLibrariesAndTemplatesSectionNotDisplayed() { async isLibrariesAndTemplatesSectionHidden() {
await expect(this.librariesAndTemplatesSectionCollapsed).toBeVisible(); await expect(this.librariesAndTemplatesSectionCollapsed).toBeVisible();
} }
async minimizeLibrariesAndTemplatesCarouselIfExpanded() { async isLibrariesAndTemplatesCarouselVisible() {
if (await this.librariesAndTemplatesSection.isVisible()) { try {
await this.clickLibrariesAndTemplatesCarouselButton(); await this.librariesAndTemplatesSection.waitFor({ state: 'visible', timeout: 3000 });
return true;
} catch(error) {
return false;
} }
} }
async flipRightLibrariesAndTemplatesCarousel() { async minimizeLibrariesAndTemplatesCarousel() {
await this.librariesAndTemplatesSectionRightArrowButton.click(); if (await this.isLibrariesAndTemplatesCarouselVisible) {
await this.header.hover(); await this.clickLibrariesAndTemplatesCarouselButton();
}
await this.isLibrariesAndTemplatesSectionHidden();
} }
async flipLeftLibrariesAndTemplatesCarousel() { async maximizeLibrariesAndTemplatesCarousel() {
await this.librariesAndTemplatesSectionLeftArrowButton.click(); if (!await this.isLibrariesAndTemplatesCarouselVisible()) {
await this.clickLibrariesAndTemplatesCarouselButton();
}
await this.isLibrariesAndTemplatesSectionDisplayed();
}
async flipLibrariesAndTemplatesCarousel(direction, times=1) {
if (direction === 'left') {
await this.librariesAndTemplatesSectionLeftArrowButton.click({ clickCount: times });
} else {
await this.librariesAndTemplatesSectionRightArrowButton.click({ clickCount: times });
}
await this.header.hover(); await this.header.hover();
} }

View File

@ -1,4 +1,4 @@
const { BasePage } = require("./base-page"); const { BasePage } = require("../base-page");
const { expect } = require("@playwright/test"); const { expect } = require("@playwright/test");
exports.TeamPage = class TeamPage extends BasePage { exports.TeamPage = class TeamPage extends BasePage {
@ -115,13 +115,13 @@ exports.TeamPage = class TeamPage extends BasePage {
} }
} }
async deleteTeamsIfExist() { async deleteTeams(teams) {
await this.openTeamsListIfClosed(); await this.openTeamsListIfClosed();
for (const teamName of await this.teamListItem.allInnerTexts()) { for (const team of teams) {
if (!teamName.includes("Your Penpot")) { const teamSel = this.page.locator(`li.team-name span:text-is("${team}")`);
const teamSel = this.page.locator(`li.team-name span.team-text:text-is("${teamName}")`).last(); if (await teamSel.isVisible()) {
await teamSel.click(); await teamSel.click();
await this.teamOptionsMenuButton.waitFor(); await this.isTeamSelected(team);
await this.teamOptionsMenuButton.click(); await this.teamOptionsMenuButton.click();
await this.deleteTeamMenuItem.click(); await this.deleteTeamMenuItem.click();
await this.deleteTeamButton.click(); await this.deleteTeamButton.click();

View File

@ -1,10 +1,10 @@
const { BasePage } = require("./base-page"); const { BasePage } = require("../base-page");
const { expect } = require("@playwright/test"); const { expect } = require("@playwright/test");
exports.ColorPalettePopUp = class ColorPalettePopUp extends BasePage { exports.ColorPalettePopUp = class ColorPalettePopUp extends BasePage {
/** /**
* @param {import('@playwright/test').Page} page * @param {import('@playwright/test').Page} page
*/ */
constructor(page) { constructor(page) {
super(page); super(page);
this.popUp = page.locator('.colorpicker-tooltip'); this.popUp = page.locator('.colorpicker-tooltip');

View File

@ -1,7 +1,7 @@
const { expect } = require("@playwright/test"); const { expect } = require("@playwright/test");
const { BasePage } = require("../base-page"); const { BasePage } = require("../base-page");
exports.DesignPanelPage = class DesignPanelPage extends BasePage {
exports.DesignPanelPage = class DesignPanelPage extends BasePage {
/** /**
* @param {import('@playwright/test').Page} page * @param {import('@playwright/test').Page} page
*/ */

View File

@ -1,8 +1,7 @@
const {expect} = require("@playwright/test"); const { expect } = require("@playwright/test");
const { BasePage } = require("../base-page"); const { BasePage } = require("../base-page");
exports.LayersPage = class LayersPage extends BasePage { exports.LayersPanelPage = class LayersPanelPage extends BasePage {
/** /**
* @param {import('@playwright/test').Page} page * @param {import('@playwright/test').Page} page
*/ */
@ -36,4 +35,4 @@ exports.LayersPage = class LayersPage extends BasePage {
await this.layerBoardChildEllipse.click(); await this.layerBoardChildEllipse.click();
} }
} }

View File

@ -1,5 +1,5 @@
const { expect } = require("@playwright/test"); const { expect } = require("@playwright/test");
const { BasePage } = require("./base-page"); const { BasePage } = require("../base-page");
exports.MainPage = class MainPage extends BasePage { exports.MainPage = class MainPage extends BasePage {
/** /**
@ -576,12 +576,8 @@ exports.MainPage = class MainPage extends BasePage {
this.removeSharedLibraryButton = page.locator('input[value="Remove"]'); this.removeSharedLibraryButton = page.locator('input[value="Remove"]');
this.publishSharedLibraryButton = page.locator('input[value="Publish"]'); this.publishSharedLibraryButton = page.locator('input[value="Publish"]');
this.unPublishSharedLibraryButton = page.locator('input[value="Unpublish"]'); this.unPublishSharedLibraryButton = page.locator('input[value="Unpublish"]');
this.closeLibrariesPopUpButton = page.locator( this.closeLibrariesPopUpButton = page.locator('div.libraries-dialog a.close');
'div[class="modal libraries-dialog"] svg[class="icon-close"]' this.addAsSharedLibraryButton = page.locator('input[value="Add as Shared Library"]');
);
this.addAsSharedLibraryButton = page.locator(
'input[value="Add as Shared Library"]'
);
this.removeAsSharedLibraryButton = page.locator('input[value="Unpublish"]'); this.removeAsSharedLibraryButton = page.locator('input[value="Unpublish"]');
this.sharedLibraryBadge = page.locator('span:has-text("SHARED")'); this.sharedLibraryBadge = page.locator('span:has-text("SHARED")');
this.searchLibraryInput = page.locator('div.libraries-search input.search-input'); this.searchLibraryInput = page.locator('div.libraries-search input.search-input');

View File

@ -27,7 +27,7 @@ const config = {
/* Retry on CI only */ /* Retry on CI only */
retries: process.env.CI ? 2 : 2, retries: process.env.CI ? 2 : 2,
/* Opt out of parallel tests on CI. */ /* Opt out of parallel tests on CI. */
workers: 1, workers: process.env.CI ? 2 : 2,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html", reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test} = require("@playwright/test");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("AS-22 Filter Colors from All Assets drop-down", async ({ page }) => { mainTest("AS-22 Filter Colors from All Assets drop-down", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test} = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest( mainTest(
"AS-56 Filter Components from All Assets drop-down", "AS-56 Filter Components from All Assets drop-down",

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest( mainTest(
"AS-1 Switch from Layers to Assets via clicking tab and ALT I ALT L shortcuts)", "AS-1 Switch from Layers to Assets via clicking tab and ALT I ALT L shortcuts)",

View File

@ -1,25 +1,48 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { expect, test } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { DashboardPage } = require("../../pages/dashboard-page"); const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
test.describe(() => { const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
await teamPage.deleteTeam(teamName);
});
test.describe('Tests with importing Penpot Libraries', () => {
test.beforeEach(async ({ page }) => { test.beforeEach(async ({ page }) => {
const mainPage = new MainPage(page);
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor(); await mainPage.backToDashboardFromFileEditor();
await dashboardPage.clickLibrariesAndTemplatesCarouselButton(); await dashboardPage.maximizeLibrariesAndTemplatesCarousel();
await dashboardPage.isLibrariesAndTemplatesSectionDisplayed(); await dashboardPage.flipLibrariesAndTemplatesCarousel('right');
await dashboardPage.flipRightLibrariesAndTemplatesCarousel();
await dashboardPage.importSharedLibrary("Whiteboarding Kit"); await dashboardPage.importSharedLibrary("Whiteboarding Kit");
await dashboardPage.minimizeLibrariesAndTemplatesCarouselIfExpanded(); await dashboardPage.minimizeLibrariesAndTemplatesCarousel();
await dashboardPage.reloadPage(); await dashboardPage.reloadPage();
await dashboardPage.openSecondFile("New File 1"); });
await mainPage.isMainPageLoaded();
test.afterEach(async ({ page }) => {
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
}); });
mainTest("AS-92 Import shared library from LIBRARIES pop-up",async ({ page }) => { mainTest("AS-92 Import shared library from LIBRARIES pop-up",async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);
const dashboardPage = new DashboardPage(page);
await dashboardPage.openSecondFile("New File 1");
await mainPage.isMainPageLoaded();
await mainPage.clickAssetsTab(); await mainPage.clickAssetsTab();
await mainPage.clickLibrariesTab(); await mainPage.clickLibrariesTab();
await mainPage.clickAddSharedLibraryButton(); await mainPage.clickAddSharedLibraryButton();
@ -30,6 +53,9 @@ test.describe(() => {
mainTest("AS-93 Remove shared library from LIBRARIES pop-up",async ({ page }) => { mainTest("AS-93 Remove shared library from LIBRARIES pop-up",async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);
const dashboardPage = new DashboardPage(page);
await dashboardPage.openSecondFile("New File 1");
await mainPage.isMainPageLoaded();
await mainPage.clickAssetsTab(); await mainPage.clickAssetsTab();
await mainPage.clickLibrariesTab(); await mainPage.clickLibrariesTab();
await mainPage.clickAddSharedLibraryButton(); await mainPage.clickAddSharedLibraryButton();
@ -48,12 +74,10 @@ test.describe(() => {
const library2 = "CircumIcons"; const library2 = "CircumIcons";
const mainPage = new MainPage(page); const mainPage = new MainPage(page);
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
await mainPage.backToDashboardFromFileEditor(); await dashboardPage.maximizeLibrariesAndTemplatesCarousel();
await dashboardPage.clickLibrariesAndTemplatesCarouselButton(); await dashboardPage.flipLibrariesAndTemplatesCarousel('right');
await dashboardPage.isLibrariesAndTemplatesSectionDisplayed();
await dashboardPage.flipRightLibrariesAndTemplatesCarousel();
await dashboardPage.importSharedLibrary("Circum Icons pack"); await dashboardPage.importSharedLibrary("Circum Icons pack");
await dashboardPage.minimizeLibrariesAndTemplatesCarouselIfExpanded(); await dashboardPage.minimizeLibrariesAndTemplatesCarousel();
await dashboardPage.reloadPage(); await dashboardPage.reloadPage();
await dashboardPage.openSecondFile("New File 1"); await dashboardPage.openSecondFile("New File 1");
await mainPage.isMainPageLoaded(); await mainPage.isMainPageLoaded();
@ -72,51 +96,47 @@ test.describe(() => {
await mainPage.searchForLibrary("uncreated library"); await mainPage.searchForLibrary("uncreated library");
await mainPage.isNoMatchedLibrariesFound("uncreated library"); await mainPage.isNoMatchedLibrariesFound("uncreated library");
await mainPage.clickCloseLibrariesPopUpButton();
}); });
}); });
mainTest("AS-95 Publish Shared library",async ({ page }) => { test.describe('Tests wt importing Penpot Libraries', () => {
const mainPage = new MainPage(page); test.beforeEach(async ({ page }) => {
const dashboardPage = new DashboardPage(page); const mainPage = new MainPage(page);
await mainPage.clickAssetsTab(); await mainPage.clickAssetsTab();
await mainPage.uploadImageToFileLibraryGraphics("images/images.png"); await mainPage.uploadImageToFileLibraryGraphics("images/images.png");
await mainPage.waitForChangeIsSaved(); await mainPage.waitForChangeIsSaved();
await mainPage.isImageUploadedToFileLibraryGraphics(); await mainPage.isImageUploadedToFileLibraryGraphics();
await mainPage.clickLibrariesTab(); await mainPage.clickLibrariesTab();
await mainPage.clickPublishSharedLibraryButton(); await mainPage.clickPublishSharedLibraryButton();
await mainPage.isUnpublishLibraryBtnPresent(); await mainPage.isUnpublishLibraryBtnPresent();
await mainPage.clickCloseLibrariesPopUpButton(); await mainPage.clickCloseLibrariesPopUpButton();
await mainPage.isSharedLibraryBadgeVisible(); await mainPage.isSharedLibraryBadgeVisible();
await mainPage.backToDashboardFromFileEditor(); await mainPage.backToDashboardFromFileEditor();
await dashboardPage.openSidebarItem("Libraries"); });
await dashboardPage.isFilePresent("New File 1");
mainTest("AS-95 Publish Shared library",async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.openSidebarItem("Libraries");
await dashboardPage.isFilePresent("New File 1");
});
mainTest("AS-96 Unpublish Shared library",async ({ page }) => {
const mainPage = new MainPage(page);
const dashboardPage = new DashboardPage(page);
await dashboardPage.openSidebarItem("Libraries");
await dashboardPage.isFilePresent("New File 1");
await dashboardPage.openFile();
await mainPage.clickAssetsTab();
await mainPage.clickLibrariesTab();
await mainPage.unPublishSharedLibrary();
await mainPage.isPublishLibraryBtnPresent();
await mainPage.clickCloseLibrariesPopUpButton();
await mainPage.isSharedLibraryBadgeNotVisible();
await mainPage.backToDashboardFromFileEditor();
await dashboardPage.openSidebarItem("Libraries");
await dashboardPage.checkNoLibrariesExist();
});
}); });
mainTest("AS-96 Unpublish Shared library",async ({ page }) => {
const mainPage = new MainPage(page);
const dashboardPage = new DashboardPage(page);
await mainPage.clickAssetsTab();
await mainPage.uploadImageToFileLibraryGraphics("images/images.png");
await mainPage.waitForChangeIsSaved();
await mainPage.isImageUploadedToFileLibraryGraphics();
await mainPage.clickLibrariesTab();
await mainPage.clickPublishSharedLibraryButton();
await mainPage.isUnpublishLibraryBtnPresent();
await mainPage.clickCloseLibrariesPopUpButton();
await mainPage.isSharedLibraryBadgeVisible();
await mainPage.backToDashboardFromFileEditor();
await dashboardPage.openSidebarItem("Libraries");
await dashboardPage.isFilePresent("New File 1");
await dashboardPage.openFile();
await mainPage.clickAssetsTab();
await mainPage.clickLibrariesTab();
await mainPage.unPublishSharedLibrary();
await mainPage.isPublishLibraryBtnPresent();
await mainPage.clickCloseLibrariesPopUpButton();
await mainPage.isSharedLibraryBadgeNotVisible();
await mainPage.backToDashboardFromFileEditor();
await dashboardPage.openSidebarItem("Libraries");
await dashboardPage.checkNoLibrariesExist();
});

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("AS-110 Open panel main menu - help&info", async ({ page }) => { mainTest("AS-110 Open panel main menu - help&info", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest( mainTest(
"AS-37 Filter Typographies from All Assets drop-down", "AS-37 Filter Typographies from All Assets drop-down",

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { expect } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const { random } = require("../../helpers/string-generator");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("CP-1 Open color picker from Stroke menu", async ({ page }) => { mainTest("CP-1 Open color picker from Stroke menu", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { expect, test } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("CO-1 Change color background", async ({ page }) => { mainTest("CO-1 Change color background", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test} = require("@playwright/test");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const { random } = require("../../helpers/string-generator");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest( mainTest(
"CO-339 Create comment from toolbar", "CO-339 Create comment from toolbar",

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect } = require("@playwright/test");
const { test } = require("@playwright/test"); const { test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
test.describe(() => { test.describe(() => {
// All tests in this describe group will get 2 retry attempts. // All tests in this describe group will get 2 retry attempts.

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { expect, test } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("CO-112 Create an ellipse from toolbar", async ({ page }) => { mainTest("CO-112 Create an ellipse from toolbar", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,8 +1,31 @@
const { expect, test } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { LayersPage } = require("../../pages/workspace/layers"); const { LayersPanelPage } = require("../../pages/workspace/layers-panel");
const { DesignPanelPage} = require("../../pages/workspace/design-panel"); const { DesignPanelPage } = require("../../pages/workspace/design-panel");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
test.describe("Flex Layout & Elements", async () => { test.describe("Flex Layout & Elements", async () => {
test.beforeEach(async ({ page, browserName}, testInfo) => { test.beforeEach(async ({ page, browserName}, testInfo) => {
@ -398,7 +421,7 @@ test.describe("Flex Layout & Elements", async () => {
mainTest("FL-21 Flex elements change - alignment", async ({ page }) => { mainTest("FL-21 Flex elements change - alignment", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);
const layersPage = new LayersPage(page); const layersPage = new LayersPanelPage(page);
const designPanelPage = new DesignPanelPage(page); const designPanelPage = new DesignPanelPage(page);
await mainPage.addFlexLayoutViaRightClick(); await mainPage.addFlexLayoutViaRightClick();
@ -437,7 +460,7 @@ test.describe("Flex Layout & Elements", async () => {
mainTest("FL-22 Flex elements - change margin single", async ({ page }) => { mainTest("FL-22 Flex elements - change margin single", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);
const layersPage = new LayersPage(page); const layersPage = new LayersPanelPage(page);
const designPanelPage = new DesignPanelPage(page); const designPanelPage = new DesignPanelPage(page);
await mainPage.addFlexLayoutViaRightClick(); await mainPage.addFlexLayoutViaRightClick();
@ -546,7 +569,7 @@ test.describe("Margins & Paddings & Position", async () => {
mainTest("FL-42 Use absolute position and look if element still inside a board", mainTest("FL-42 Use absolute position and look if element still inside a board",
async ({ page }) => { async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);
const layersPage = new LayersPage(page); const layersPage = new LayersPanelPage(page);
const designPanelPage = new DesignPanelPage(page); const designPanelPage = new DesignPanelPage(page);
await layersPage.selectBoardChildEllipse(); await layersPage.selectBoardChildEllipse();

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect, test } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("CO-220 Import JPEG image", async ({ page }) => { mainTest("CO-220 Import JPEG image", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test} = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest( mainTest(
"CO-329 Add nodes via Node panel and SHIFT PLUS shortcut", "CO-329 Add nodes via Node panel and SHIFT PLUS shortcut",

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect, test } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("CO-272 Create Path from toolbar - closed", async ({ page }) => { mainTest("CO-272 Create Path from toolbar - closed", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { expect, test} = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("CO-59 Create a rectangle from toolbar", async ({ page }) => { mainTest("CO-59 Create a rectangle from toolbar", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { expect, test } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("CO-162 Create a text from toolbar", async ({ page, browserName }) => { mainTest("CO-162 Create a text from toolbar", async ({ page, browserName }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,24 @@
const { dashboardTest } = require("../../fixtures"); const { dashboardTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { DashboardPage } = require("../../pages/dashboard-page"); const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const { random } = require("../../helpers/string-generator");
const { test } = require("@playwright/test");
const { TeamPage } = require("../../pages/dashboard/team-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
await teamPage.deleteTeam(teamName);
});
dashboardTest("DA-1 Create new file in Drafts on title panel",async ({ page }) => { dashboardTest("DA-1 Create new file in Drafts on title panel",async ({ page }) => {
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
@ -30,6 +48,7 @@ dashboardTest("DA-3 Open file in Drafts", async ({ page }) => {
await dashboardPage.reloadPage(); await dashboardPage.reloadPage();
await dashboardPage.openFile(); await dashboardPage.openFile();
await mainPage.isMainPageLoaded(); await mainPage.isMainPageLoaded();
await mainPage.backToDashboardFromFileEditor();
}); });
dashboardTest("DA-5 Rename file in Drafts via rightclick", async ({ page }) => { dashboardTest("DA-5 Rename file in Drafts via rightclick", async ({ page }) => {
@ -288,7 +307,7 @@ dashboardTest(
); );
dashboardTest( dashboardTest(
"DA-35-1 Download Penpot file in Project via rigthclick", "DA-35-1 Download Penpot file in Project via rightclick",
async ({ page }) => { async ({ page }) => {
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
await dashboardPage.clickAddProjectButton(); await dashboardPage.clickAddProjectButton();
@ -316,7 +335,7 @@ dashboardTest(
); );
dashboardTest( dashboardTest(
"DA-36-1 Download standard file in Project via rigthclick", "DA-36-1 Download standard file in Project via rightclick",
async ({ page }) => { async ({ page }) => {
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
await dashboardPage.clickAddProjectButton(); await dashboardPage.clickAddProjectButton();

View File

@ -1,11 +1,22 @@
const { dashboardTest } = require("../../fixtures"); const { dashboardTest } = require("../../fixtures");
const { DashboardPage } = require("../../pages/dashboard-page"); const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const { test } = require("@playwright/test"); const { test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
test.beforeEach(async ({ page }) => { const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
await dashboardPage.openSidebarItem("Fonts"); await teamPage.createTeam(teamName);
await dashboardPage.deleteFontsIfExist(); await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
await teamPage.deleteTeam(teamName);
}); });
dashboardTest("DA-66 Upload single font", async ({ page }) => { dashboardTest("DA-66 Upload single font", async ({ page }) => {

View File

@ -1,49 +1,39 @@
const { dashboardTest } = require("../../fixtures"); const { dashboardTest } = require("../../fixtures");
const { DashboardPage } = require("../../pages/dashboard-page"); const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const { test, expect } = require("@playwright/test"); const { test, expect } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
test.beforeEach(async ({ page }) => { const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
await dashboardPage.minimizeLibrariesAndTemplatesCarouselIfExpanded(); await teamPage.createTeam(teamName);
await dashboardPage.minimizeLibrariesAndTemplatesCarousel();
}); });
dashboardTest( test.afterEach(async ({ page }) => {
"DA-128 Expand Libraries & Templates carousel", const teamPage = new TeamPage(page);
async ({ page }) => { await teamPage.deleteTeam(teamName);
const dashboardPage = new DashboardPage(page); });
await dashboardPage.clickLibrariesAndTemplatesCarouselButton();
await dashboardPage.isLibrariesAndTemplatesSectionDisplayed();
}
);
dashboardTest( dashboardTest("DA-128 Expand Libraries & Templates carousel",async ({ page }) => {
"DA-130 Flip Libraries & Templates carousel",
async ({ page }) => {
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
await dashboardPage.clickLibrariesAndTemplatesCarouselButton(); await dashboardPage.clickLibrariesAndTemplatesCarouselButton();
await dashboardPage.isLibrariesAndTemplatesSectionDisplayed(); await dashboardPage.isLibrariesAndTemplatesSectionDisplayed();
await dashboardPage.flipRightLibrariesAndTemplatesCarousel(); });
await dashboardPage.flipRightLibrariesAndTemplatesCarousel();
await dashboardPage.flipRightLibrariesAndTemplatesCarousel(); dashboardTest("DA-130 Flip Libraries & Templates carousel",async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.maximizeLibrariesAndTemplatesCarousel();
await dashboardPage.flipLibrariesAndTemplatesCarousel('right', 3);
await expect(dashboardPage.librariesAndTemplatesSection).toHaveScreenshot( await expect(dashboardPage.librariesAndTemplatesSection).toHaveScreenshot(
"libraries-carousel-flipped-right.png" "libraries-carousel-flipped-right.png"
); );
await dashboardPage.flipLeftLibrariesAndTemplatesCarousel(); await dashboardPage.flipLibrariesAndTemplatesCarousel('left', 3);
await dashboardPage.flipLeftLibrariesAndTemplatesCarousel();
await dashboardPage.flipLeftLibrariesAndTemplatesCarousel();
await expect(dashboardPage.librariesAndTemplatesSection).toHaveScreenshot( await expect(dashboardPage.librariesAndTemplatesSection).toHaveScreenshot(
"libraries-carousel-flipped-left.png" "libraries-carousel-flipped-left.png"
); );
} }
); );
dashboardTest(
"DA-129 Minimize Libraries & Templates carousel",
async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.clickLibrariesAndTemplatesCarouselButton();
await dashboardPage.isLibrariesAndTemplatesSectionDisplayed();
await dashboardPage.clickLibrariesAndTemplatesCarouselButton();
await dashboardPage.isLibrariesAndTemplatesSectionNotDisplayed();
}
);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 169 KiB

View File

@ -1,58 +1,59 @@
const { dashboardTest } = require("../../fixtures"); const { dashboardTest } = require("../../fixtures");
const { TeamPage } = require("../../pages/team-page"); const { TeamPage } = require("../../pages/dashboard/team-page");
const { test, expect } = require("@playwright/test"); const { expect } = require("@playwright/test");
const { ProfilePage } = require("../../pages/profile-page"); const { ProfilePage } = require("../../pages/profile-page");
const { DashboardPage } = require("../../pages/dashboard-page"); const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { random } = require("../../helpers/string-generator");
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
await teamPage.deleteTeamsIfExist();
});
dashboardTest("DA-76 Create a team", async ({ page }) => { dashboardTest("DA-76 Create a team", async ({ page }) => {
const team = random().concat('autotest');
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("New Test Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected("New Test Team"); await teamPage.isTeamSelected(team);
await teamPage.deleteTeam(team);
}); });
dashboardTest("DA-77 Team.Switch between teams", async ({ page }) => { dashboardTest("DA-77 Team.Switch between teams", async ({ page }) => {
const team1 = 'QA Test team 1';
const team2 = 'QA Test team 2';
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
const teamFirst = "QA Test Team 1";
const teamSecond = "QA Test Team 2";
await teamPage.createTeam(teamFirst); await teamPage.createTeam(team1);
await teamPage.isTeamSelected(teamFirst); await teamPage.isTeamSelected(team1);
await teamPage.createTeam(teamSecond); await teamPage.createTeam(team2);
await teamPage.isTeamSelected(teamSecond); await teamPage.isTeamSelected(team2);
await teamPage.switchTeam(teamFirst); await teamPage.switchTeam(team1);
await teamPage.switchTeam(teamSecond); await teamPage.switchTeam(team2);
await teamPage.deleteTeams([team1, team2]);
}); });
dashboardTest( dashboardTest("DA-78 Team Invitations - open the form via Invitations tab",async ({ page }) => {
"DA-78 Team Invitations - open the form via Invitations tab", const teamPage = new TeamPage(page);
async ({ page }) => { const team = random().concat('autotest');
const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected("QA Team"); await teamPage.isTeamSelected(team);
await teamPage.openInvitationsPageViaOptionsMenu(); await teamPage.openInvitationsPageViaOptionsMenu();
await teamPage.clickInviteMembersToTeamButton(); await teamPage.clickInviteMembersToTeamButton();
await teamPage.isInviteMembersPopUpHeaderDisplayed( await teamPage.isInviteMembersPopUpHeaderDisplayed(
"Invite members to the team" "Invite members to the team"
); );
await teamPage.deleteTeam(team);
} }
); );
dashboardTest( dashboardTest("DA-79 Team Invitations - open the form via Team Hero",async ({ page }) => {
"DA-79 Team Invitations - open the form via Team Hero", const teamPage = new TeamPage(page);
async ({ page }) => { const team = random().concat('autotest');
const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected("QA Team"); await teamPage.isTeamSelected(team);
await teamPage.clickInviteMembersTeamHeroButton(); await teamPage.clickInviteMembersTeamHeroButton();
await teamPage.isInviteMembersPopUpHeaderDisplayed( await teamPage.isInviteMembersPopUpHeaderDisplayed("Invite members to the team");
"Invite members to the team" await teamPage.deleteTeam(team);
);
} }
); );
@ -60,8 +61,10 @@ dashboardTest(
"DA-80 Team Invitations - invite via owner (single invitation, editor)", "DA-80 Team Invitations - invite via owner (single invitation, editor)",
async ({ page }) => { async ({ page }) => {
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); const team = random().concat('autotest');
await teamPage.isTeamSelected("QA Team");
await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await teamPage.openInvitationsPageViaOptionsMenu(); await teamPage.openInvitationsPageViaOptionsMenu();
await teamPage.clickInviteMembersToTeamButton(); await teamPage.clickInviteMembersToTeamButton();
await teamPage.isInviteMembersPopUpHeaderDisplayed( await teamPage.isInviteMembersPopUpHeaderDisplayed(
@ -71,15 +74,17 @@ dashboardTest(
await teamPage.clickSendInvitationButton(); await teamPage.clickSendInvitationButton();
await teamPage.isSuccessMessageDisplayed("Invitation sent successfully"); await teamPage.isSuccessMessageDisplayed("Invitation sent successfully");
await teamPage.isInvitationRecordDisplayed("testeditor@test.com", "Editor", "Pending"); await teamPage.isInvitationRecordDisplayed("testeditor@test.com", "Editor", "Pending");
await teamPage.deleteTeam(team);
} }
); );
dashboardTest( dashboardTest(
"DA-81 Team Invitations - invite via owner (single invitation, admin)", "DA-81 Team Invitations - invite via owner (single invitation, admin)",
async ({ page }) => { async ({ page }) => {
const team = random().concat('autotest');
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected("QA Team"); await teamPage.isTeamSelected(team);
await teamPage.openInvitationsPageViaOptionsMenu(); await teamPage.openInvitationsPageViaOptionsMenu();
await teamPage.clickInviteMembersToTeamButton(); await teamPage.clickInviteMembersToTeamButton();
await teamPage.isInviteMembersPopUpHeaderDisplayed( await teamPage.isInviteMembersPopUpHeaderDisplayed(
@ -96,14 +101,16 @@ dashboardTest(
"Admin", "Admin",
"Pending" "Pending"
); );
await teamPage.deleteTeam(team);
} }
); );
dashboardTest("DA-89 Team.Invitations-fail to send invitation to existing team member", dashboardTest("DA-89 Team.Invitations-fail to send invitation to existing team member",
async ({ page }) => { async ({ page }) => {
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); const team = random().concat('autotest');
await teamPage.isTeamSelected("QA Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await teamPage.openInvitationsPageViaOptionsMenu(); await teamPage.openInvitationsPageViaOptionsMenu();
await teamPage.clickInviteMembersToTeamButton(); await teamPage.clickInviteMembersToTeamButton();
await teamPage.isInviteMembersPopUpHeaderDisplayed("Invite members to the team"); await teamPage.isInviteMembersPopUpHeaderDisplayed("Invite members to the team");
@ -111,14 +118,16 @@ dashboardTest("DA-89 Team.Invitations-fail to send invitation to existing team m
await teamPage.isSendInvitationBtnDisabled(); await teamPage.isSendInvitationBtnDisabled();
await teamPage.isSendInvitationWarningExist( await teamPage.isSendInvitationWarningExist(
"Some emails are from current team members. Their invitations will not be sent.") "Some emails are from current team members. Their invitations will not be sent.")
await teamPage.deleteTeam(team);
}); });
dashboardTest( dashboardTest(
"DA-90 Team Invitations - resend invitation via owner", "DA-90 Team Invitations - resend invitation via owner",
async ({ page }) => { async ({ page }) => {
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); const team = random().concat('autotest');
await teamPage.isTeamSelected("QA Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await teamPage.openInvitationsPageViaOptionsMenu(); await teamPage.openInvitationsPageViaOptionsMenu();
await teamPage.clickInviteMembersToTeamButton(); await teamPage.clickInviteMembersToTeamButton();
await teamPage.isInviteMembersPopUpHeaderDisplayed( await teamPage.isInviteMembersPopUpHeaderDisplayed(
@ -138,6 +147,7 @@ dashboardTest(
await teamPage.isSuccessMessageDisplayed( await teamPage.isSuccessMessageDisplayed(
"Invitation sent successfully" "Invitation sent successfully"
); );
await teamPage.deleteTeam(team);
} }
); );
@ -145,8 +155,9 @@ dashboardTest(
"DA-92 Team Invitations - delete invitation via owner", "DA-92 Team Invitations - delete invitation via owner",
async ({ page }) => { async ({ page }) => {
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); const team = random().concat('autotest');
await teamPage.isTeamSelected("QA Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await teamPage.openInvitationsPageViaOptionsMenu(); await teamPage.openInvitationsPageViaOptionsMenu();
await teamPage.clickInviteMembersToTeamButton(); await teamPage.clickInviteMembersToTeamButton();
await teamPage.isInviteMembersPopUpHeaderDisplayed( await teamPage.isInviteMembersPopUpHeaderDisplayed(
@ -164,6 +175,7 @@ dashboardTest(
); );
await teamPage.deleteInvitation(); await teamPage.deleteInvitation();
await teamPage.isInvitationRecordRemoved(); await teamPage.isInvitationRecordRemoved();
await teamPage.deleteTeam(team);
} }
); );
@ -171,8 +183,9 @@ dashboardTest(
"DA-95 Team Invitations - change role in invitation via owner", "DA-95 Team Invitations - change role in invitation via owner",
async ({ page }) => { async ({ page }) => {
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); const team = random().concat('autotest');
await teamPage.isTeamSelected("QA Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await teamPage.openInvitationsPageViaOptionsMenu(); await teamPage.openInvitationsPageViaOptionsMenu();
await teamPage.clickInviteMembersToTeamButton(); await teamPage.clickInviteMembersToTeamButton();
await teamPage.isInviteMembersPopUpHeaderDisplayed( await teamPage.isInviteMembersPopUpHeaderDisplayed(
@ -194,15 +207,17 @@ dashboardTest(
"Admin", "Admin",
"Pending" "Pending"
); );
await teamPage.deleteTeam(team);
} }
); );
dashboardTest( dashboardTest(
"DA-114 Team Settings - upload team profile picture", "DA-114 Team Settings - upload team profile picture",
async ({ page }) => { async ({ page }) => {
const team = "QA Team";
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("New Test Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected("New Test Team"); await teamPage.isTeamSelected(team);
await teamPage.openTeamSettingsPageViaOptionsMenu(); await teamPage.openTeamSettingsPageViaOptionsMenu();
await teamPage.uploadTeamImage("images/images.png"); await teamPage.uploadTeamImage("images/images.png");
await teamPage.isInfoMessageDisplayed("Loading image…"); await teamPage.isInfoMessageDisplayed("Loading image…");
@ -210,11 +225,13 @@ dashboardTest(
await expect(teamPage.teamInfoSection).toHaveScreenshot( await expect(teamPage.teamInfoSection).toHaveScreenshot(
"team-profile-image.png" "team-profile-image.png"
); );
await teamPage.deleteTeam(team);
} }
); );
dashboardTest("DA-116 Team. Settings - check 'Team members' info", dashboardTest("DA-116 Team. Settings - check 'Team members' info",
async ({ page }) => { async ({ page }) => {
const team = random().concat('autotest');
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
const profilePage = new ProfilePage(page); const profilePage = new ProfilePage(page);
await profilePage.openYourAccountPage(); await profilePage.openYourAccountPage();
@ -223,26 +240,28 @@ dashboardTest("DA-116 Team. Settings - check 'Team members' info",
await profilePage.uploadProfileImage("images/sample.jpeg"); await profilePage.uploadProfileImage("images/sample.jpeg");
await profilePage.waitInfoMessageHidden(); await profilePage.waitInfoMessageHidden();
await profilePage.backToDashboardFromAccount(); await profilePage.backToDashboardFromAccount();
await teamPage.createTeam("New Test Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected("New Test Team"); await teamPage.isTeamSelected(team);
await teamPage.openTeamSettingsPageViaOptionsMenu(); await teamPage.openTeamSettingsPageViaOptionsMenu();
const teamOwner = await profilePage.getProfileFullName() + ' (Owner)'; const teamOwner = await profilePage.getProfileFullName() + ' (Owner)';
await teamPage.isTeamOwnerInfoDisplayed(teamOwner); await teamPage.isTeamOwnerInfoDisplayed(teamOwner);
await teamPage.isTeamMembersInfoDisplayed("1 members"); await teamPage.isTeamMembersInfoDisplayed("1 members");
await expect(teamPage.teamOwnerSection).toHaveScreenshot("team-owner-block.png") await expect(teamPage.teamOwnerSection).toHaveScreenshot("team-owner-block.png");
}); await teamPage.deleteTeam(team);
});
dashboardTest("DA-117 Team. Settings - check 'Team projects' info", dashboardTest("DA-117 Team. Settings - check 'Team projects' info",
async ({ page }) => { async ({ page }) => {
const team = random().concat('autotest');
const dashboardPage = new DashboardPage(page); const dashboardPage = new DashboardPage(page);
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
const mainPage = new MainPage(page); const mainPage = new MainPage(page);
const projectFirst = "QA Project 1"; const projectFirst = "QA Project 1";
const projectSecond = "QA Project 2"; const projectSecond = "QA Project 2";
await teamPage.createTeam("New Test Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected("New Test Team"); await teamPage.isTeamSelected(team);
await dashboardPage.createProject(projectFirst); await dashboardPage.createProject(projectFirst);
await dashboardPage.createProject(projectSecond); await dashboardPage.createProject(projectSecond);
await dashboardPage.openSidebarItem("Drafts"); await dashboardPage.openSidebarItem("Drafts");
@ -259,20 +278,25 @@ dashboardTest("DA-117 Team. Settings - check 'Team projects' info",
await teamPage.isTeamProjectsInfoDisplayed("2 projects"); await teamPage.isTeamProjectsInfoDisplayed("2 projects");
await teamPage.isTeamFilesInfoDisplayed("3 files"); await teamPage.isTeamFilesInfoDisplayed("3 files");
await expect(teamPage.teamStatsSection).toHaveScreenshot("team-stats-block.png") await expect(teamPage.teamStatsSection).toHaveScreenshot("team-stats-block.png")
await teamPage.deleteTeam(team);
}); });
dashboardTest("DA-119 Rename a team via owner", async ({ page }) => { dashboardTest("DA-119 Rename a team via owner", async ({ page }) => {
const team = random().concat('autotest');
const teamNew = random().concat('autotest');
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); await teamPage.createTeam(team);
await teamPage.isTeamSelected("QA Team"); await teamPage.isTeamSelected(team);
await teamPage.renameTeam("Renamed Team"); await teamPage.renameTeam(teamNew);
await teamPage.isTeamSelected("Renamed Team"); await teamPage.isTeamSelected(teamNew);
await teamPage.deleteTeams([team, teamNew]);
}); });
dashboardTest("DA-122 Delete a team via owner", async ({ page }) => { dashboardTest("DA-122 Delete a team via owner", async ({ page }) => {
const teamPage = new TeamPage(page); const teamPage = new TeamPage(page);
await teamPage.createTeam("QA Team"); const team = random().concat('autotest');
await teamPage.isTeamSelected("QA Team"); await teamPage.createTeam(team);
await teamPage.deleteTeam("QA Team"); await teamPage.isTeamSelected(team);
await teamPage.isTeamDeleted("QA Team"); await teamPage.deleteTeam(team);
await teamPage.isTeamDeleted(team);
}); });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -1,6 +1,6 @@
const { test } = require("@playwright/test"); const { test } = require("@playwright/test");
const { LoginPage } = require("../pages/login-page"); const { LoginPage } = require("../pages/login-page");
const { DashboardPage } = require("../pages/dashboard-page"); const { DashboardPage } = require("../pages/dashboard/dashboard-page");
test("ON-8 Login with an email address", async ({ page }) => { test("ON-8 Login with an email address", async ({ page }) => {
const loginPage = new LoginPage(page); const loginPage = new LoginPage(page);

View File

@ -1,5 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { random } = require("../../helpers/string-generator");
const { test } = require("@playwright/test");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("PF-179 Add export setting via design panel", async ({ page }) => { mainTest("PF-179 Add export setting via design panel", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { expect } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("PF-68 Add fill to board", async ({ page }) => { mainTest("PF-68 Add fill to board", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { test, expect} = require("@playwright/test"); const { test, expect} = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
test.beforeEach(async ({ page}) => { test.beforeEach(async ({ page}) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { random } = require("../../helpers/string-generator");
const { test } = require("@playwright/test");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("PF-156 Perform a change and check the status",async ({ page }) => { mainTest("PF-156 Perform a change and check the status",async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,7 +1,30 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test} = require("@playwright/test");
const { ColorPalettePopUp } = require("../../pages/color-palette-popup"); const { ColorPalettePopUp } = require("../../pages/workspace/color-palette-popup");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("PF-99 Hide/show grids via shortcut CTRL '",async ({ page, browserName }) => { mainTest("PF-99 Hide/show grids via shortcut CTRL '",async ({ page, browserName }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("PF-114 Create new page", async ({ page }) => { mainTest("PF-114 Create new page", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest( mainTest(
"PF-139 Add connector between 2 boards via mouse drag", "PF-139 Add connector between 2 boards via mouse drag",

View File

@ -1,6 +1,29 @@
const { mainTest } = require("../../fixtures"); const { mainTest } = require("../../fixtures");
const { MainPage } = require("../../pages/main-page"); const { MainPage } = require("../../pages/workspace/main-page");
const { expect } = require("@playwright/test"); const { expect, test } = require("@playwright/test");
const { random } = require("../../helpers/string-generator");
const { TeamPage } = require("../../pages/dashboard/team-page");
const { DashboardPage } = require("../../pages/dashboard/dashboard-page");
const teamName = random().concat('autotest');
test.beforeEach( async ({ page }) => {
const teamPage = new TeamPage(page);
const dashboardPage = new DashboardPage(page);
const mainPage = new MainPage(page);
await teamPage.createTeam(teamName);
await dashboardPage.deleteProjectsIfExist();
await dashboardPage.deleteFilesIfExist();
await dashboardPage.createFileViaPlaceholder();
await mainPage.isMainPageLoaded();
});
test.afterEach(async ({ page }) => {
const teamPage = new TeamPage(page);
const mainPage = new MainPage(page);
await mainPage.backToDashboardFromFileEditor();
await teamPage.deleteTeam(teamName);
});
mainTest("PF-132 Zoom +/- via top right menu", async ({ page }) => { mainTest("PF-132 Zoom +/- via top right menu", async ({ page }) => {
const mainPage = new MainPage(page); const mainPage = new MainPage(page);

View File

@ -2,7 +2,7 @@ const { dashboardTest } = require("../fixtures");
const { ProfilePage } = require("../pages/profile-page"); const { ProfilePage } = require("../pages/profile-page");
const { random } = require("../helpers/string-generator"); const { random } = require("../helpers/string-generator");
const { LoginPage } = require("../pages/login-page"); const { LoginPage } = require("../pages/login-page");
const {expect} = require("@playwright/test"); const { expect } = require("@playwright/test");
dashboardTest("PR-1 Edit profile name", async ({ page }) => { dashboardTest("PR-1 Edit profile name", async ({ page }) => {
const newName = random(); const newName = random();