Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 0 additions & 75 deletions tests/dashboard/dashboard-fonts.spec.js

This file was deleted.

117 changes: 117 additions & 0 deletions tests/dashboard/dashboard-fonts.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import { DashboardPage } from '@pages/dashboard/dashboard-page';
import { TeamPage } from '@pages/dashboard/team-page';
import { mainTest } from 'fixtures';
import { createTeamName } from 'helpers/teams/create-team-name';
import { qase } from 'playwright-qase-reporter/playwright';

const teamName = createTeamName();

let dashboardPage: DashboardPage;
let teamPage: TeamPage;

mainTest.beforeEach(async ({ page }) => {
teamPage = new TeamPage(page);
dashboardPage = new DashboardPage(page);

await teamPage.createTeam(teamName);
await teamPage.isTeamSelected(teamName);
});

mainTest(qase([1152], 'Upload single font'), async () => {
await mainTest.step('Open Fonts section', async () => {
await dashboardPage.openSidebarItem('Fonts');
});

await mainTest.step('Upload a single font and verify it is listed', async () => {
await dashboardPage.uploadFont('fonts/Pacifico.ttf');
await dashboardPage.isFontExists('Pacifico', 'Regular');
});
});

mainTest(qase([1153], 'Fonts - upload (multiple)'), async () => {
await mainTest.step('Open Fonts section', async () => {
await dashboardPage.openSidebarItem('Fonts');
});

await mainTest.step(
'Upload multiple fonts and verify they are listed',
async () => {
await dashboardPage.uploadAllFonts([
'fonts/Pacifico.ttf',
'fonts/SourceCodePro-Regular.woff',
]);
await dashboardPage.areFontsListed([
{ fontName: 'Pacifico', fontStyle: 'Regular' },
{ fontName: 'Source Code Pro', fontStyle: 'Regular' },
]);
},
);
});

mainTest(qase([1154], 'Fonts - upload fail invalid file format'), async () => {
await mainTest.step('Open Fonts section', async () => {
await dashboardPage.openSidebarItem('Fonts');
});

await mainTest.step('Try to upload an invalid file format', async () => {
await dashboardPage.uploadFontWithInvalidFormat('images/images.png');
});
});

mainTest(qase([1155], 'Search font'), async () => {
await mainTest.step('Open Fonts section and upload test fonts', async () => {
await dashboardPage.openSidebarItem('Fonts');
await dashboardPage.uploadFont('fonts/ArialTh.ttf');
await dashboardPage.uploadFont('fonts/Allura-Regular.otf');
});

await mainTest.step('Search and verify font results', async () => {
await dashboardPage.searchFont('Arial Th');
await dashboardPage.isFontExists('Arial Th', 'Regular');
await dashboardPage.isFontNotExist('Allura-Regular');
});
});

mainTest(qase([1157], 'Edit font BUG'), async () => {
await mainTest.step('Open Fonts section and upload a font', async () => {
await dashboardPage.openSidebarItem('Fonts');
await dashboardPage.uploadFont('fonts/Allura-Regular.otf');
await dashboardPage.isFontExists('Allura', 'Regular');
});

await mainTest.step('Edit the font name and verify the change', async () => {
await dashboardPage.editFont('New Test Font');
await dashboardPage.isFontExists('New Test Font', 'Regular');
});
});

mainTest(qase([1158], 'Delete font'), async () => {
await mainTest.step('Open Fonts section and upload a font', async () => {
await dashboardPage.openSidebarItem('Fonts');
await dashboardPage.uploadFont('fonts/Pacifico.ttf');
await dashboardPage.isFontExists('Pacifico', 'Regular');
});

await mainTest.step('Delete the font and verify the empty state', async () => {
await dashboardPage.deleteFont();
await dashboardPage.isFontsTablePlaceholderDisplayed(
'Custom fonts you upload will appear here.',
);
});
});

mainTest(qase([1159], 'Delete font - Cancel button check'), async () => {
await mainTest.step('Open Fonts section and upload a font', async () => {
await dashboardPage.openSidebarItem('Fonts');
await dashboardPage.uploadFont('fonts/Pacifico.ttf');
await dashboardPage.isFontExists('Pacifico', 'Regular');
});

await mainTest.step(
'Cancel font deletion and verify the font remains',
async () => {
await dashboardPage.cancelDeleteFont();
await dashboardPage.isFontExists('Pacifico', 'Regular');
},
);
});
82 changes: 0 additions & 82 deletions tests/dashboard/teams/settings/teams-settings.spec.js

