diff --git a/README.md b/README.md index 4dc0706..6c960ff 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/codecept.conf.ts b/codecept.conf.js similarity index 69% rename from codecept.conf.ts rename to codecept.conf.js index be584a3..5e5ad44 100644 --- a/codecept.conf.ts +++ b/codecept.conf.js @@ -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: { @@ -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: {}, diff --git a/codecept.puppeteer.conf.js b/codecept.puppeteer.conf.js index 9d6a528..2b29013 100644 --- a/codecept.puppeteer.conf.js +++ b/codecept.puppeteer.conf.js @@ -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: {}, diff --git a/codecept.testcafe.conf.js b/codecept.testcafe.conf.js index 54359de..ab59c1a 100644 --- a/codecept.testcafe.conf.js +++ b/codecept.testcafe.conf.js @@ -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: {}, diff --git a/codecept.webdriver.conf.js b/codecept.webdriver.conf.js index 7438abd..8d6f26f 100644 --- a/codecept.webdriver.conf.js +++ b/codecept.webdriver.conf.js @@ -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: { diff --git a/package.json b/package.json index 3d98d48..89893b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codeceptjs/examples", - "version": "3.5.12", + "version": "1.2.3", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/steps.d.ts b/steps.d.ts index b49f0f5..0016ed2 100644 --- a/steps.d.ts +++ b/steps.d.ts @@ -1,6 +1,6 @@ /// -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 } diff --git a/todomvc-tests/create-todos_test.ts b/todomvc-tests/create-todos_test.js similarity index 100% rename from todomvc-tests/create-todos_test.ts rename to todomvc-tests/create-todos_test.js diff --git a/todomvc-tests/edit-todos_test.ts b/todomvc-tests/edit-todos_test.js similarity index 100% rename from todomvc-tests/edit-todos_test.ts rename to todomvc-tests/edit-todos_test.js diff --git a/todomvc-tests/helpers/custom.helper.ts b/todomvc-tests/helpers/custom.helper.js similarity index 100% rename from todomvc-tests/helpers/custom.helper.ts rename to todomvc-tests/helpers/custom.helper.js diff --git a/todomvc-tests/mark-as-completed_test.ts b/todomvc-tests/mark-as-completed_test.js similarity index 100% rename from todomvc-tests/mark-as-completed_test.ts rename to todomvc-tests/mark-as-completed_test.js diff --git a/todomvc-tests/pages/todos.page.ts b/todomvc-tests/pages/todos.page.js similarity index 70% rename from todomvc-tests/pages/todos.page.ts rename to todomvc-tests/pages/todos.page.js index 0f0f1a2..60d1c7a 100644 --- a/todomvc-tests/pages/todos.page.ts +++ b/todomvc-tests/pages/todos.page.js @@ -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] } @@ -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."); -} diff --git a/todomvc-tests/persist-todos_test.ts b/todomvc-tests/persist-todos_test.js similarity index 100% rename from todomvc-tests/persist-todos_test.ts rename to todomvc-tests/persist-todos_test.js diff --git a/todomvc-tests/step-definitions/create-todos.steps.ts b/todomvc-tests/step-definitions/create-todos.steps.js similarity index 100% rename from todomvc-tests/step-definitions/create-todos.steps.ts rename to todomvc-tests/step-definitions/create-todos.steps.js diff --git a/todomvc-tests/todo-mvc_test.ts b/todomvc-tests/todo-mvc_test.js similarity index 100% rename from todomvc-tests/todo-mvc_test.ts rename to todomvc-tests/todo-mvc_test.js