Skip to content

Commit

Permalink
Add visual test for About Paint dialog during pride month
Browse files Browse the repository at this point in the history
  • Loading branch information
1j01 committed Jun 1, 2024
1 parent be03638 commit 3e3fd00
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cypress/integration/visual-tests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,26 @@ context('visual tests', () => {
cy.matchImageSnapshot(withTextCompareOptions);
});

it('about window during pride month', () => {
// TODO: DRY with other about window tests and the app loading in the `before` hook,
// maybe enable test isolation even though it's slower to load the app every time

// June 19, 3000
cy.clock(32518299600000);

cy.visit('/');
cy.setResolution([760, 490]);
cy.window().should('have.property', 'api_for_cypress_tests'); // wait for app to be loaded

// Needed, given `cy.clock` is used, for `requestAnimationFrame` in `update_$swatch`,
// so the color palette is rendered correctly.
// (Doesn't apply to this test.)
cy.tick(100);

clickMenuButton('Help');
clickMenuItem('About Paint');
waitForImage('#about-paint-icon');
cy.get('.window:visible').matchImageSnapshot(Object.assign({}, withMuchTextCompareOptions, { blackout: ["#maybe-outdated-line", "#jspaint-version"] }));
});

});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3e3fd00

Please sign in to comment.