Can't pass "Run Functional Tests using a Headless Browser" challenge

Thanks. This worked for me. An alternative way to write it using Async:

browser.fill('surname', 'Colombo', async () => {
  browser.pressButton('submit', () => {
    browser.assert.text('span#name', 'Cristoforo');
    browser.assert.text('span#surname', 'Colombo');
    browser.assert.element('span#dates', 1);

Note: Sometimes it requires clicking Submit twice to get it to pass. First time passes all tests except for “All tests should pass.” and the second time gives all tests a checkmark. Not sure why.