Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/learn/information-security-and-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-using-a-headless-browser
My Glittch
I don’t understand why this test doesn’t run
test('submit "surname" : "Colombo" - write your e2e test...', function(done) {
// fill the form...
// then submit it pressing 'submit' button.
//
// in the callback...
// assert that status is OK 200
// assert that the text inside the element 'span#name' is 'Cristoforo'
// assert that the text inside the element 'span#surname' is 'Colombo'
// assert that the element(s) 'span#dates' exist and their count is 1
browser
.fill('surname', 'Colombo')
.pressButton('submit', function(){
/** YOUR TESTS HERE, Don't forget to remove assert.fail() **/
// pressButton is Async. Waits for the ajax call to complete...
// assert that status is OK 200
browser.assert.success();
// assert that the text inside the element 'span#name' is 'Marco'
browser.assert.text('span#name', 'Cristoforo');
// assert that the text inside the element 'span#surname' is 'Polo'
browser.assert.text('span#surname', 'Colombo');
// assert that the element(s) 'span#dates' exist and their count is 1
browser.assert.element('span#dates', 1);
assert.fail();
done(); // It's an async test, so we have to call 'done()''
});
//
});