Skip to content
Snippets Groups Projects
Unverified Commit af666458 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:white_check_mark: (VRT) darkmode visual regression tests (#1860)

parent 184b3022
No related branches found
No related tags found
No related merge requests found
Showing
with 8 additions and 11 deletions
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -5,7 +5,6 @@ import { test, expect } from '@playwright/test'; ...@@ -5,7 +5,6 @@ import { test, expect } from '@playwright/test';
import { AccountPage } from './page-models/account-page'; import { AccountPage } from './page-models/account-page';
import { ConfigurationPage } from './page-models/configuration-page'; import { ConfigurationPage } from './page-models/configuration-page';
import { Navigation } from './page-models/navigation'; import { Navigation } from './page-models/navigation';
import screenshotConfig from './screenshot.config';
test.describe('Onboarding', () => { test.describe('Onboarding', () => {
let page; let page;
...@@ -26,10 +25,10 @@ test.describe('Onboarding', () => { ...@@ -26,10 +25,10 @@ test.describe('Onboarding', () => {
test('checks the page visuals', async () => { test('checks the page visuals', async () => {
await expect(configurationPage.heading).toHaveText('Where’s the server?'); await expect(configurationPage.heading).toHaveText('Where’s the server?');
await expect(page).toHaveScreenshot(screenshotConfig(page)); await expect(page).toMatchThemeScreenshots();
await configurationPage.clickOnNoServer(); await configurationPage.clickOnNoServer();
await expect(page).toHaveScreenshot(screenshotConfig(page)); await expect(page).toMatchThemeScreenshots();
}); });
test('creates a new budget file by importing YNAB4 budget', async () => { test('creates a new budget file by importing YNAB4 budget', async () => {
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -2,7 +2,6 @@ import { test, expect } from '@playwright/test'; ...@@ -2,7 +2,6 @@ import { test, expect } from '@playwright/test';
import { ConfigurationPage } from './page-models/configuration-page'; import { ConfigurationPage } from './page-models/configuration-page';
import { Navigation } from './page-models/navigation'; import { Navigation } from './page-models/navigation';
import screenshotConfig from './screenshot.config';
test.describe('Reports', () => { test.describe('Reports', () => {
let page; let page;
...@@ -32,16 +31,16 @@ test.describe('Reports', () => { ...@@ -32,16 +31,16 @@ test.describe('Reports', () => {
const reports = await reportsPage.getAvailableReportList(); const reports = await reportsPage.getAvailableReportList();
expect(reports).toEqual(['Net Worth', 'Cash Flow']); expect(reports).toEqual(['Net Worth', 'Cash Flow']);
await expect(page).toHaveScreenshot(screenshotConfig(page)); await expect(page).toMatchThemeScreenshots();
}); });
test('loads net worth graph and checks visuals', async () => { test('loads net worth graph and checks visuals', async () => {
await reportsPage.goToNetWorthPage(); await reportsPage.goToNetWorthPage();
await expect(page).toHaveScreenshot(screenshotConfig(page)); await expect(page).toMatchThemeScreenshots();
}); });
test('loads cash flow graph and checks visuals', async () => { test('loads cash flow graph and checks visuals', async () => {
await reportsPage.goToCashFlowPage(); await reportsPage.goToCashFlowPage();
await expect(page).toHaveScreenshot(screenshotConfig(page)); await expect(page).toMatchThemeScreenshots();
}); });
}); });
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -2,7 +2,6 @@ import { test, expect } from '@playwright/test'; ...@@ -2,7 +2,6 @@ import { test, expect } from '@playwright/test';
import { ConfigurationPage } from './page-models/configuration-page'; import { ConfigurationPage } from './page-models/configuration-page';
import { Navigation } from './page-models/navigation'; import { Navigation } from './page-models/navigation';
import screenshotConfig from './screenshot.config';
test.describe('Rules', () => { test.describe('Rules', () => {
let page; let page;
...@@ -29,7 +28,7 @@ test.describe('Rules', () => { ...@@ -29,7 +28,7 @@ test.describe('Rules', () => {
test('checks the page visuals', async () => { test('checks the page visuals', async () => {
await rulesPage.searchFor('Dominion'); await rulesPage.searchFor('Dominion');
await expect(page).toHaveScreenshot(screenshotConfig(page)); await expect(page).toMatchThemeScreenshots();
}); });
test('creates a rule and makes sure it is applied when creating a transaction', async () => { test('creates a rule and makes sure it is applied when creating a transaction', async () => {
...@@ -53,7 +52,7 @@ test.describe('Rules', () => { ...@@ -53,7 +52,7 @@ test.describe('Rules', () => {
const rule = rulesPage.getNthRule(0); const rule = rulesPage.getNthRule(0);
await expect(rule.conditions).toHaveText(['payee is Fast Internet']); await expect(rule.conditions).toHaveText(['payee is Fast Internet']);
await expect(rule.actions).toHaveText(['set category to General']); await expect(rule.actions).toHaveText(['set category to General']);
await expect(page).toHaveScreenshot(screenshotConfig(page)); await expect(page).toMatchThemeScreenshots();
const accountPage = await navigation.goToAccountPage('HSBC'); const accountPage = await navigation.goToAccountPage('HSBC');
...@@ -66,6 +65,6 @@ test.describe('Rules', () => { ...@@ -66,6 +65,6 @@ test.describe('Rules', () => {
await expect(transaction.payee).toHaveText('Fast Internet'); await expect(transaction.payee).toHaveText('Fast Internet');
await expect(transaction.category).toHaveText('General'); await expect(transaction.category).toHaveText('General');
await expect(transaction.debit).toHaveText('12.34'); await expect(transaction.debit).toHaveText('12.34');
await expect(page).toHaveScreenshot(screenshotConfig(page)); await expect(page).toMatchThemeScreenshots();
}); });
}); });
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment