haim-io / cypress-image-diff

Visual regression test with cypress
MIT License
251 stars 62 forks source link

Generate JSON Reports for Cypress Image Diff HTML Report when running GUI tests #217

Open SokolovAlexanderV opened 6 months ago

SokolovAlexanderV commented 6 months ago

JSON files for HTML Reports v2 are generated only when running tests from CLI. Sometimes it is useful to get and analyse reports when running tests via GUI.

Use case for tests group can look like this:

describe('Visual testing', () => {
    after(() => {
        cy.task('generateJsonReport');
    })
});

// or if some environment data required

after(() => {
    cy.task('generateJsonReport', {
        browserName: Cypress.browser.displayName,
        browserVersion: Cypress.browser.version,
        cypressVersion: Cypress.version,
    });
});

Then if we keep Cypress Image Diff HTML Report opened we can easily switch and view any interface difference.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 4 months ago

This issue was closed because it has been inactive for 30 days since being marked as stale.

JasonFairchild commented 1 week ago

I definitely think this should be implemented. Or at the very least, it should be clear in the docs.

tamasmagyar commented 1 week ago

We have an open PR for this #218