Run Functional Tests using a Headless Browser. Can't pass the tests

I’ve been doing this challenge https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-using-a-headless-browser
can’t pass the test called ‘All tests should pass’ even though the rest of them are passed
Here’s my code

test('submit "surname" : "Colombo" - write your e2e test...', function (done) {
      let browser = new Browser()
      browser.fill("surname", "Colombo").pressButton("submit", () => {
        browser.assert.success();
        browser.assert.text('span#name','Cristoforo')
        browser.assert.text('span#surname','Colombo')
        browser.assert.elements('span#dates',1)
        done();
      });
    });

and logs say: AssertionError [ERR_ASSERTION]: No open window with an HTML document
I tried to google it but couldn’t find anything useful

Hello there,

Would you mind sharing all of your code? It is difficult to work with so little.

The errors suggests there is an issue with the way the Browser has been set up. Did you correctly add your app URL to the site property?

here Glitch :・゚✧

It appears as though you missed the lesson before this: https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.