Skip to content

Commit

Permalink
fix: revert to JS
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Mar 26, 2024
1 parent d0018b8 commit 6aca5fd
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 75 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The default helper is Playwright.

## Playwright

Use `codecept.conf.ts` to run tests with Playwright:
Use `codecept.conf.js` to run tests with Playwright:

```
npx codeceptjs run --steps
Expand Down
8 changes: 4 additions & 4 deletions codecept.conf.ts → codecept.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { setHeadlessWhen } = require('@codeceptjs/configure');
setHeadlessWhen(process.env.HEADLESS);

exports.config = {
tests: './todomvc-tests/**/*_test.ts',
tests: './todomvc-tests/**/*_test.js',
output: './output',
helpers: {
Playwright: {
Expand All @@ -15,19 +15,19 @@ exports.config = {
REST: {},

CustomHelper: {
require: './todomvc-tests/helpers/custom.helper.ts'
require: './todomvc-tests/helpers/custom.helper.js'
}
},

gherkin: {
features: './todomvc-tests/features/*.feature',
steps: [
'./todomvc-tests/step-definitions/create-todos.steps.ts'
'./todomvc-tests/step-definitions/create-todos.steps.js'
]
},

include: {
TodosPage: './todomvc-tests/pages/todos.page.ts'
TodosPage: './todomvc-tests/pages/todos.page.js'
},
bootstrap: null,
mocha: {},
Expand Down
6 changes: 3 additions & 3 deletions codecept.puppeteer.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ exports.config = {
REST: {},

CustomHelper: {
require: './todomvc-tests/helpers/custom.helper.ts'
require: './todomvc-tests/helpers/custom.helper.js'
}
},

gherkin: {
features: './todomvc-tests/features/*.feature',
steps: [
'./todomvc-tests/step-definitions/create-todos.steps.ts'
'./todomvc-tests/step-definitions/create-todos.steps.js'
]
},

include: {
TodosPage: './todomvc-tests/pages/todos.page.ts'
TodosPage: './todomvc-tests/pages/todos.page.js'
},
bootstrap: null,
mocha: {},
Expand Down
6 changes: 3 additions & 3 deletions codecept.testcafe.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ exports.config = {
REST: {},

CustomHelper: {
require: './todomvc-tests/helpers/custom.helper.ts'
require: './todomvc-tests/helpers/custom.helper.js'
}
},

gherkin: {
features: './todomvc-tests/features/*.feature',
steps: [
'./todomvc-tests/step-definitions/create-todos.steps.ts'
'./todomvc-tests/step-definitions/create-todos.steps.js'
]
},

include: {
TodosPage: './todomvc-tests/pages/todos.page.ts'
TodosPage: './todomvc-tests/pages/todos.page.js'
},
bootstrap: null,
mocha: {},
Expand Down
6 changes: 3 additions & 3 deletions codecept.webdriver.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ exports.config = {
REST: {},

CustomHelper: {
require: './todomvc-tests/helpers/custom.helper.ts'
require: './todomvc-tests/helpers/custom.helper.js'
}
},

gherkin: {
features: './todomvc-tests/features/*.feature',
steps: [
'./todomvc-tests/step-definitions/create-todos.steps.ts'
'./todomvc-tests/step-definitions/create-todos.steps.js'
]
},

include: {
TodosPage: './todomvc-tests/pages/todos.page.ts'
TodosPage: './todomvc-tests/pages/todos.page.js'
},

plugins: {
Expand Down
4 changes: 2 additions & 2 deletions steps.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types='codeceptjs' />
type TodosPage = typeof import('./todomvc-tests/pages/todos.page');
type CustomHelper = import('./todomvc-tests/helpers/custom.helper');
type TodosPage = typeof import('./todomvc-tests/pages/todos.page.js');
type CustomHelper = import('./todomvc-tests/helpers/custom.helper.js');

declare namespace CodeceptJS {
interface SupportObject { I: I, current: any, TodosPage: TodosPage }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = {
},

async seeNthTodoEquals(nthTodo, todo) {
let todos: any = await I.grabTextFrom('.todo-list li')
let todos = await I.grabTextFrom('.todo-list li')
if (typeof todos === 'string') {
todos = [todos]
}
Expand All @@ -104,62 +104,4 @@ module.exports = {
}
}

export function goto() {
throw new Error("Function not implemented.");
}
export function enterTodo(arg0: string) {
throw new Error("Function not implemented.");
}

export function seeNumberOfTodos(arg0: number) {
throw new Error("Function not implemented.");
}

export function seeNthTodoEquals(arg0: number, arg1: any) {
throw new Error("Function not implemented.");
}

export function seeEmptyTodoInput() {
throw new Error("Function not implemented.");
}

export function seeFooter() {
throw new Error("Function not implemented.");
}

export function editNthTodo(arg0: number, arg1: string) {
throw new Error("Function not implemented.");
}

export function deleteNthTodo(arg0: number) {
throw new Error("Function not implemented.");
}

export function clearCompleted() {
throw new Error("Function not implemented.");
}

export function filterCompleted() {
throw new Error("Function not implemented.");
}

export function markAllAsCompleted() {
throw new Error("Function not implemented.");
}

export function filterActive() {
throw new Error("Function not implemented.");
}

export function markNthAsCompleted(arg0: number) {
throw new Error("Function not implemented.");
}

export function refresh() {
throw new Error("Function not implemented.");
}

export function enterTodos(arg0: { title: string; completed: boolean; }[]) {
throw new Error("Function not implemented.");
}

File renamed without changes.
File renamed without changes.

0 comments on commit 6aca5fd

Please sign in to comment.