@codeceptjs/examples
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -20,3 +20,3 @@ const { setHeadlessWhen } = require('@codeceptjs/configure'); | ||
CustomHelper: { | ||
require: './todomvc-tests/helpers/custom.helper.js' | ||
require: './todomvc-tests/helpers/custom.helper.ts' | ||
} | ||
@@ -28,3 +28,3 @@ }, | ||
steps: [ | ||
'./todomvc-tests/step-definitions/create-todos.steps.js' | ||
'./todomvc-tests/step-definitions/create-todos.steps.ts' | ||
] | ||
@@ -34,3 +34,3 @@ }, | ||
include: { | ||
TodosPage: './todomvc-tests/pages/todos.page.js' | ||
TodosPage: './todomvc-tests/pages/todos.page.ts' | ||
}, | ||
@@ -40,2 +40,2 @@ bootstrap: null, | ||
name: 'codecept demo tests' | ||
} | ||
} |
@@ -10,3 +10,3 @@ const { setHeadlessWhen } = require('@codeceptjs/configure'); | ||
TestCafe: { | ||
url: 'http://localhost', | ||
url: 'http://localhost', | ||
browser: 'chrome', | ||
@@ -19,3 +19,3 @@ show: true, | ||
CustomHelper: { | ||
require: './todomvc-tests/helpers/custom.helper.js' | ||
require: './todomvc-tests/helpers/custom.helper.ts' | ||
} | ||
@@ -27,3 +27,3 @@ }, | ||
steps: [ | ||
'./todomvc-tests/step-definitions/create-todos.steps.js' | ||
'./todomvc-tests/step-definitions/create-todos.steps.ts' | ||
] | ||
@@ -33,3 +33,3 @@ }, | ||
include: { | ||
TodosPage: './todomvc-tests/pages/todos.page.js' | ||
TodosPage: './todomvc-tests/pages/todos.page.ts' | ||
}, | ||
@@ -39,2 +39,2 @@ bootstrap: null, | ||
name: 'codecept demo tests' | ||
} | ||
} |
@@ -17,3 +17,3 @@ const { setHeadlessWhen } = require('@codeceptjs/configure'); | ||
CustomHelper: { | ||
require: './todomvc-tests/helpers/custom.helper.js' | ||
require: './todomvc-tests/helpers/custom.helper.ts' | ||
} | ||
@@ -25,3 +25,3 @@ }, | ||
steps: [ | ||
'./todomvc-tests/step-definitions/create-todos.steps.js' | ||
'./todomvc-tests/step-definitions/create-todos.steps.ts' | ||
] | ||
@@ -31,3 +31,3 @@ }, | ||
include: { | ||
TodosPage: './todomvc-tests/pages/todos.page.js' | ||
TodosPage: './todomvc-tests/pages/todos.page.ts' | ||
}, | ||
@@ -40,3 +40,3 @@ | ||
} | ||
}, | ||
}, | ||
@@ -46,2 +46,2 @@ bootstrap: null, | ||
name: 'codecept demo tests' | ||
} | ||
} |
{ | ||
"name": "@codeceptjs/examples", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"main": "index.js", | ||
@@ -11,3 +11,5 @@ "scripts": { | ||
"license": "ISC", | ||
"dependencies": {}, | ||
"dependencies": { | ||
"ts-node": "10.9.2" | ||
}, | ||
"repository": { | ||
@@ -26,4 +28,4 @@ "type": "git", | ||
"@wdio/selenium-standalone-service": "^5.16.10", | ||
"codeceptjs": "^3.0.0-beta.2", | ||
"playwright": "^1.0.1", | ||
"codeceptjs": "3.5.12", | ||
"playwright": "1.41.2", | ||
"puppeteer": "^2.0.0", | ||
@@ -30,0 +32,0 @@ "testcafe": "^1.7.0", |
This repo contains tests for TodoMVC application. | ||
Tests can be executed via different backends. | ||
Tests can be executed via different helpers. | ||
@@ -8,20 +8,17 @@ ![](todo.png) | ||
This is a playground for your first steps in testing, so instead of installing it from NPM it is recommended to clone it from repo instead. | ||
This is a playground for your first steps in testing, so instead of installing it from NPM it is recommended to clone it from repo instead and then install the dependencies: | ||
1. Clone this repository. | ||
2. Install dependencies: | ||
``` | ||
npm i | ||
git clone git@github.com:codecept-js/examples.git codeceptjs-examples && cd codeceptjs-examples && npm i | ||
``` | ||
This will install codeceptjs with puppeteer, webdriverio & testcafe packages. | ||
This will install CodeceptJS with Puppeteer, WebdriverIO & TestCafe packages. | ||
# Running Tests | ||
Default helper is Playwright. | ||
The default helper is Playwright. | ||
## Playwright | ||
Use `codecept.conf.js` to run tests with Playwright: | ||
Use `codecept.conf.ts` to run tests with Playwright: | ||
@@ -32,15 +29,2 @@ ``` | ||
Run tests in headless mode: | ||
``` | ||
HEADLESS=true npx codeceptjs run --steps | ||
``` | ||
Run tests in parallel with 3 workers (headless mode): | ||
``` | ||
HEADLESS=true npx codeceptjs run-workers 3 | ||
``` | ||
## Puppeteer | ||
@@ -51,37 +35,14 @@ | ||
``` | ||
npx codeceptjs run --steps -c codecept.webdriver.conf.js | ||
npx codeceptjs run --steps -c codecept.puppeteer.conf.js | ||
``` | ||
Run tests in headless mode: | ||
``` | ||
HEADLESS=true npx codeceptjs run --steps -c codecept.webdriver.conf.js | ||
``` | ||
## WebdriverIO | ||
Run tests in parallel with 3 workers (headless mode): | ||
Use `codecept.webdriver.conf.js` to run tests with WebdriverIO in Chrome: | ||
``` | ||
HEADLESS=true npx codeceptjs run-workers 3 -c codecept.webdriver.conf.js | ||
``` | ||
## WebDriver | ||
Use `codecept.webdriver.conf.js` to run tests with WebDriver in Chrome: | ||
``` | ||
npx codeceptjs run -c codecept.webdriver.conf.js --steps | ||
``` | ||
Run tests in headless mode: | ||
``` | ||
HEADLESS=true npx codeceptjs run -c codecept.webdriver.conf.js --steps | ||
``` | ||
Run tests in parallel with 3 workers (headless mode): | ||
``` | ||
HEADLESS=true npx codeceptjs run-workers 3 -c codecept.webdriver.conf.js | ||
``` | ||
## TestCafe | ||
@@ -95,12 +56,16 @@ | ||
## Headless Mode | ||
Run tests in headless mode: | ||
``` | ||
HEADLESS=true npx codeceptjs run -c codecept.testcafe.conf.js --steps | ||
HEADLESS=true npx codeceptjs run --steps | ||
``` | ||
Run tests in parallel with 3 workers (headless mode): | ||
## Parallel Execution | ||
Run tests in parallel with 3 workers: | ||
``` | ||
HEADLESS=true npx codeceptjs run-workers 3 -c codecept.testcafe.conf.js | ||
npx codeceptjs run-workers 3 | ||
``` | ||
@@ -107,0 +72,0 @@ |
{ | ||
"compilerOption": { | ||
"allowJs": true | ||
} | ||
} | ||
"ts-node": { | ||
"files": true | ||
}, | ||
"compilerOptions": { | ||
"target": "es2018", | ||
"lib": ["es2018", "DOM"], | ||
"esModuleInterop": true, | ||
"module": "commonjs", | ||
"strictNullChecks": false, | ||
"types": ["codeceptjs", "node"], | ||
"declaration": true, | ||
"skipLibCheck": true, | ||
"moduleDetection": "force" | ||
}, | ||
"exclude": ["node_modules"] | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1000978
21
519
3
1
77
1
+ Addedts-node@10.9.2
+ Added@cspotcode/source-map-support@0.8.1(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.9(transitive)
+ Added@tsconfig/node10@1.0.11(transitive)
+ Added@tsconfig/node12@1.0.11(transitive)
+ Added@tsconfig/node14@1.0.3(transitive)
+ Added@tsconfig/node16@1.0.4(transitive)
+ Added@types/node@22.9.3(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-walk@8.3.4(transitive)
+ Addedarg@4.1.3(transitive)
+ Addedcreate-require@1.1.1(transitive)
+ Addeddiff@4.0.2(transitive)
+ Addedmake-error@1.3.6(transitive)
+ Addedts-node@10.9.2(transitive)
+ Addedtypescript@5.7.2(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedv8-compile-cache-lib@3.0.1(transitive)
+ Addedyn@3.1.1(transitive)