@codeceptjs/examples
Advanced tools
Comparing version
@@ -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 @@  | ||
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
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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1000978
0.25%21
10.53%519
16.11%3
-40%1
Infinity%77
-31.25%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added