Skip to content

Commit 7651b91

Browse files
author
DavertMik
committed
Merge branch '3.x' into fix/timeout-fixes-2
2 parents c982bf3 + 7b97a55 commit 7651b91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2249
-1377
lines changed

.github/workflows/appiumV2_Android.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ env:
99
CI: true
1010
# Force terminal colors. @see https://www.npmjs.com/package/colors
1111
FORCE_COLOR: 1
12+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
13+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
1214

1315
jobs:
1416
appium:
@@ -20,17 +22,23 @@ jobs:
2022
test-suite: ['other', 'quick']
2123

2224
steps:
23-
- uses: actions/checkout@v4
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
- run: npm i --force
29-
env:
30-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
31-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
32-
- run: "npm run test:appium-${{ matrix.test-suite }}"
33-
env: # Or as an environment variable
34-
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
35-
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
25+
- uses: actions/checkout@v4
3626

27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- run: npm i
33+
env:
34+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
35+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
36+
37+
- name: Upload APK to Sauce Labs
38+
run: |
39+
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
40+
--location --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \
41+
--form 'payload=@test/data/mobile/selendroid-test-app-0.17.0.apk' \
42+
--form 'name="selendroid-test-app-0.17.0.apk"'
43+
44+
- run: 'npm run test:appium-${{ matrix.test-suite }}'

.github/workflows/appiumV2_iOS.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ env:
99
CI: true
1010
# Force terminal colors. @see https://www.npmjs.com/package/colors
1111
FORCE_COLOR: 1
12+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
13+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
1214

1315
jobs:
1416
appium:
@@ -29,8 +31,12 @@ jobs:
2931
env:
3032
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
3133
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
32-
- run: "npm run test:ios:appium-${{ matrix.test-suite }}"
33-
env: # Or as an environment variable
34-
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
35-
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
3634

35+
- name: Upload APK to Sauce Labs
36+
run: |
37+
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
38+
--location --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \
39+
--form 'payload=@test/data/mobile/TestApp-iphonesimulator.zip' \
40+
--form 'name="TestApp-iphonesimulator.zip"'
41+
42+
- run: 'npm run test:ios:appium-${{ matrix.test-suite }}'

.github/workflows/docker.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ on:
44
push:
55
branches:
66
- 3.x
7-
release:
8-
types: [published]
97

108
jobs:
119
push_to_registry:
1210
name: Build and push Docker image to Docker Hub
1311
runs-on: ubuntu-22.04
12+
if: startsWith(github.event.ref_name, 'release-')
1413

1514
steps:
1615
- name: Check out the repo with the latest code
@@ -27,7 +26,11 @@ jobs:
2726

2827
- name: Get the current tag
2928
id: currentTag
30-
run: git fetch --prune --unshallow && TAG=$(git describe --tags --abbrev=0) && echo $TAG && echo "TAG="$TAG >> "$GITHUB_ENV"
29+
run: |
30+
git fetch --prune --unshallow
31+
TAG=$(git describe --tags --abbrev=0)
32+
echo $TAG
33+
echo "TAG=$TAG" >> $GITHUB_ENV
3134
3235
- name: Build and push Docker image
3336
uses: docker/build-push-action@v6
@@ -36,4 +39,4 @@ jobs:
3639
push: true
3740
tags: |
3841
${{ secrets.DOCKERHUB_REPOSITORY }}:latest
39-
${{ secrets.DOCKERHUB_REPOSITORY }}:${{ env.TAG }}
42+
${{ secrets.DOCKERHUB_REPOSITORY }}:${{ env.TAG }}

.github/workflows/playwright.yml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,41 @@ env:
1515

1616
jobs:
1717
build:
18-
1918
runs-on: ubuntu-latest
2019

2120
strategy:
2221
matrix:
2322
node-version: [20.x]
2423

