|
|
@ -89,12 +89,12 @@ export class ToolbarViewMenuPage extends BasePage { |
|
|
|
await this.get().locator(`.ant-dropdown-menu-title-content:has-text("${menu}")`).first().click(); |
|
|
|
await this.get().locator(`.ant-dropdown-menu-title-content:has-text("${menu}")`).first().click(); |
|
|
|
if (subMenu) { |
|
|
|
if (subMenu) { |
|
|
|
// for CSV download, pass locator instead of clicking it here
|
|
|
|
// for CSV download, pass locator instead of clicking it here
|
|
|
|
if (subMenu === 'Download as CSV') { |
|
|
|
if (subMenu === 'Download CSV') { |
|
|
|
await this.verifyDownloadAsCSV({ |
|
|
|
await this.verifyDownloadAsCSV({ |
|
|
|
downloadLocator: this.rootPage.locator(`.ant-dropdown-menu-title-content:has-text("${subMenu}")`).last(), |
|
|
|
downloadLocator: this.rootPage.locator(`.ant-dropdown-menu-title-content:has-text("${subMenu}")`).last(), |
|
|
|
expectedDataFile: verificationInfo?.verificationFile ?? './fixtures/expectedBaseDownloadData.txt', |
|
|
|
expectedDataFile: verificationInfo?.verificationFile ?? './fixtures/expectedBaseDownloadData.txt', |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else if (subMenu === 'Download as XLSX') { |
|
|
|
} else if (subMenu === 'Download Excel') { |
|
|
|
await this.verifyDownloadAsXLSX({ |
|
|
|
await this.verifyDownloadAsXLSX({ |
|
|
|
downloadLocator: this.rootPage.locator(`.ant-dropdown-menu-title-content:has-text("${subMenu}")`).last(), |
|
|
|
downloadLocator: this.rootPage.locator(`.ant-dropdown-menu-title-content:has-text("${subMenu}")`).last(), |
|
|
|
expectedDataFile: verificationInfo?.verificationFile ?? './fixtures/expectedBaseDownloadData.txt', |
|
|
|
expectedDataFile: verificationInfo?.verificationFile ?? './fixtures/expectedBaseDownloadData.txt', |
|
|
@ -104,12 +104,12 @@ export class ToolbarViewMenuPage extends BasePage { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch (subMenu) { |
|
|
|
switch (subMenu) { |
|
|
|
case 'Download as CSV': |
|
|
|
case 'Download CSV': |
|
|
|
await this.verifyToast({ |
|
|
|
await this.verifyToast({ |
|
|
|
message: 'Successfully exported all table data', |
|
|
|
message: 'Successfully exported all table data', |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'Download as XLSX': |
|
|
|
case 'Download Excel': |
|
|
|
await this.verifyToast({ |
|
|
|
await this.verifyToast({ |
|
|
|
message: 'Successfully exported all table data', |
|
|
|
message: 'Successfully exported all table data', |
|
|
|
}); |
|
|
|
}); |
|
|
|