Hi there,
I’ve been trying to resolve this issue for the past 3 hours, searched on the forums, tried different ways but I still keep failing the span#dates test on the two last exercises of the QA course, see pics below:
Here’s my code for the whole headless browser suite, which includes the #5 and #6 (the last two) exercises:
const Browser = require('zombie');
Browser.site = 'https://boilerplate-mochachai.anzorshengelia.repl.co'
suite('Functional Tests with Zombie.js', function () {
const browser = new Browser();
this.timeout(5000);
suiteSetup(function(done) {
return browser.visit('/', done() );
});
suite('Headless browser', function () {
test('should have a working "site" property', function() {
assert.isNotNull(browser.site);
});
});
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 the surname "Vespucci" in the HTML form', function (done) {
browser.fill("surname", "Vespucci").pressButton("submit", function () {
browser.assert.success();
browser.assert.text('span#name', 'Amerigo');
browser.assert.text('span#surname', 'Vespucci');
browser.assert.element('span#dates', 1);
done();
});
});
});
});
I’d appreciate help/tips on how to finally complete the challange.