This file was deleted.

106 changes: 106 additions & 0 deletions tests/dashboard/teams/settings/teams-settings.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import { DashboardPage } from '@pages/dashboard/dashboard-page';
import { MainPage } from '@pages/workspace/main-page';
import { ProfilePage } from '@pages/profile-page';
import { TeamPage } from '@pages/dashboard/team-page';
import { expect } from '@playwright/test';
import { mainTest } from 'fixtures';
import { createTeamName } from 'helpers/teams/create-team-name';
import { qase } from 'playwright-qase-reporter/playwright';

const maxDiffPixelRatio = 0.001;
const team = createTeamName();

let dashboardPage: DashboardPage;
let mainPage: MainPage;
let profilePage: ProfilePage;
let teamPage: TeamPage;

mainTest.beforeEach(async ({ page }) => {
teamPage = new TeamPage(page);
dashboardPage = new DashboardPage(page);
profilePage = new ProfilePage(page);
mainPage = new MainPage(page);
});

mainTest(qase([1200], 'Team Settings - upload team profile picture'), async () => {
await mainTest.step('Create a team and open team settings', async () => {
await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await teamPage.openTeamSettingsPageViaOptionsMenu();
});

await mainTest.step(
'Upload team profile picture and verify the icon',
async () => {
await teamPage.uploadTeamImage('images/images.png');
await teamPage.waitInfoMessageHidden();
await teamPage.hoverOnTeamName();
await expect(teamPage.teamIcon).toHaveScreenshot('team-profile-image.png', {
maxDiffPixelRatio,
mask: [teamPage.teamNameLabel],
});
},
);
});

mainTest(qase([1202], "Team. Settings - check 'Team members' info"), async () => {
const teamOwner = 'QA Engineer (Owner)';

await mainTest.step('Update profile name and create a team', async () => {
await profilePage.openYourAccountPage();
await profilePage.isHeaderDisplayed('Your account');
await profilePage.changeProfileName('QA Engineer');
await profilePage.uploadProfileImage('images/sample.jpeg');
await profilePage.waitInfoMessageHidden();
await profilePage.backToDashboardFromAccount();
await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await teamPage.openTeamSettingsPageViaOptionsMenu();
});

await mainTest.step('Verify team owner and members info', async () => {
await teamPage.isTeamOwnerInfoDisplayed(teamOwner);
await teamPage.isTeamMembersInfoDisplayed('1 members');
});
});

mainTest(qase([1203], "Team. Settings - check 'Team projects' info"), async () => {
const projectFirst = 'QA Project 1';
const projectSecond = 'QA Project 2';

await mainTest.step('Create projects and files for the team', async () => {
await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await dashboardPage.createProject(projectFirst);
await dashboardPage.pinProjectByName(projectFirst);
await dashboardPage.createProject(projectSecond);
await dashboardPage.pinProjectByName(projectSecond);
await dashboardPage.openSidebarItem('Drafts');
await dashboardPage.createFileViaProjectPlaceholder();
await mainPage.backToDashboardFromFileEditor();
await dashboardPage.openPinnedProjectFromSidebar(projectFirst);
await dashboardPage.createFileViaProjectPlaceholder();
await mainPage.backToDashboardFromFileEditor();
await dashboardPage.openPinnedProjectFromSidebar(projectSecond);
await dashboardPage.createFileViaProjectPlaceholder();
await mainPage.backToDashboardFromFileEditor();
});

await mainTest.step(
'Open team settings and verify project/file counters',
async () => {
await teamPage.openTeamSettingsPageViaOptionsMenu();
await teamPage.isTeamProjectsInfoDisplayed('2 projects');
await teamPage.isTeamFilesInfoDisplayed('3 files');
},
);
});

mainTest(qase([1208], 'Delete a team via owner'), async () => {
await mainTest.step('Create and delete the team', async () => {
await teamPage.createTeam(team);
await teamPage.isTeamSelected(team);
await teamPage.deleteTeam(team);
await teamPage.isTeamDeleted(team);
});
});
Loading