-
Notifications
You must be signed in to change notification settings - Fork 3
/
steps_file.js
44 lines (38 loc) · 1.19 KB
/
steps_file.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'use strict';
module.exports = function () {
return actor({
sites: {
storefront: 'demo.virtocommerce.com',
vccom: 'vccom.com/'
},
credentials: {
user: '[email protected]',
password: 'aA111111'
},
loginForm: {
selector: '#customer_login',
signInLink: '#customer_login_link',
user: '#customer_user_name',
password: '#customer_password',
loginButton: 'input[type="submit"]'
},
customerInfo: {
email: '[email protected]',
firstName: 'E2E',
lastName: 'customer',
company: 'E2E Company',
address: 'E2E Address',
city: 'E2E City',
postalCode: '555'
},
signIn: function () {
this.wait(15);
this.click(this.loginForm.signInLink);
within(this.loginForm.selector, () => {
this.fillField(this.loginForm.user, this.credentials.user);
this.fillField(this.loginForm.password, this.credentials.password);
this.click(this.loginForm.loginButton);
});
}
});
};