mirror of
https://github.com/penpot/penpotqa.git
synced 2024-07-06 04:51:46 +00:00
Merge pull request #31 from penpot/PENPOT-1159
Add PENPOT-1159. DA-73 Delete font - Cancel button check
This commit is contained in:
commit
afdcece5df
|
@ -120,6 +120,7 @@ exports.DashboardPage = class DashboardPage extends BasePage {
|
|||
this.editFontMenuItem = page.locator('#font-edit');
|
||||
this.deleteFontMenuItem = page.locator('#font-delete');
|
||||
this.deleteFontButton = page.locator('input[value="Delete"]');
|
||||
this.cancelDeleteFontButton = page.getByRole('button', { name: 'Cancel' });
|
||||
this.fontsTablePlaceholder = page.locator(
|
||||
'div[class*="fonts-placeholder"] div[class*="label"]',
|
||||
);
|
||||
|
@ -466,6 +467,12 @@ exports.DashboardPage = class DashboardPage extends BasePage {
|
|||
await this.deleteFontButton.click();
|
||||
}
|
||||
|
||||
async cancelDeleteFont() {
|
||||
await this.fontOptionsMenuButton.click();
|
||||
await this.deleteFontMenuItem.click();
|
||||
await this.cancelDeleteFontButton.click();
|
||||
}
|
||||
|
||||
async isFontsTablePlaceholderDisplayed(text) {
|
||||
await expect(this.fontsTablePlaceholder).toHaveText(text);
|
||||
}
|
||||
|
|
|
@ -62,3 +62,12 @@ mainTest(qase(1158,'DA-72 Delete font'), async ({ page }) => {
|
|||
'Custom fonts you upload will appear here.',
|
||||
);
|
||||
});
|
||||
|
||||
mainTest(qase(1159,'DA-73 Delete font - Cancel button check'), async ({ page }) => {
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
await dashboardPage.openSidebarItem('Fonts');
|
||||
await dashboardPage.uploadFont('fonts/Pacifico.ttf');
|
||||
await dashboardPage.isFontExists('Pacifico', 'Regular');
|
||||
await dashboardPage.cancelDeleteFont();
|
||||
await dashboardPage.isFontExists('Pacifico', 'Regular');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user