I am working with NightwatchJS and I have a requirement to verify if all elements with a specific class name are visible or not. My code snippet looks something like this:
module.exports = {
//some tests
'page changes to English': (browser) => {
browser.click('label[for="switch-language"]').pause(1000);
browser.elements('css selector', '.fr', results => {
for (let i = 0; i < results; ++i) {
browser.expect.element(results[i]).to.be.visible;
}
});
}
};
However, upon running the test, I receive an output stating that No assertions ran.