Skip to content

Commit

Permalink
2 new vrt tests for reports (#1814)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaankhosla authored Oct 19, 2023
1 parent eb54487 commit 75f2bf8
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/desktop-client/e2e/page-models/reports-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
10 changes: 10 additions & 0 deletions packages/desktop-client/e2e/reports.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions upcoming-release-notes/1814.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [shaankhosla]
---

Added 2 new VRT tests for reports.

0 comments on commit 75f2bf8

Please sign in to comment.