screenshot=>themeshot

This commit is contained in:
SPRINX0\prochazka
2025-01-29 15:40:41 +01:00
parent bee7ec0cc7
commit f22adf3cc8
3 changed files with 24 additions and 10 deletions

View File

@@ -27,3 +27,17 @@
Cypress.Commands.add('testid', (testId, options = {}) => {
return cy.get(`[data-testid="${testId}"]`, options);
});
Cypress.Commands.add('themeshot', file => {
cy.window().then(win => {
win.__changeCurrentTheme('theme-dark');
});
cy.screenshot(`${file}-dark`);
cy.window().then(win => {
win.__changeCurrentTheme('theme-light');
});
cy.screenshot(`${file}-light`);
});