HI FCC,
Another issue
I literally have followed all instructions and this challenge is not working for me.
So the example clearly has the following code …
// ### EXAMPLE ###
test('#example - submit the input "surname" : "Polo"', function(done) {
browser
.fill('surname', 'Polo')
.pressButton('submit', function(){
// pressButton is ## Async ##.
// It waits for the ajax call to complete...
// assert that status is OK 200
browser.assert.success();
// assert that the text inside the element 'span#name' is 'Marco'
browser.assert.text('span#name', 'Marco');
// assert that the text inside the element 'span#surname' is 'Polo'
browser.assert.text('span#surname', 'Polo');
// assert that the element(s) 'span#dates' exist and their count is 1
browser.assert.element('span#dates', 1);
done(); // It's an async test, so we have to call 'done()''
});
});
… so what I have done is following …
test('submit "surname" : "Colombo" - write your e2e test...', function(done) {
// fill the form...
// then submit it pressing 'submit' button.
//
// in the callback...
// assert that status is OK 200
// assert that the text inside the element 'span#name' is 'Cristoforo'
// assert that the text inside the element 'span#surname' is 'Colombo'
// assert that the element(s) 'span#dates' exist and their count is 1
browser
.fill('surname', 'Colombo')
.pressButton('submit', function(){
/** YOUR TESTS HERE, Don't forget to remove assert.fail() **/
// pressButton is Async. Waits for the ajax call to complete...
// assert that status is OK 200
browser.assert.success();
// assert that the text inside the element 'span#name' is 'Cristoforo'
browser.assert.text('span#name', 'Cristoforo');
// assert that the text inside the element 'span#surname' is 'Colombo'
browser.assert.text('span#surname', 'Colombo');
// assert that the element(s) 'span#dates' exist and their count is 1
browser.assert.element('span#dates', 1);
done(); // It's an async test, so we have to call 'done()''
});
//
});
… and it is not working. I am not sure what I have done other than entering the values that were in the description of what we are supposed to do so if someone can, please, help me out I would greatly appreciate it.