QA certification: QA and Testing with Chai lesson 24 has a bug

As you can see I have this issue, and apparently this is something people been having since almost august 21:

It would be nice if they fix this or tell me why is it wrong

This is apparently an issue with using zombie on replit.
The workaround is to run the headless browser tests locally.
This is explained in the following thread:

TLDR: Try changing your url for Browser.site to ‘http://localhost:3000/ ’ (or whatever port your server is running on).

It looks like your suiteSetup() to initialize your headless browser is in the wrong place. Following the initial directions, I was able to pass this test and the next without issue or the other workarounds that have been suggested.

In the future, please post code or links to code (especially since yours is on replit) so that people can quickly debug and modify your code for testing. We can’t do that with images of code.

Perhaps I was doing something wrong with mine too because my Zombie tests fail unless I run them locally: boilerplate-mochachai - Replit


const Browser = require('zombie');
Browser.site = 'https://boilerplate-mochachai.juansantos17.repl.co';

suite('Functional Tests with Zombie.js', function() {  
  const browser = new Browser();

  suite('Headless browser', function() {
    test('should have a working "site" property', function() {
      suiteSetup(function(done) {
        return browser.visit('/', done);
      });
    });
  });
  
  suite('"Famous Italian Explorers" form', function () {
    // #5
    test('Submit the surname "Colombo" in the HTML form', 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();
        });
    });
  });
});

Thats my code, as for the error:
image

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