eac4bb2875
- Using "Roles" to log users - Adding seemingly useless import statement but important for code completion
21 lines
773 B
TypeScript
21 lines
773 B
TypeScript
import { Role } from 'testcafe';
|
|
|
|
export const userAlice = Role('http://play.workadventure.localhost/', async t => {
|
|
await t
|
|
.typeText('input[name="loginSceneName"]', 'Alice')
|
|
.click('button.loginSceneFormSubmit')
|
|
.click('button.selectCharacterButtonRight')
|
|
.click('button.selectCharacterButtonRight')
|
|
.click('button.selectCharacterSceneFormSubmit')
|
|
.click('button.letsgo');
|
|
});
|
|
|
|
export const userBob = Role('http://play.workadventure.localhost/', async t => {
|
|
await t
|
|
.typeText('input[name="loginSceneName"]', 'Bob')
|
|
.click('button.loginSceneFormSubmit')
|
|
.click('button.selectCharacterButtonRight')
|
|
.click('button.selectCharacterSceneFormSubmit')
|
|
.click('button.letsgo');
|
|
});
|