2524
steps:
26-
- uses: actions/checkout@v4
27-
- name: Use Node.js ${{ matrix.node-version }}
28-
uses: actions/setup-node@v4
29-
with:
30-
node-version: ${{ matrix.node-version }}
31-
- uses: shivammathur/setup-php@v2
32-
with:
33-
php-version: 7.4
34-
- name: npm install
35-
run: |
36-
npm i --force
37-
env:
38-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
39-
- name: Install browsers and deps
40-
run: npx playwright install && npx playwright install-deps
41-
- name: start a server
42-
run: "php -S 127.0.0.1:8000 -t test/data/app &"
43-
- name: run chromium tests
44-
run: "./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
45-
- name: run chromium with restart==browser tests
46-
run: "BROWSER_RESTART=browser ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
47-
- name: run chromium with restart==session tests
48-
run: "BROWSER_RESTART=session ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
49-
- name: run firefox tests
50-
run: "BROWSER=firefox node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
51-
- name: run webkit tests
52-
run: "BROWSER=webkit node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
53-
- name: run chromium unit tests
54-
run: ./node_modules/.bin/mocha test/helper/Playwright_test.js --timeout 5000
25+
- uses: actions/checkout@v4
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
- uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: 7.4
33+
- name: npm install
34+
run: |
35+
npm i --force
36+
env:
37+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
38+
- name: Install browsers and deps
39+
run: npx playwright install && npx playwright install-deps
40+
- name: check
41+
run: './bin/codecept.js check -c test/acceptance/codecept.Playwright.js'
42+
- name: start a server
43+
run: 'php -S 127.0.0.1:8000 -t test/data/app &'
44+
- name: run chromium tests
45+
run: './bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
46+
- name: run chromium with restart==browser tests
47+
run: 'BROWSER_RESTART=browser ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
48+
- name: run chromium with restart==session tests
49+
run: 'BROWSER_RESTART=session ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
50+
- name: run firefox tests
51+
run: 'BROWSER=firefox node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
52+
- name: run webkit tests
53+
run: 'BROWSER=webkit node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
54+
- name: run chromium unit tests
55+
run: ./node_modules/.bin/mocha test/helper/Playwright_test.js --timeout 5000

.github/workflows/webdriver.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
3939
- name: start a server
4040
run: 'php -S 127.0.0.1:8000 -t test/data/app &'
41+
- name: Check CodeceptJS can be started
42+
run: './bin/codecept.js check -c test/acceptance/codecept.WebDriver.js'
4143
- name: run unit tests
4244
run: ./node_modules/.bin/mocha test/helper/WebDriver_test.js --exit
4345
- name: run tests

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
[<img src="https://img.shields.io/badge/slack-@codeceptjs-purple.svg?logo=slack">](https://join.slack.com/t/codeceptjs/shared_invite/enQtMzA5OTM4NDM2MzA4LWE4MThhN2NmYTgxNTU5MTc4YzAyYWMwY2JkMmZlYWI5MWQ2MDM5MmRmYzZmYmNiNmY5NTAzM2EwMGIwOTNhOGQ) [<img src="https://img.shields.io/badge/discourse-codeceptjs-purple">](https://codecept.discourse.group) [![NPM version][npm-image]][npm-url] [<img src="https://img.shields.io/badge/dockerhub-images-blue.svg?logo=codeceptjs">](https://hub.docker.com/r/codeceptjs/codeceptjs)
44
[![AI features](https://img.shields.io/badge/AI-features?logo=openai&logoColor=white)](https://github.com/codeceptjs/CodeceptJS/edit/3.x/docs/ai.md) [![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
55

6-
Build Status:
6+
## Build Status
77

8-
Appium Helper:
9-
[![Appium V2 Tests - Android](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appiumV2_Android.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appiumV2_Android.yml)
10-
11-
Web Helper:
12-
[![Playwright Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/playwright.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/playwright.yml)
13-
[![Puppeteer Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml)
14-
[![WebDriver Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml)
15-
[![TestCafe Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/testcafe.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/testcafe.yml)
8+
| Type | Engine | Status |
9+
| --------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
10+
| 🌐 Web | Playwright | [![Playwright Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/playwright.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/playwright.yml) |
11+
| 🌐 Web | Puppeteer | [![Puppeteer Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml) |
12+
| 🌐 Web | WebDriver | [![WebDriver Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml) |
13+
| 🌐 Web | TestCafe | [![TestCafe Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/testcafe.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/testcafe.yml) |
14+
| 📱 Mobile | Appium | [![Appium V2 Tests - Android](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appiumV2_Android.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appiumV2_Android.yml) |
1615

1716
# CodeceptJS [![Made in Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)
1817

@@ -292,7 +291,7 @@ When using Typescript, replace `module.exports` with `export` for autocompletion
292291

293292
Thanks to our awesome contributors! 🎉
294293
<a href="https://github.com/codeceptjs/codeceptjs/graphs/contributors">
295-
<img src="https://contrib.rocks/image?repo=codeceptjs/codeceptjs" />
294+
<img src="https://contrib.rocks/image?repo=codeceptjs/codeceptjs" />
296295
</a>
297296

298297
Made with [contrib.rocks](https://contrib.rocks).

bin/codecept.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ program
5858
.description('Creates dummy config in current dir or [path]')
5959
.action(errorHandler(require('../lib/command/init')))
6060

61+
program
62+
.command('check')
63+
.option(commandFlags.config.flag, commandFlags.config.description)
64+
.description('Checks configuration and environment before running tests')
65+
.option('-t, --timeout [ms]', 'timeout for checks in ms, 20000 by default')
66+
.action(errorHandler(require('../lib/command/check')))
67+
6168
program
6269
.command('migrate [path]')
6370
.description('Migrate json config to js config in current dir or [path]')

0 commit comments

Comments
 (0)