I'm new to codeceptJS but best I can tell it simply does not work with yield.
'use strict';
Feature('Testing Begins');
Before((I) => {
I.resizeWindow(1500, 1000);
I.amOnPage('http://absolutenet.com');
});
Scenario('ANI testing', function*(I){
I.waitForText('bring your site to life');
I.amOnPage('http://www.absolutenet.com/');
let title = yield I.grabTitle();
console.info(title);
I.see('bogus text that is not there');
});
I have tried several of the grab commands as well as executeScript. I know the commands are working because for some reason one or two lines do execute after the yield so I can output the variable I am assigning. However, I can never use it because the browser closes and the script terminates. Even worse, I can put in a test that is obviously invalid (I.see('some bogus non existent text');) and the Scenario exits with a Success!
The above is live so you can execute it to see the problem. Testing with Linux and FireFox if that matters.
Can anyone give me an example of how to use yield and continue the test?
UPDATE: The developer says this is a bug and it will be fixed soon.