Skip to content

Commit

Permalink
deprecated: nightmare (#3754)
Browse files Browse the repository at this point in the history
* depreacted: nightmare

* depreacted: nightmare

* depreacted: nightmare

* fix: typings
  • Loading branch information
kobenguyent committed Jul 13, 2023
1 parent 4c144cf commit b3d5a4b
Show file tree
Hide file tree
Showing 32 changed files with 39 additions and 3,422 deletions.
4 changes: 0 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ defaults: &defaults
command: docker-compose run --rm test-acceptance.webdriverio
working_directory: test
when: always
- run:
command: docker-compose run --rm test-acceptance.nightmare
working_directory: test
when: always
- run:
command: docker-compose run --rm test-acceptance.puppeteer
working_directory: test
Expand Down
1 change: 0 additions & 1 deletion .circleci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ cd test
docker-compose run --rm test-unit &&
docker-compose run --rm test-rest &&
docker-compose run --rm test-acceptance.webdriverio &&
docker-compose run --rm test-acceptance.nightmare &&
docker-compose run --rm test-acceptance.puppeteer
10 changes: 6 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ DEBUG=codeceptjs:* npx codeceptjs run

## Helpers

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.
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.

### Updating Playwright | Puppeteer | WebDriver | Nightmare
### Updating Playwright | Puppeteer | WebDriver

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

Expand All @@ -61,7 +61,6 @@ Execute test suite:
```sh
mocha test/helper/WebDriver_test.js
mocha test/helper/Puppeteer_test.js
mocha test/helper/Nightmare_test.js
```

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

#### Run acceptance tests

<<<<<<< HEAD
To that we provide three separate services respectively for WebDriver, Puppeteer tests:
=======
To that we provide three separate services respectively for WebDriver, Nightmare and Puppeteer tests:
>>>>>>> 3.x
```sh
docker-compose run --rm test-acceptance.webdriverio
docker-compose run --rm test-acceptance.nightmare
docker-compose run --rm test-acceptance.puppeteer
```

Expand Down
5 changes: 2 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

Applicable helpers:

- [ ] WebDriver
- [ ] Playwright
- [ ] Puppeteer
- [ ] Nightmare
- [ ] WebDriver
- [ ] REST
- [ ] FileHelper
- [ ] Appium
- [ ] TestCafe
- [ ] Playwright

Applicable plugins:

Expand Down
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# Download Playwright and its dependencies
FROM mcr.microsoft.com/playwright:focal

# Add our user and group first to make sure their IDs get assigned consistently,
# regardless of whatever dependencies get added.
RUN groupadd --system nightmare && useradd --system --create-home --gid nightmare nightmare

# Installing the pre-required packages and libraries for electron & Nightmare
# Installing the pre-required packages and libraries
RUN apt-get update && \
apt-get install -y libgtk2.0-0 libgconf-2-4 \
libasound2 libxtst6 libxss1 libnss3 xvfb
Expand Down Expand Up @@ -38,7 +34,7 @@ ENV HOST=selenium
# Run user as non privileged.
# USER pptruser

# Set the entrypoint for Nightmare
# Set the entrypoint
ENTRYPOINT ["/codecept/docker/entrypoint"]

# Run tests
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ CodeceptJS uses **Helper** modules to provide actions to `I` object. Currently,
* [**Puppeteer**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Puppeteer.md) - uses Google Chrome's Puppeteer for fast headless testing.
* [**WebDriver**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/WebDriver.md) - uses [webdriverio](http://webdriver.io/) to run tests via WebDriver protocol.
* [**TestCafe**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/TestCafe.md) - cheap and fast cross-browser test automation.
* [**Nightmare**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Nightmare.md) - uses Electron and NightmareJS to run tests.
* [**Appium**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Appium.md) - for **mobile testing** with Appium
* [**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.

Expand Down
5 changes: 2 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Codeceptjs Docker

CodeceptJS packed into container with the Nightmare, Playwright, Puppeteer, and WebDriverIO drivers.
CodeceptJS packed into container with the Playwright, Puppeteer, and WebDriverIO drivers.

## How to Use

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

### Locally

You can execute CodeceptJS with Puppeteer or Nightmare locally with no extra configuration.
You can execute CodeceptJS with either Playwright or Puppeteer locally with no extra configuration.

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

You may run use `-v $(pwd)/:tests/` if running this from the root of your CodeceptJS tests directory.
_Note: The output of your test run will appear in your local directory if your output path is `./output` in the CodeceptJS config_
_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_

### Build

Expand Down
3 changes: 1 addition & 2 deletions docs/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Refer to following guides to more information on:
* [▶ Playwright](/playwright)
* [▶ WebDriver](/webdriver)
* [▶ Puppeteer](/puppeteer)
* [▶ Nightmare](/nightmare)
* [▶ TestCafe](/testcafe)

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

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

```js
within({frame: [".content", "#editor"]}, () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/custom-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ You can also pass additional config options to your helper from a config - **(pl
```js
helpers: {
// here goes standard helpers:
// WebDriver, Nightmare, etc...
// WebDriver, Playwright, etc...
// and their configuration
MyHelper: {
require: "./my_helper.js", // path to module
Expand Down
6 changes: 5 additions & 1 deletion docs/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ API is supposed to be a stable interface and it can be used by acceptance tests.
## REST

[REST helper](https://codecept.io/helpers/REST/) allows sending raw HTTP requests to application.
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.
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.

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.

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

[GraphQL helper](https://codecept.io/helpers/GraphQL/) allows sending GraphQL queries and mutations to application, over Http.
<<<<<<< HEAD
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.
=======
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.
>>>>>>> 3.x
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.

Expand Down
3 changes: 1 addition & 2 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CodeceptJS runner is available inside container as `codeceptjs`.

### Locally

You can execute CodeceptJS with Puppeteer or Nightmare locally with no extra configuration.
You can execute CodeceptJS with Puppeteer locally with no extra configuration.

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

You may run use `-v $(pwd)/:tests/` if running this from the root of your CodeceptJS tests directory.
_Note: The output of your test run will appear in your local directory if your output path is `./output` in the CodeceptJS config_
_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_

### Build

Expand Down
Loading

0 comments on commit b3d5a4b

Please sign in to comment.