2 new vrt tests for reports (#1814)

This commit is contained in:
Shaan Khosla
2023-10-19 12:33:31 -04:00
committed by GitHub
parent eb54487d8e
commit 75f2bf8b1b
5 changed files with 26 additions and 0 deletions

View File

@@ -8,6 +8,16 @@ export class ReportsPage {
return this.pageContent.getByRole('link', { name: /^Net/ }).waitFor();
}
async goToNetWorthPage() {
await this.pageContent.getByRole('link', { name: /^Net/ }).click();
return new ReportsPage(this.page);
}
async goToCashFlowPage() {
await this.pageContent.getByRole('link', { name: /^Cash/ }).click();
return new ReportsPage(this.page);
}
async getAvailableReportList() {
return this.pageContent
.getByRole('link')

View File

@@ -34,4 +34,14 @@ test.describe('Reports', () => {
expect(reports).toEqual(['Net Worth', 'Cash Flow']);
await expect(page).toHaveScreenshot(screenshotConfig(page));
});
test('loads net worth graph and checks visuals', async () => {
await reportsPage.goToNetWorthPage();
await expect(page).toHaveScreenshot(screenshotConfig(page));
});
test('loads cash flow graph and checks visuals', async () => {
await reportsPage.goToCashFlowPage();
await expect(page).toHaveScreenshot(screenshotConfig(page));
});
});

View File

@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [shaankhosla]
---
Added 2 new VRT tests for reports.