There are two problems:
- In docs/Page_object_pattern/specs/login.js uses JavaScript to get the actual name, direct after we submit the login:
const actualUsername = await browser.execute( () => mw.config.get( 'wgUserName' ) );
We do not use the wdio built in wait and retry, so this can be a problem.
The other problem is in temporaryuseraccount.js:
await expect( await LoginPage.getActualUsername() ).toBe( username );
...
async getActualUsername() {
return browser.execute( () => mw.config.get( 'wgUserName' ) );
}The next test test against what is displayed on screen (using retry/wait) so we can probably just remove that expect.