I couldn’t pass the last test with : the element ‘span#dates’ exist and its count is 1.
People can help me, please ?
It works on the console
But not after the solution link :
suite("Functional Tests with Zombie.js", function () {
const browser = new Browser();
suiteSetup(function(done) {
return browser.visit('/', done);
});
suite('"Famous Italian Explorers" form', function () {
// #5
test('submit "surname" : "Colombo" - write your e2e test...', function (done) {
browser.fill('surname','Colombo')
.pressButton('submit', function () {
browser.assert.success();
browser.assert.text('span#name', 'Cristoforo');
browser.assert.text('span#surname', 'Colombo');
browser.assert.element('span#dates', 1);
done();
});
});
// #6
test('submit "surname" : "Vespucci" - write your e2e test...', function (done) {
browser.fill('surname','Vespucci')
.pressButton('submit', ()=> {
browser.assert.success()
browser.assert.text('span#name','Amerigo')
browser.assert.text('span#surname','Vespucci')
browser.assert.element('span#dates', 1)
done();
});
});
});
})
solution: https://replit.com/@sebastiendelaun/boilerplate-mochachai-1
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Challenge: Run Functional Tests Using a Headless Browser II
Link to the challenge: