I can’t complete one of the last lessons in the Quality Assurance course: ’ Run Functional Tests using a Headless Browser’
Everything runs smoothly except for browser.assert.text(). I’ve tried changing the assertion to ‘.element’ and ‘.text’ and even ‘.element.text’ and have not succeeded. Here is the proposed solution, which also doesn’t work for me: freeCodeCamp Challenge Guide: Run Functional Tests using a Headless Browser
const Browser = require("zombie");
Browser.site = 'https://boilerplate-mochachai.nikkipeel.repl.co';
suite("e2e Testing 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();
});
});
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
.
Challenge: Run Functional Tests using a Headless Browser
Link to the challenge: