I was using cypress old versions and was able to see cypress is taking snapshot of executing each step. This feature was really powerful as we were able to see what is happening on each command through cypress time travel feature.
But now in latest versions cypress doesn't take snapshot even if you hover on previous commands in cypress runner, it display "The Snapshot is Missing. Displaying current state of DOM".
Can anyone please guide how I can bring back cypress snapshot features in latest versions? As it still work if we install old versions of cypress.
You have to add numTestsKeptInMemory
flag with number of snapshots you allow, in your cypress.config.js
file.
Let say I allow 50 Snapshots.
export default defineConfig({
numTestsKeptInMemory:50,
e2e:{
setupNodeEvents (on) {
}
}
})