Skip to content

Commit b3d5a4b

Browse files
authored
deprecated: nightmare (#3754)
* depreacted: nightmare * depreacted: nightmare * depreacted: nightmare * fix: typings
1 parent 4c144cf commit b3d5a4b

32 files changed

+39
-3422
lines changed

.circleci/config.yml

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ defaults: &defaults
1919
command: docker-compose run --rm test-acceptance.webdriverio
2020
working_directory: test
2121
when: always
22-
- run:
23-
command: docker-compose run --rm test-acceptance.nightmare
24-
working_directory: test
25-
when: always
2622
- run:
2723
command: docker-compose run --rm test-acceptance.puppeteer
2824
working_directory: test

.circleci/test.sh

-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ cd test
77
docker-compose run --rm test-unit &&
88
docker-compose run --rm test-rest &&
99
docker-compose run --rm test-acceptance.webdriverio &&
10-
docker-compose run --rm test-acceptance.nightmare &&
1110
docker-compose run --rm test-acceptance.puppeteer

.github/CONTRIBUTING.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ DEBUG=codeceptjs:* npx codeceptjs run
3939

4040
## Helpers
4141

42-
Please keep in mind that CodeceptJS have **unified API** for Playwright, WebDriverIO, Appium, Nightmare, Puppeteer, TestCafe. Tests written using those helpers should be compatible at syntax level. However, some of helpers may contain unique methods. That happens. If, for instance, WebDriverIO has method XXX and Nightmare doesn't, you can implement XXX inside Nightmare using the same method signature.
42+
Please keep in mind that CodeceptJS have **unified API** for Playwright, WebDriverIO, Appium, Puppeteer, TestCafe. Tests written using those helpers should be compatible at syntax level. However, some helpers may contain unique methods. That happens. If, for instance, WebDriverIO has method XXX and Playwright doesn't, you can implement XXX inside Playwright using the same method signature.
4343

44-
### Updating Playwright | Puppeteer | WebDriver | Nightmare
44+
### Updating Playwright | Puppeteer | WebDriver
4545

4646
*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! *
4747

@@ -61,7 +61,6 @@ Execute test suite:
6161
```sh
6262
mocha test/helper/WebDriver_test.js
6363
mocha test/helper/Puppeteer_test.js
64-
mocha test/helper/Nightmare_test.js
6564
```
6665

6766
Use `--grep` to execute tests only for changed parts.
@@ -187,11 +186,14 @@ docker-compose run --rm test-helpers test/rest
187186

188187
#### Run acceptance tests
189188

189+
<<<<<<< HEAD
190+
To that we provide three separate services respectively for WebDriver, Puppeteer tests:
191+
=======
190192
To that we provide three separate services respectively for WebDriver, Nightmare and Puppeteer tests:
193+
>>>>>>> 3.x
191194
192195
```sh
193196
docker-compose run --rm test-acceptance.webdriverio
194-
docker-compose run --rm test-acceptance.nightmare
195197
docker-compose run --rm test-acceptance.puppeteer
196198
```
197199

.github/PULL_REQUEST_TEMPLATE.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
Applicable helpers:
66

7-
- [ ] WebDriver
7+
- [ ] Playwright
88
- [ ] Puppeteer
9-
- [ ] Nightmare
9+
- [ ] WebDriver
1010
- [ ] REST
1111
- [ ] FileHelper
1212
- [ ] Appium
1313
- [ ] TestCafe
14-
- [ ] Playwright
1514

1615
Applicable plugins:
1716

Dockerfile

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# Download Playwright and its dependencies
22
FROM mcr.microsoft.com/playwright:focal
33

4-
# Add our user and group first to make sure their IDs get assigned consistently,
5-
# regardless of whatever dependencies get added.
6-
RUN groupadd --system nightmare && useradd --system --create-home --gid nightmare nightmare
7-
8-
# Installing the pre-required packages and libraries for electron & Nightmare
4+
# Installing the pre-required packages and libraries
95
RUN apt-get update && \
106
apt-get install -y libgtk2.0-0 libgconf-2-4 \
117
libasound2 libxtst6 libxss1 libnss3 xvfb
@@ -38,7 +34,7 @@ ENV HOST=selenium
3834
# Run user as non privileged.
3935
# USER pptruser
4036

41-
# Set the entrypoint for Nightmare
37+
# Set the entrypoint
4238
ENTRYPOINT ["/codecept/docker/entrypoint"]
4339

4440
# Run tests

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ CodeceptJS uses **Helper** modules to provide actions to `I` object. Currently,
4444
* [**Puppeteer**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Puppeteer.md) - uses Google Chrome's Puppeteer for fast headless testing.
4545
* [**WebDriver**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/WebDriver.md) - uses [webdriverio](http://webdriver.io/) to run tests via WebDriver protocol.
4646
* [**TestCafe**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/TestCafe.md) - cheap and fast cross-browser test automation.
47-
* [**Nightmare**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Nightmare.md) - uses Electron and NightmareJS to run tests.
4847
* [**Appium**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Appium.md) - for **mobile testing** with Appium
4948
* [**Detox**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Detox.md) - This is a wrapper on top of Detox library, aimed to unify testing experience for CodeceptJS framework. Detox provides a grey box testing for mobile applications, playing especially well for React Native apps.
5049

docker/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Codeceptjs Docker
22

3-
CodeceptJS packed into container with the Nightmare, Playwright, Puppeteer, and WebDriverIO drivers.
3+
CodeceptJS packed into container with the Playwright, Puppeteer, and WebDriverIO drivers.
44

55
## How to Use
66

@@ -13,7 +13,7 @@ CodeceptJS runner is available inside container as `codeceptjs`.
1313

1414
### Locally
1515

16-
You can execute CodeceptJS with Puppeteer or Nightmare locally with no extra configuration.
16+
You can execute CodeceptJS with either Playwright or Puppeteer locally with no extra configuration.
1717

1818
```sh
1919
docker run --net=host -v $PWD:/tests codeception/codeceptjs
@@ -80,7 +80,6 @@ $ docker run -it --rm -v /<path_to_codeceptjs_test_dir>/:/tests/ --link selenium
8080

8181
You may run use `-v $(pwd)/:tests/` if running this from the root of your CodeceptJS tests directory.
8282
_Note: The output of your test run will appear in your local directory if your output path is `./output` in the CodeceptJS config_
83-
_Note: If running with the Nightmare driver, it is not necessary to run a selenium docker container and link it. So `--link selenium-chrome:selenium` may be omitted_
8483

8584
### Build
8685

docs/basics.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Refer to following guides to more information on:
4141
* [▶ Playwright](/playwright)
4242
* [▶ WebDriver](/webdriver)
4343
* [▶ Puppeteer](/puppeteer)
44-
* [▶ Nightmare](/nightmare)
4544
* [▶ TestCafe](/testcafe)
4645

4746
> ℹ Depending on a helper selected a list of available actions may change.
@@ -783,7 +782,7 @@ within({frame: "#editor"}, () => {
783782

784783
> ℹ IFrames can also be accessed via `I.switchTo` command of a corresponding helper.
785784
786-
Nested IFrames can be set by passing an array *(WebDriver, Nightmare & Puppeteer only)*:
785+
Nested IFrames can be set by passing an array *(WebDriver & Puppeteer only)*:
787786

788787
```js
789788
within({frame: [".content", "#editor"]}, () => {

docs/custom-helpers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ You can also pass additional config options to your helper from a config - **(pl
154154
```js
155155
helpers: {
156156
// here goes standard helpers:
157-
// WebDriver, Nightmare, etc...
157+
// WebDriver, Playwright, etc...
158158
// and their configuration
159159
MyHelper: {
160160
require: "./my_helper.js", // path to module

docs/data.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ API is supposed to be a stable interface and it can be used by acceptance tests.
2323
## REST
2424

2525
[REST helper](https://codecept.io/helpers/REST/) allows sending raw HTTP requests to application.
26-
This is a tool to make shortcuts and create your data pragmatically via API. However, it doesn't provide tools for testing APIs, so it should be paired with WebDriver helper for browser testing.
26+
This is a tool to make shortcuts and create your data pragmatically via API. However, it doesn't provide tools for testing APIs, so it should be paired with Playwright or WebDriver helper for browser testing.
2727

2828
Enable REST helper in the config. It is recommended to set `endpoint`, a base URL for all API requests. If you need some authorization you can optionally set default headers too.
2929

@@ -92,7 +92,11 @@ I.sendPostRequest('/update-status', {}, { http_x_requested_with: 'xmlhttprequest
9292
## GraphQL
9393

9494
[GraphQL helper](https://codecept.io/helpers/GraphQL/) allows sending GraphQL queries and mutations to application, over Http.
95+
<<<<<<< HEAD
96+
This is a tool to make shortcuts and create your data pragmatically via GraphQL endpoint. However, it doesn't provide tools for testing the endpoint, so it should be paired with WebDriver helper for browser testing.
97+
=======
9598
This is a tool to make shortcuts and create your data pragmatically via GraphQL endpoint. However, it doesn't provide tools for testing the endpoint, so it should be paired with WebDriver helpers for browser testing.
99+
>>>>>>> 3.x
96100
97101
Enable GraphQL helper in the config. It is recommended to set `endpoint`, the URL to which the requests go to. If you need some authorization you can optionally set default headers too.
98102

docs/docker.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CodeceptJS runner is available inside container as `codeceptjs`.
1313

1414
### Locally
1515

16-
You can execute CodeceptJS with Puppeteer or Nightmare locally with no extra configuration.
16+
You can execute CodeceptJS with Puppeteer locally with no extra configuration.
1717

1818
```sh
1919
docker run --net=host -v $PWD:/tests codeceptjs/codeceptjs
@@ -80,7 +80,6 @@ $ docker run -it --rm -v /<path_to_codeceptjs_test_dir>/:/tests/ --link selenium
8080

8181
You may run use `-v $(pwd)/:tests/` if running this from the root of your CodeceptJS tests directory.
8282
_Note: The output of your test run will appear in your local directory if your output path is `./output` in the CodeceptJS config_
83-
_Note: If running with the Nightmare driver, it is not necessary to run a selenium docker container and link it. So `--link selenium-chrome:selenium` may be omitted_
8483

8584
### Build
8685

0 commit comments

Comments
 (0)