Test is passing on repl but failing on freecodecamp page

Tell us what’s happening:

The test is passing on the repl but it is failing on challenge submission page.
I don’t understand the error.

Your code so far

// assert that the text inside the element ‘span#name’ is ‘Cristoforo’
(‘span#name’, ‘Cristoforo’);
// assert that the text inside the element ‘span#surname’ is ‘Colombo’
(‘span#surname’, ‘Colombo’);
// assert that the element(s) ‘span#dates’ exist and their count is 1
browser.assert.element(‘span#dates’, 1);
// It’s an async test, so we have to call ‘done()’

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; SM-A515F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.116 Mobile Safari/537.36 EdgA/

Challenge: Run Functional Tests using a Headless Browser
Repl Link:https://repl.it/@bablu41951/boilerplate-mochachai#tests/2_functional-tests.js
Link to the challenge:

Hello there,

Seeing as the test is timing out, you are most likely going to get useful information from:

  1. The browser console on the /learn page.
  2. The REPL.it console

The time out error suggests there is an issue with your app. Specifically, the connection between freeCodeCamp, and your app.

Look for related errors in the consoles, then report back here, if you are still stuck.

Hope this helps

I checked every line, there are no errors in the console and reloaded freecodecamp submission page

This is what I see in the browser console:

Also, I am unable to get the api endpoint:

So, it might be useful updating the version of cors in your package.json to the latest stable release.

Hope this helps

I did that ,
added a stable version but its not working and repl is upgraded to latest version

Repl Version update prevented the working of the tests[headless browser],after the reload page accepted successfully

  • passed the test