A couple of tests started to fail recently while running cypress with Chrome.
Test 1
Cypress fails to verify the text correctly. Here are the screenshots:
Here is how the number is generated in the code:
let dateString = '';
before(() => {
dateString = Date.now();
timestamp = `XXX.${dateString}`;
});
it('test to save data', () => {
// uses timestamp variable to save data
});
it('test to check data', () => {
// uses the same timestamp variable to check data
});
How can the value of timestamp variable differ between the two tests? Is the before method called again for each it block? If it is called again then how can I ensure both tests have the same value for the variable timestamp?

