Skip to content

Commit 75a7f48

Browse files
committed
fix more runner tests
1 parent aad2233 commit 75a7f48

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

test/data/sandbox/configs/definitions/po/custom_steps.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Need for testing pages
2-
module.exports = () => {
2+
import { actor } from '../../../../../../lib/index.js';
3+
4+
export default () => {
35
return actor({
46
openDir() {
57
this.amInPath('.');

test/data/sandbox/configs/pageObjects/pages/classpage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const { I } = inject()
2-
31
class PageObject {
42
constructor() {
53
this.method1 = () => {
@@ -8,10 +6,12 @@ class PageObject {
86
}
97

108
async type(s) {
9+
const { I } = inject()
1110
await I.printMessage(s)
1211
}
1312

1413
purgeDomains() {
14+
const { I } = inject()
1515
I.printMessage('purgeDomains')
1616
}
1717
}

test/data/sandbox/support/bdd_helper.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class CheckoutHelper extends Helper {
3535
}
3636

3737
addProduct(name, price) {
38+
if (typeof this.num !== 'number') this.num = 0
39+
if (typeof this.sum !== 'number') this.sum = 0
40+
this.num++
3841
this.sum += price
3942
}
4043

test/data/sandbox/support/custom_steps.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
module.exports = () => {
1+
import { actor } from '../../../../lib/index.js';
2+
3+
export default () => {
24
return actor({
35
openDir() {
46
this.amInPath('.');

test/data/sandbox/support/my_page.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { actor } from '../../../../lib/index.js';
2+
13
let I;
24

3-
module.exports = {
5+
export default {
46

57
_init() {
68
I = actor();

test/data/sandbox/support/second_page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
secondPageMethod() {
33
console.log('secondPageMethod');
44
},

0 commit comments

Comments
 (0)