Skip to content

Commit 6aca5fd

Browse files
committed
fix: revert to JS
1 parent d0018b8 commit 6aca5fd

14 files changed

+17
-75
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The default helper is Playwright.
1919

2020
## Playwright
2121

22-
Use `codecept.conf.ts` to run tests with Playwright:
22+
Use `codecept.conf.js` to run tests with Playwright:
2323

2424
```
2525
npx codeceptjs run --steps

codecept.conf.ts renamed to codecept.conf.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { setHeadlessWhen } = require('@codeceptjs/configure');
33
setHeadlessWhen(process.env.HEADLESS);
44

55
exports.config = {
6-
tests: './todomvc-tests/**/*_test.ts',
6+
tests: './todomvc-tests/**/*_test.js',
77
output: './output',
88
helpers: {
99
Playwright: {
@@ -15,19 +15,19 @@ exports.config = {
1515
REST: {},
1616

1717
CustomHelper: {
18-
require: './todomvc-tests/helpers/custom.helper.ts'
18+
require: './todomvc-tests/helpers/custom.helper.js'
1919
}
2020
},
2121

2222
gherkin: {
2323
features: './todomvc-tests/features/*.feature',
2424
steps: [
25-
'./todomvc-tests/step-definitions/create-todos.steps.ts'
25+
'./todomvc-tests/step-definitions/create-todos.steps.js'
2626
]
2727
},
2828

2929
include: {
30-
TodosPage: './todomvc-tests/pages/todos.page.ts'
30+
TodosPage: './todomvc-tests/pages/todos.page.js'
3131
},
3232
bootstrap: null,
3333
mocha: {},

codecept.puppeteer.conf.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ exports.config = {
1717
REST: {},
1818

1919
CustomHelper: {
20-
require: './todomvc-tests/helpers/custom.helper.ts'
20+
require: './todomvc-tests/helpers/custom.helper.js'
2121
}
2222
},
2323

2424
gherkin: {
2525
features: './todomvc-tests/features/*.feature',
2626
steps: [
27-
'./todomvc-tests/step-definitions/create-todos.steps.ts'
27+
'./todomvc-tests/step-definitions/create-todos.steps.js'
2828
]
2929
},
3030

3131
include: {
32-
TodosPage: './todomvc-tests/pages/todos.page.ts'
32+
TodosPage: './todomvc-tests/pages/todos.page.js'
3333
},
3434
bootstrap: null,
3535
mocha: {},

codecept.testcafe.conf.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ exports.config = {
1515
REST: {},
1616

1717
CustomHelper: {
18-
require: './todomvc-tests/helpers/custom.helper.ts'
18+
require: './todomvc-tests/helpers/custom.helper.js'
1919
}
2020
},
2121

2222
gherkin: {
2323
features: './todomvc-tests/features/*.feature',
2424
steps: [
25-
'./todomvc-tests/step-definitions/create-todos.steps.ts'
25+
'./todomvc-tests/step-definitions/create-todos.steps.js'
2626
]
2727
},
2828

2929
include: {
30-
TodosPage: './todomvc-tests/pages/todos.page.ts'
30+
TodosPage: './todomvc-tests/pages/todos.page.js'
3131
},
3232
bootstrap: null,
3333
mocha: {},

codecept.webdriver.conf.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ exports.config = {
1414
REST: {},
1515

1616
CustomHelper: {
17-
require: './todomvc-tests/helpers/custom.helper.ts'
17+
require: './todomvc-tests/helpers/custom.helper.js'
1818
}
1919
},
2020

2121
gherkin: {
2222
features: './todomvc-tests/features/*.feature',
2323
steps: [
24-
'./todomvc-tests/step-definitions/create-todos.steps.ts'
24+
'./todomvc-tests/step-definitions/create-todos.steps.js'
2525
]
2626
},
2727

2828
include: {
29-
TodosPage: './todomvc-tests/pages/todos.page.ts'
29+
TodosPage: './todomvc-tests/pages/todos.page.js'
3030
},
3131

3232
plugins: {

steps.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types='codeceptjs' />
2-
type TodosPage = typeof import('./todomvc-tests/pages/todos.page');
3-
type CustomHelper = import('./todomvc-tests/helpers/custom.helper');
2+
type TodosPage = typeof import('./todomvc-tests/pages/todos.page.js');
3+
type CustomHelper = import('./todomvc-tests/helpers/custom.helper.js');
44

55
declare namespace CodeceptJS {
66
interface SupportObject { I: I, current: any, TodosPage: TodosPage }
File renamed without changes.

todomvc-tests/pages/todos.page.ts renamed to todomvc-tests/pages/todos.page.js

+1-59
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = {
8282
},
8383

8484
async seeNthTodoEquals(nthTodo, todo) {
85-
let todos: any = await I.grabTextFrom('.todo-list li')
85+
let todos = await I.grabTextFrom('.todo-list li')
8686
if (typeof todos === 'string') {
8787
todos = [todos]
8888
}
@@ -104,62 +104,4 @@ module.exports = {
104104
}
105105
}
106106

107-
export function goto() {
108-
throw new Error("Function not implemented.");
109-
}
110-
export function enterTodo(arg0: string) {
111-
throw new Error("Function not implemented.");
112-
}
113-
114-
export function seeNumberOfTodos(arg0: number) {
115-
throw new Error("Function not implemented.");
116-
}
117-
118-
export function seeNthTodoEquals(arg0: number, arg1: any) {
119-
throw new Error("Function not implemented.");
120-
}
121-
122-
export function seeEmptyTodoInput() {
123-
throw new Error("Function not implemented.");
124-
}
125-
126-
export function seeFooter() {
127-
throw new Error("Function not implemented.");
128-
}
129-
130-
export function editNthTodo(arg0: number, arg1: string) {
131-
throw new Error("Function not implemented.");
132-
}
133-
134-
export function deleteNthTodo(arg0: number) {
135-
throw new Error("Function not implemented.");
136-
}
137-
138-
export function clearCompleted() {
139-
throw new Error("Function not implemented.");
140-
}
141-
142-
export function filterCompleted() {
143-
throw new Error("Function not implemented.");
144-
}
145-
146-
export function markAllAsCompleted() {
147-
throw new Error("Function not implemented.");
148-
}
149-
150-
export function filterActive() {
151-
throw new Error("Function not implemented.");
152-
}
153-
154-
export function markNthAsCompleted(arg0: number) {
155-
throw new Error("Function not implemented.");
156-
}
157-
158-
export function refresh() {
159-
throw new Error("Function not implemented.");
160-
}
161-
162-
export function enterTodos(arg0: { title: string; completed: boolean; }[]) {
163-
throw new Error("Function not implemented.");
164-
}
165107

File renamed without changes.

0 commit comments

Comments
 (0)