Open Michael-1 opened 2 years ago
I have a quick fix to get this plugin running with Cypress 10 until it's updated.
If you have this error :
You can remplace the config
argument of cypressDataSnapshot
in cypress.config.ts by an empty object.
const cypressDataSnapshot = require("cypress-data-snapshot/plugin");
function setupNodeEvents(on, config) => {
cypressDataSnapshot(on, {});
return config;
}
And add the excludeSpecPattern
yourself in the Cypress config.
I don't know if it's because I use @badeball/cypress-cucumber-preprocessor
or if it's an issue with Cypress 10, but I get an error when I try and create a snapshot:
Cannot read properties of null (reading 'match')
In order to fix this one I have to override the getTestFilePath command:
Cypress.Commands.add('getTestFilePath', () => {
return cy.wrap(Cypress.spec.absolute);
});
For compatibility for Cypress 10, a few changes are required, notably
excludeSpecPattern
instead ofignoreTestFiles