mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add basic cypress tests
This commit is contained in:
parent
f42f552267
commit
edd53b1004
@ -1,62 +0,0 @@
|
|||||||
# Contributing to Node-RED
|
|
||||||
|
|
||||||
We welcome contributions, but request you follow these guidelines.
|
|
||||||
|
|
||||||
- [Raising issues](#raising-issues)
|
|
||||||
- [Feature requests](#feature-requests)
|
|
||||||
- [Pull-Requests](#pull-requests)
|
|
||||||
- [Contributor License Agreement](#contributor-license-agreement)
|
|
||||||
|
|
||||||
This project adheres to the [Contributor Covenant 1.4](http://contributor-covenant.org/version/1/4/).
|
|
||||||
By participating, you are expected to uphold this code. Please report unacceptable
|
|
||||||
behavior to the project's core team at team@nodered.org.
|
|
||||||
|
|
||||||
## Raising issues
|
|
||||||
|
|
||||||
Please raise any bug reports on the relevant project's issue tracker. Be sure to
|
|
||||||
search the list to see if your issue has already been raised.
|
|
||||||
|
|
||||||
A good bug report is one that make it easy for us to understand what you were
|
|
||||||
trying to do and what went wrong.
|
|
||||||
|
|
||||||
Provide as much context as possible so we can try to recreate the issue.
|
|
||||||
If possible, include the relevant part of your flow. To do this, select the
|
|
||||||
relevant nodes, press Ctrl-E and copy the flow data from the Export dialog.
|
|
||||||
|
|
||||||
At a minimum, please include:
|
|
||||||
|
|
||||||
- Version of Node-RED - either release number if you downloaded a zip, or the first few lines of `git log` if you are cloning the repository directly.
|
|
||||||
- Version of Node.js - what does `node -v` say?
|
|
||||||
|
|
||||||
## Feature requests
|
|
||||||
|
|
||||||
For feature requests, please raise them on the [forum](https://discourse.nodered.org).
|
|
||||||
|
|
||||||
## Pull-Requests
|
|
||||||
|
|
||||||
If you want to raise a pull-request with a new feature, or a refactoring
|
|
||||||
of existing code, it may well get rejected if you haven't discussed it on
|
|
||||||
the [forum](https://discourse.nodered.org) first.
|
|
||||||
|
|
||||||
All contributors need to sign the OpenJS Foundation's Contributor License Agreement.
|
|
||||||
It is an online process and quick to do. If you raise a pull-request without
|
|
||||||
having signed the CLA, you will be prompted to do so automatically.
|
|
||||||
|
|
||||||
|
|
||||||
### Code Branches
|
|
||||||
|
|
||||||
When raising a PR for a fix or a new feature, it is important to target the right branch.
|
|
||||||
|
|
||||||
- `master` - this is the main branch for the latest stable release of Node-RED. All bug fixes for that release should target this branch.
|
|
||||||
- `v1.x` - this is the maintenance branch for the 1.x stream. If a fix *only* applies to 1.x, then it should target this branch. If it applies to the current stable release as well, target `master` first. We will then decide if it needs to be back ported to the 1.x stream.
|
|
||||||
- `dev` - this is the branch for new feature development targeting the next milestone release.
|
|
||||||
|
|
||||||
### Coding standards
|
|
||||||
|
|
||||||
Please ensure you follow the coding standards used through-out the existing
|
|
||||||
code base. Some basic rules include:
|
|
||||||
|
|
||||||
- all files must have the Apache license in the header.
|
|
||||||
- indent with 4-spaces, no tabs. No arguments.
|
|
||||||
- opening brace on same line as `if`/`for`/`function` and so on, closing brace
|
|
||||||
on its own line.
|
|
71
README.md
71
README.md
@ -1,70 +1,25 @@
|
|||||||
# Node-RED
|
# A Sparkle's Guide to Glitter
|
||||||
|
> To shine your [alicorn](Phttps://www.merriam-webster.com/dictionary/alicorn) and make it glitter, a [sparkle](https://twitter.com/andyerikson/status/655496264482758660?lang=en) must embrace their destiny
|
||||||
|
|
||||||
http://nodered.org
|
Sparkle's Guide is inspired by [roadmap.sh](https://roadmap.sh) and is a derivative open source work of [node-red](https://github.com/node-red/node-red). This project aims to be a guide to sparkles and unicorns in the [blessing](https://unicornyard.com/what-is-a-group-of-unicorns-called/) on their magical journey to better themselves and each other.
|
||||||
|
|
||||||
[](https://travis-ci.org/node-red/node-red)
|
|
||||||
[](https://coveralls.io/r/node-red/node-red?branch=master)
|
|
||||||
|
|
||||||
Low-code programming for event-driven applications.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
1. `npm install`
|
||||||
Check out http://nodered.org/docs/getting-started/ for full instructions on getting
|
2. `npm run build`
|
||||||
started.
|
3. `npm start`
|
||||||
|
4. Open <http://127.0.0.1:1880/>
|
||||||
1. `sudo npm install -g --unsafe-perm node-red`
|
|
||||||
2. `node-red`
|
|
||||||
3. Open <http://localhost:1880>
|
|
||||||
|
|
||||||
## Getting Help
|
|
||||||
|
|
||||||
More documentation can be found [here](http://nodered.org/docs).
|
|
||||||
|
|
||||||
For further help, or general discussion, please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack).
|
|
||||||
|
|
||||||
## Developers
|
|
||||||
|
|
||||||
If you want to run the latest code from git, here's how to get started:
|
|
||||||
|
|
||||||
1. Clone the code:
|
|
||||||
|
|
||||||
git clone https://github.com/node-red/node-red.git
|
|
||||||
cd node-red
|
|
||||||
|
|
||||||
2. Install the node-red dependencies
|
|
||||||
|
|
||||||
npm install
|
|
||||||
|
|
||||||
3. Build the code
|
|
||||||
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
4. Run
|
|
||||||
|
|
||||||
npm start
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Before raising a pull-request, please read our
|
### To Sparkle Guides
|
||||||
[contributing guide](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md).
|
|
||||||
|
|
||||||
This project adheres to the [Contributor Covenant 1.4](http://contributor-covenant.org/version/1/4/).
|
>coming soon...
|
||||||
By participating, you are expected to uphold this code. Please report unacceptable
|
|
||||||
behavior to any of the project's core team at team@nodered.org.
|
|
||||||
|
|
||||||
## Authors
|
### To Code
|
||||||
|
|
||||||
Node-RED is a project of the [OpenJS Foundation](http://openjsf.org).
|
|
||||||
|
|
||||||
It is maintained by:
|
|
||||||
|
|
||||||
* Nick O'Leary [@knolleary](http://twitter.com/knolleary)
|
|
||||||
* Dave Conway-Jones [@ceejay](http://twitter.com/ceejay)
|
|
||||||
* And many others...
|
|
||||||
|
|
||||||
|
>coming soon...
|
||||||
|
|
||||||
## Copyright and license
|
## Copyright and license
|
||||||
|
|
||||||
Copyright OpenJS Foundation and other contributors, https://openjsf.org under [the Apache 2.0 license](LICENSE).
|
Copyright OpenJS Foundation and other contributors, https://openjsf.org under [the Apache 2.0 license](LICENSE).
|
||||||
|
December 2021 --- this project and modifications within it are a derivative work of [node-red](https://github.com/node-red/node-red)
|
||||||
|
3
cypress.json
Normal file
3
cypress.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"baseUrl": "http://127.0.0.1:1880"
|
||||||
|
}
|
19
cypress/integration/home_page_spec.js
Normal file
19
cypress/integration/home_page_spec.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
describe('The Home Page', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.visit('')
|
||||||
|
})
|
||||||
|
it('has a flow', () => {
|
||||||
|
cy.get('.red-ui-text-bidi-aware').should('exist')
|
||||||
|
})
|
||||||
|
it('has a node', () => {
|
||||||
|
cy.get('.red-ui-palette-node').should('exist')
|
||||||
|
})
|
||||||
|
context('with a node', () => {
|
||||||
|
it('has an input', ()=> {
|
||||||
|
cy.get('#red-ui-palette-common-input').should('exist')
|
||||||
|
})
|
||||||
|
it('has an output', ()=> {
|
||||||
|
cy.get('#red-ui-palette-common-output').should('exist')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
@ -12,6 +12,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node packages/node_modules/node-red/red.js",
|
"start": "node packages/node_modules/node-red/red.js",
|
||||||
"test": "grunt",
|
"test": "grunt",
|
||||||
|
"cy:run": "cypress run",
|
||||||
"build": "grunt build",
|
"build": "grunt build",
|
||||||
"dev": "grunt dev",
|
"dev": "grunt dev",
|
||||||
"build-dev": "grunt build-dev",
|
"build-dev": "grunt build-dev",
|
||||||
@ -85,6 +86,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"dompurify": "2.3.5",
|
"dompurify": "2.3.5",
|
||||||
|
"cypress": "^9.1.1",
|
||||||
"grunt": "1.4.1",
|
"grunt": "1.4.1",
|
||||||
"grunt-chmod": "~1.1.1",
|
"grunt-chmod": "~1.1.1",
|
||||||
"grunt-cli": "~1.4.3",
|
"grunt-cli": "~1.4.3",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user