Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async login(email, password) {
return await t
.typeText(this.email.control, email)
.typeText(this.password.control, password)
.click(this.signinButton);
}
};
const someUser = Role('http://localhost:3000/fixtures/api/es-next/roles/pages/login-page.html', async() => {
await t
.typeText('input[name="name"]', 'SomeUser')
.click('input[value="LogIn"]');
}, { preserveUrl: false });
async setValue (value) {
await t.typeText(Selector(this.selector), value)
}
export async function enterSearchTerm(term: string) {
await t.typeText(selectors.gtxInputWithLabel('name'), term);
}
const typeIfDefined = async (prop: string) => {
if ((user as any)[prop]) {
await t.typeText(formControlInput(prop), (user as any)[prop]);
}
};
await typeIfDefined('userName');
async performLogin(putEmail, putPassword) {
await t
.typeText(this.email, putEmail)
.typeText(this.password, putPassword)
.click(this.submitButton);
}
}
async enterValue(value) {
await t.typeText(this.valueInput.control, value);
}
export async function login(username: string, password: string, newPassword?: string) {
await t
.typeText(formControlInput('username'), username, { replace: true })
.typeText(formControlInput('password'), password, { replace: true });
if (newPassword) {
await t
.typeText(formControlInput('newPassword'), newPassword, { replace: true })
.typeText(formControlInput('newPasswordRepeat'), newPassword, { replace: true });
}
await t.click(Selector('button').withExactText('LOG IN'));
}
async login(username, password) {
await t
.typeText("#login_email", username)
.typeText("#login_password", password)
.click(".btn-login")
.expect(Selector("#body_div").exists).ok()
await this.add_rubik_font()
await this.hide_testcafe_bar()
},
async createProject(name: string, key: string, group: string) {
await t
.typeText(this.projectNameInput, name)
.expect(this.projectKeyInput.value).eql(key)
.typeText(this.groupSelect, group).pressKey('enter')
.expect(this.getLocation()).eql(config.baseUrl + '/project/' + key);
}
}