Skip to content

Commit

Permalink
Update cypress-brightspot version
Browse files Browse the repository at this point in the history
Update package-lock.json
  • Loading branch information
nick-gumbs committed Nov 14, 2024
1 parent a84df30 commit e415d1d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ docker-compose.override.yml
docker-sync.yml
node
node_modules
e2e/cypress/support/pages
16 changes: 16 additions & 0 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Table Of Contents
- [Development](#development)
- [Helpful Cypress Starter Kit](#helpful-cypress-starter-kit)
- [Cypress-Brightspot](#cypress-brightspot)
- [Edit Page Builder](#edit-page-builder)

<!-- /TOC -->
<!-- /TOC -->

Local Setup
-----------
Expand Down Expand Up @@ -94,6 +96,20 @@ If you're interested in just updating field selectors without overriding existin
});
```

### Edit Page Builder
To generate Page Object classes for Cypress from your JSON configuration, follow these steps:

1. Run the following command to generate the JSON file containing the object type definitions:
```
./gradlew web:exportObjectTypes
```
2. Once `objectTypes.json` is available, you can run the `editPageBuilder.js` script to generate Page Object files:
```
node ./node_modules/@cypress-brightspot/cypress-brightspot/examples/editPageBuilder.js "../web/build/objectTypes.json" "./cypress/support/pages"
```
The first argument (`../web/build/objectTypes.json`) specifies the path to the generated `objectTypes.json`.
The second argument (`./support/pages`) specifies the directory where the generated Page Object files will be created.
3. After running the script, you should see the generated Page Object classes in the specified directory. Each class file corresponds to an object type and follows the Cypress Page Object Model structure, ready for use in your tests.
6 changes: 3 additions & 3 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e415d1d

Please sign in to comment.