За более года это работало нормально - у нас есть около 80 тестов, которые мы проходили (из наших местных машин), по крайней мере, несколько раз в неделю.
Код: Выделить всё
it
Однако, как представляется, с нашим тестовым набором. Укажите, что это известная проблема, которая возникла с несколькими другими людьми:
- > />
Код: Выделить всё
describe('I am on a page', () => {
// Bunch of other normal it blocks...
// Usual last 'it' block
it('checks the footer sections has working links and correct date', () => {
// footer section helper function:
checkFooterLinksAndDate(dateVar);
});
it('decoy it block', () => {
// I don't do a thing...
});
});
< /code>
Это работает (потому что пустые страницы открываются на «приманке It Block», но блок развертывания не запрашивает DOM, поэтому ничто не сломается), но, очевидно, не идеально или не является правильным решением. /> Переустановление кипариса < /li>
testIsolation: true
Код: Выделить всё
const { defineConfig } = require("cypress");
const fs = require('fs');
module.exports = defineConfig({
viewportWidth: 1400,
viewportHeight: 1000,
retries: {
runMode: 1,
openMode: 0
},
e2e: {
testIsolation: false,
baseUrl: 'https://www.ourdomain.com',
setupNodeEvents(on, config) {
on('task', {
log(message) {
console.log(message)
return null
},
fileExists(filename) {
if (fs.existsSync(filename)) {
return fs.readFileSync(filename, 'utf8')
}
return null
},
})
},
specPattern: ["cypress/e2e/**/*.spec.js"],
},
});
Подробнее здесь: https://stackoverflow.com/questions/797 ... lank-issue