-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsteps_file.js
41 lines (33 loc) · 910 Bytes
/
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
// in this file you can append custom step methods to 'I' object
module.exports = function () {
return actor({
// Define custom steps here, use 'this' to access default methods of I.
// It is recommended to place a general 'login' function here.
seeMainWrapper () {
this.seeHeader()
this.seeFooter()
},
seeHeader () {
this.see('explorer')
},
seeFooter () {
this.see('© 2021 Diem Association')
},
navTo(pageName) {
this.see(pageName, 'a')
this.click(pageName)
},
goBack() {
this.executeScript('window.history.back();')
},
navigateToAddressPage(address) {
this.click(address)
this.seeInCurrentUrl(`/address/${address}`)
this.goBack()
},
seeInsideTestId(text, testId) {
// eslint-disable-next-line no-undef
locate(`[data-test-id=${testId}]`).withText(text)
}
})
}