Skip to content

Commit e3bde89

Browse files
authored
Merge branch '4.x' into empty-folder-4.x
2 parents f58de8d + f461b3b commit e3bde89

File tree

554 files changed

+30184
-31587
lines changed

Some content is hidden

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

554 files changed

+30184
-31587
lines changed

.circleci/build.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

.circleci/config.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.circleci/test.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ Go over the steps in [this](https://github.com/firstcontributions/first-contribu
77
To start you need:
88

99
1. Fork and clone the repo.
10-
2. Run `npm i --force --omit=optional` to install all required libraries
10+
2. Run `npm i --force` to install all required libraries
1111
3. Do the changes.
1212
4. Add/Update Test (if possible)
1313
5. Update documentation
14-
6. Run `npm run docs` if you change the documentation
15-
7. Commit and Push to your fork
16-
8. Make Pull Request
14+
6. Run `npm run def` to generate types
15+
7. Run `npm run docs` if you change the documentation
16+
8. Commit and Push to your fork
17+
9. Make Pull Request
1718

1819
To run codeceptjs from this repo use:
1920

@@ -27,7 +28,6 @@ To run examples:
2728
node bin/codecept.js run -c examples
2829
```
2930

30-
3131
Depending on a type of change you should do the following.
3232

3333
## Debugging
@@ -44,12 +44,12 @@ Please keep in mind that CodeceptJS have **unified API** for Playwright, WebDriv
4444

4545
### Updating Playwright | Puppeteer | WebDriver
4646

47-
*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! *
47+
_Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! _
4848

4949
Working test is highly appreciated. To run the test suite you need:
5050

51-
* selenium server + chromedriver
52-
* PHP installed
51+
- selenium server + chromedriver
52+
- PHP installed
5353

5454
To launch PHP demo application run:
5555

@@ -82,7 +82,7 @@ http://localhost:8000/form/myexample
8282

8383
### Updating REST | ApiDataFactory
8484

85-
*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required!*
85+
_Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required!_
8686

8787
Adding a test is highly appreciated.
8888

@@ -96,7 +96,7 @@ Edit a test at `test/rest/REST_test.js` or `test/rest/ApiDataFactory_test.js`
9696

9797
## Appium
9898

99-
*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! *
99+
_Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! _
100100

101101
It is recommended to run mobile tests on CI.
102102
So do the changes, make pull request, see the CI status.
@@ -211,6 +211,7 @@ docker-compose run --rm test-helpers test/rest
211211
```
212212

213213
#### Run acceptance tests
214+
214215
To that we provide three separate services respectively for WebDriver, Nightmare and Puppeteer tests:
215216

216217
```sh
@@ -235,11 +236,13 @@ And now every command based on `test-helpers` service will use node 9.4.0. The
235236
same argument can be passed when building unit and acceptance tests services.
236237

237238
### CI flow
239+
238240
We're currently using a bunch of CI services to build and test codecept in
239241
different environments. Here's short summary of what are differences between
240242
separate services
241243

242244
#### CircleCI
245+
243246
Here we use CodeceptJS docker image to build and execute tests inside it. We
244247
start with building Docker container based on Dockerfile present in main project
245248
directory. Then we run (in this order) unit tests, all helpers present in

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ updates:
55
directory: '/'
66
schedule:
77
interval: 'weekly'
8-
target-branch: '3.x'
8+
target-branch: '4.x'
99
# npm
1010
- package-ecosystem: 'npm'
1111
directory: '/'
1212
schedule:
1313
interval: 'weekly'
14-
target-branch: '3.x'
14+
target-branch: '4.x'
1515
ignore:
1616
- dependency-name: 'escape-string-regexp'
1717
versions: ['>=5.0']

.github/workflows/acceptance-tests.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
steps:
2525
# Checkout the repository
2626
- name: Checkout Repository
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@v5
2828

2929
# Install Docker Compose
3030
- name: Install Docker Compose
3131
run: |
32-
sudo apt-get update
32+
sudo apt-get update --allow-releaseinfo-change
3333
sudo apt-get install -y docker-compose
3434
3535
# Run rest tests using docker-compose
@@ -41,8 +41,3 @@ jobs:
4141
- name: Run WebDriverIO Acceptance Tests
4242
run: docker-compose run --rm test-acceptance.webdriverio
4343
working-directory: test
44-
45-
# Run faker BDD tests using docker-compose
46-
- name: Run Faker BDD Tests
47-
run: docker-compose run --rm test-bdd.faker
48-
working-directory: test

.github/workflows/appiumV2_Android.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/appiumV2_iOS.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Appium Tests - Android
2+
3+
on:
4+
push:
5+
branches:
6+
- 3.x
7+
8+
env:
9+
CI: true
10+
# Force terminal colors. @see https://www.npmjs.com/package/colors
11+
FORCE_COLOR: 1
12+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
13+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
14+
15+
jobs:
16+
appium:
17+
runs-on: ubuntu-22.04
18+
timeout-minutes: 30
19+
20+
strategy:
21+
matrix:
22+
node-version: [20.x]
23+
test-suite: ['other', 'quick']
24+
25+
steps:
26+
- uses: actions/checkout@v5
27+
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
33+
- run: npm i
34+
env:
35+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
36+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
37+
38+
- name: Upload APK to Sauce Labs
39+
run: |
40+
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
41+
--location --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \
42+
--form 'payload=@test/data/mobile/selendroid-test-app-0.17.0.apk' \
43+
--form 'name="selendroid-test-app-0.17.0.apk"'
44+
45+
- run: 'timeout 900 bash -c "npm run test:appium-${{ matrix.test-suite }}"'
46+
timeout-minutes: 20

.github/workflows/appium_iOS.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Appium Tests - iOS
2+
3+
on:
4+
push:
5+
branches:
6+
- 3.x
7+
8+
env:
9+
CI: true
10+
# Force terminal colors. @see https://www.npmjs.com/package/colors
11+
FORCE_COLOR: 1
12+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
13+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
14+
15+
jobs:
16+
appium:
17+
if: false
18+
runs-on: ubuntu-22.04
19+
timeout-minutes: 30
20+
21+
strategy:
22+
matrix:
23+
node-version: [20.x]
24+
test-suite: ['other', 'quick']
25+
26+
steps:
27+
- uses: actions/checkout@v5
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
- run: npm i --force
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/TestApp-iphonesimulator.zip' \
42+
--form 'name="TestApp-iphonesimulator.zip"'
43+
44+
- run: 'timeout 900 bash -c "npm run test:ios:appium-${{ matrix.test-suite }}"'
45+
timeout-minutes: 20

0 commit comments

Comments
 (0)