Help completing Quality Assurance and Testing with Chai - Run Functional Tests using a Headless Browser II

Tell us what’s happening:
Hey all, I’m facing an issue with the final challenge of the Mocha/Chai module even with the provided solution I’m only getting 3 out of 5 tests succeeding. The test output is:

// running tests
You should assert that the text inside the element 'span#name' is 'Amerigo'.
You should assert that the text inside the element 'span#surname' is 'Vespucci'.
You should assert that the element 'span#dates' exist and its count is 1.
// tests completed

From searching the forum, it seems I’m not the only one facing this issue. As per instructions found in this post I tried updating the Zombie package and using promises, but to no avail.
I’m using the Glitch repo to complete this challenge.

Thanks is advance for any help resolving this!

Your code so far

  test('submit "surname" : "Vespucci" - write your e2e test...', function(done) {
     browser.fill("surname", "Vespucci").then(() => {
      browser.pressButton("submit", () => {
        browser.assert.success();
        browser.assert.text("span#name", "Amerigo");
        browser.assert.text("span#surname", "Vespucci");
        browser.assert.element("span#dates", 1);
        done();
      });
    });
  });

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0.

Challenge: Run Functional Tests using a Headless Browser II

Link to the challenge:

1 Like

I’m facing this issue as well!

2 Likes

I ended up skipping over this problem, did you find a solution?

1 Like

No solution yet. I’m going to deep dive into the FCC testing file sometime in the next few days to see if there’s a solution that can be made there. Will update :slight_smile:

Replace double quotes(") with single quotes(’) .