|
2 | 2 |
|
3 | 3 | This project offers a single shell script that quickly initializes a [Cypress](https://cypress.io) testing automation project from scratch.
|
4 | 4 |
|
5 |
| -> **Note:** This script only works on Unix-based operating systems, such as Linux and macOS. |
| 5 | +> **Note:** This script only works on Unix-based operating systems, such as Linux and OSX. |
6 | 6 |
|
7 | 7 | ## Usage
|
8 | 8 |
|
9 | 9 | 1. Download the [`cy.sh`](./cy.sh) file and move it to your root directory
|
10 |
| -2. In the root directory, run `./cy.sh name-of-the-project-you-want-to-create-here` to create a Cypress project from scratch (you might have to first give execution permission to the `cy.sh` file) |
11 |
| -- 2.1. Alternatively, you can run `./cy.sh name-of-your-project-here x.x.x` if you want to install a specific version of Cypress, other than its latest version. |
12 |
| -3. Close Cypress and access the newly created project (e.g., `cd name-of-your-project-here/`) |
13 |
| -4. Open it on your favorite IDE and start writing your Cypress tests! 🙌 |
| 10 | + |
| 11 | +2. In the root directory, run `./cy.sh name-of-the-project-you-want-to-create` to create a Cypress project from scratch (you might have first to give execution permission to the `cy.sh` file) |
| 12 | + 2.1. Alternatively, you can run `./cy.sh name-of-your-project-here x.x.x` (where `x.x.x` is the specific Cypress version you want to install). Otherwise, the latest version is installed. |
| 13 | + |
| 14 | +3. After the script is run, access the newly created directory and run `npx cypress open` to start Cypress for the first time so it will bootstrap itself. |
14 | 15 |
|
15 | 16 | ## What does `cy.sh` do?
|
16 | 17 |
|
17 |
| -1. It creates a project directory and accesses it |
18 |
| -2. Then, it initialize git and .gitignore |
19 |
| -3. After that, it creates a readme file to be defined |
20 |
| -4. It then initializes NPM |
21 |
| -5. It installs Cypress (if a version is provided, it will install it; otherwise, the latest version is installed) |
22 |
| -6. It creates cypress.env and cypress.env.example files defaulting them to empty objects |
23 |
| -7. Finally, it opens Cypress for the first time so that it creates its default structure. |
| 18 | +To understand exactly what it does, read the comments in the [cy.sh](./cy.sh) file. |
24 | 19 |
|
25 | 20 | ## Support this project
|
26 | 21 |
|
|
0 commit comments