forked from apache/streampipes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[apache#877] Apply UI linting to cypress module
- Loading branch information
1 parent
7bd5f3e
commit 289d269
Showing
98 changed files
with
2,548 additions
and
2,255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,50 +15,56 @@ | |
~ limitations under the License. | ||
~ | ||
--> | ||
|
||
# End2End tests with cypress | ||
|
||
This folder contains a WIP framework for automated E2E tests of StreamPipes. | ||
|
||
## How to run the tests? | ||
|
||
1. Set up and install a clean StreamPipes instance. | ||
2. Run Cypress (Use one of the three options): | ||
* Open cypress UI: | ||
|
||
- Open cypress UI: | ||
```bash | ||
npm run test-cypress-open | ||
``` | ||
* Run smoke tests (tests with suffix .smoke.spec.ts ) | ||
- Run smoke tests (tests with suffix .smoke.spec.ts ) | ||
```bash | ||
npm run test-cypress-smoke | ||
npm run test-cypress-smoke | ||
``` | ||
* Run whole test suite (tests with suffix .spec.ts ) | ||
- Run whole test suite (tests with suffix .spec.ts ) | ||
```bash | ||
npm run test-cypress-all | ||
``` | ||
|
||
**User**: [email protected] **Password**: admin | ||
|
||
>**Note:** To configure the base URL set the environment variable CYPRESS_BASE_URL (e.g. CYPRESS_BASE_URL=http://localhost:8082) | ||
> **Note:** To configure the base URL set the environment variable CYPRESS_BASE_URL (e.g. CYPRESS_BASE_URL=http://localhost:8082) | ||
## Design guidlines | ||
* Before each test the whole system is cleaned to have a fresh environment | ||
* Each test sets up its own test environment (e.g. upload files) | ||
* There should not be any dependencies between tests | ||
* Ensure that all services required for the test are running (e.g. external data sources, external databases, ...) | ||
|
||
- Before each test the whole system is cleaned to have a fresh environment | ||
- Each test sets up its own test environment (e.g. upload files) | ||
- There should not be any dependencies between tests | ||
- Ensure that all services required for the test are running (e.g. external data sources, external databases, ...) | ||
|
||
## Automated test runs | ||
* Each night the whole test suite is run within github actions | ||
* See: | ||
* To add a test to the test suite add the suffix .spec.ts | ||
* Each PR triggers the smoke tests to detect errors before the branch is merged into the development | ||
* Add suffix .smoke.spec.ts to add test to the smoke tests | ||
* When no suffix is available the test must be triggered manually | ||
|
||
- Each night the whole test suite is run within github actions | ||
- See: | ||
- To add a test to the test suite add the suffix .spec.ts | ||
- Each PR triggers the smoke tests to detect errors before the branch is merged into the development | ||
- Add suffix .smoke.spec.ts to add test to the smoke tests | ||
- When no suffix is available the test must be triggered manually | ||
|
||
## Directories | ||
* **fixtures**: | ||
* Files that are required for tests | ||
* **plugins**: | ||
* Cypress plugins can be added here | ||
* **support**: | ||
* Contains code for the StreamPipes test framework (e.g. model, utils functions, ...) | ||
* **tests**: | ||
* Contains the actual test cases grouped by streampipes modules (e.g. connect, pipeline editor, ...) | ||
|
||
- **fixtures**: | ||
- Files that are required for tests | ||
- **plugins**: | ||
- Cypress plugins can be added here | ||
- **support**: | ||
- Contains code for the StreamPipes test framework (e.g. model, utils functions, ...) | ||
- **tests**: | ||
- Contains the actual test cases grouped by streampipes modules (e.g. connect, pipeline editor, ...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
[{"timestamp": 1623871499055, "v1": 4.1, "v2": "abc", "v3": true, "v4": 1}, | ||
{"timestamp": 1623871500059, "v1": 4.2, "v2": "abc", "v3": false, "v4": 2}, | ||
{"timestamp": 1623871507091, "v1": 4.3, "v4": 3}, | ||
{"timestamp": 1623871508093, "v1": 4.4, "v2": "abc", "v3": true, "v4": 4}, | ||
{"timestamp": 1623871508095, "v1": 4.5, "v4": 5}] | ||
[ | ||
{ "timestamp": 1623871499055, "v1": 4.1, "v2": "abc", "v3": true, "v4": 1 }, | ||
{ "timestamp": 1623871500059, "v1": 4.2, "v2": "abc", "v3": false, "v4": 2 }, | ||
{ "timestamp": 1623871507091, "v1": 4.3, "v4": 3 }, | ||
{ "timestamp": 1623871508093, "v1": 4.4, "v2": "abc", "v3": true, "v4": 4 }, | ||
{ "timestamp": 1623871508095, "v1": 4.5, "v4": 5 } | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
[{"timestamp": 1623871499055,"v1": 4.099999904632568,"v2": "abc","v3": true,"v4": 1.0},{"timestamp": 1623871500059,"v1": 4.199999809265137,"v2": "abc","v3": false,"v4": 2.0},{"timestamp": 1623871507091,"v1": 4.300000190734863,"v2": null,"v3": null,"v4": 3.0},{"timestamp": 1623871508093,"v1": 4.400000095367432,"v2": "abc","v3": true,"v4": 4.0},{"timestamp": 1623871508095,"v1": 4.5,"v2": null,"v3": null,"v4": 5.0}] | ||
[ | ||
{ | ||
"timestamp": 1623871499055, | ||
"v1": 4.099999904632568, | ||
"v2": "abc", | ||
"v3": true, | ||
"v4": 1.0 | ||
}, | ||
{ | ||
"timestamp": 1623871500059, | ||
"v1": 4.199999809265137, | ||
"v2": "abc", | ||
"v3": false, | ||
"v4": 2.0 | ||
}, | ||
{ | ||
"timestamp": 1623871507091, | ||
"v1": 4.300000190734863, | ||
"v2": null, | ||
"v3": null, | ||
"v4": 3.0 | ||
}, | ||
{ | ||
"timestamp": 1623871508093, | ||
"v1": 4.400000095367432, | ||
"v2": "abc", | ||
"v3": true, | ||
"v4": 4.0 | ||
}, | ||
{ "timestamp": 1623871508095, "v1": 4.5, "v2": null, "v3": null, "v4": 5.0 } | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
[{"timestamp": 1667904471000, "v1": 4.1, "v2": "abc", "v3": true, "v4": 1}, | ||
{"timestamp": 1667904472000, "v1": 4.2, "v2": "abc", "v3": false, "v4": 2}, | ||
{"timestamp": 1667904473000, "v1": 4.3}, | ||
{"timestamp": 1667904474000, "v1": 4.4, "v2": "abc", "v3": true, "v4": 4}, | ||
{"timestamp": 1667904475000, "v1": 4.5, "v4": 5}] | ||
[ | ||
{ "timestamp": 1667904471000, "v1": 4.1, "v2": "abc", "v3": true, "v4": 1 }, | ||
{ "timestamp": 1667904472000, "v1": 4.2, "v2": "abc", "v3": false, "v4": 2 }, | ||
{ "timestamp": 1667904473000, "v1": 4.3 }, | ||
{ "timestamp": 1667904474000, "v1": 4.4, "v2": "abc", "v3": true, "v4": 4 }, | ||
{ "timestamp": 1667904475000, "v1": 4.5, "v4": 5 } | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
"value": "4" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
"value": "True" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
"value": "False" | ||
} | ||
] | ||
} | ||
} |
18 changes: 11 additions & 7 deletions
18
ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
{ | ||
"name": "numerical_filter", | ||
"config": [ | ||
{"type": "drop-down", "selector": "number-mapping", "value": "randomnumber"}, | ||
{"type": "radio", "selector": "operation", "value": "\\>"}, | ||
{"type": "input", "selector": "value", "value": "50"} | ||
] | ||
} | ||
"name": "numerical_filter", | ||
"config": [ | ||
{ | ||
"type": "drop-down", | ||
"selector": "number-mapping", | ||
"value": "randomnumber" | ||
}, | ||
{ "type": "radio", "selector": "operation", "value": "\\>" }, | ||
{ "type": "input", "selector": "value", "value": "50" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
"value": "check" | ||
} | ||
] | ||
} | ||
} |
14 changes: 7 additions & 7 deletions
14
ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"name": "text_filter", | ||
"config": [ | ||
{"type": "drop-down", "selector": "text", "value": "randomchar"}, | ||
{"type": "radio", "selector": "operation", "value": "MATCHES"}, | ||
{"type": "input", "selector": "keyword", "value": "c"} | ||
] | ||
} | ||
"name": "text_filter", | ||
"config": [ | ||
{ "type": "drop-down", "selector": "text", "value": "randomchar" }, | ||
{ "type": "radio", "selector": "operation", "value": "MATCHES" }, | ||
{ "type": "input", "selector": "keyword", "value": "c" } | ||
] | ||
} |
14 changes: 7 additions & 7 deletions
14
ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"name": "text_filter", | ||
"config": [ | ||
{"type": "drop-down", "selector": "text", "value": "randomchar"}, | ||
{"type": "radio", "selector": "operation", "value": "CONTAINS"}, | ||
{"type": "input", "selector": "keyword", "value": "app"} | ||
] | ||
} | ||
"name": "text_filter", | ||
"config": [ | ||
{ "type": "drop-down", "selector": "text", "value": "randomchar" }, | ||
{ "type": "radio", "selector": "operation", "value": "CONTAINS" }, | ||
{ "type": "input", "selector": "keyword", "value": "app" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
"value": "50" | ||
} | ||
] | ||
} | ||
} |
12 changes: 6 additions & 6 deletions
12
ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "boolean_counter", | ||
"config": [ | ||
{"type": "drop-down", "selector": "field", "value": "booleanToCount"}, | ||
{"type": "radio", "selector": "flank", "value": "BOTH"} | ||
] | ||
} | ||
"name": "boolean_counter", | ||
"config": [ | ||
{ "type": "drop-down", "selector": "field", "value": "booleanToCount" }, | ||
{ "type": "radio", "selector": "flank", "value": "BOTH" } | ||
] | ||
} |
14 changes: 9 additions & 5 deletions
14
ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
{ | ||
"name": "boolean_inverter", | ||
"config": [ | ||
{"type": "drop-down", "selector": "invert-field", "value": "booleanToInvert"} | ||
] | ||
} | ||
"name": "boolean_inverter", | ||
"config": [ | ||
{ | ||
"type": "drop-down", | ||
"selector": "invert-field", | ||
"value": "booleanToInvert" | ||
} | ||
] | ||
} |
10 changes: 5 additions & 5 deletions
10
ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "count_array", | ||
"config": [ | ||
{"type": "drop-down", "selector": "array-field", "value": "arrayProperty"} | ||
] | ||
} | ||
"name": "count_array", | ||
"config": [ | ||
{ "type": "drop-down", "selector": "array-field", "value": "arrayProperty" } | ||
] | ||
} |
10 changes: 6 additions & 4 deletions
10
ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
[{"timestamp": 1623871499055, "arrayProperty": [1,2,4,4]}, | ||
{"timestamp": 1623871500059, "arrayProperty": [1,4]}, | ||
{"timestamp": 1623871507091, "arrayProperty": [1,3,3,3,4]}, | ||
{"timestamp": 1623871508093, "arrayProperty": [1]}] | ||
[ | ||
{ "timestamp": 1623871499055, "arrayProperty": [1, 2, 4, 4] }, | ||
{ "timestamp": 1623871500059, "arrayProperty": [1, 4] }, | ||
{ "timestamp": 1623871507091, "arrayProperty": [1, 3, 3, 3, 4] }, | ||
{ "timestamp": 1623871508093, "arrayProperty": [1] } | ||
] |
14 changes: 9 additions & 5 deletions
14
ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
{ | ||
"name": "field_hasher", | ||
"config": [ | ||
{"type": "drop-down", "selector": "property-mapping", "value": "sensorId"}, | ||
{"type": "radio", "selector": "hash-algorithm", "value": "SHA1"} | ||
] | ||
"name": "field_hasher", | ||
"config": [ | ||
{ | ||
"type": "drop-down", | ||
"selector": "property-mapping", | ||
"value": "sensorId" | ||
}, | ||
{ "type": "radio", "selector": "hash-algorithm", "value": "SHA1" } | ||
] | ||
} |
14 changes: 9 additions & 5 deletions
14
ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
{ | ||
"name": "field_hasher", | ||
"config": [ | ||
{"type": "drop-down", "selector": "property-mapping", "value": "sensorId"}, | ||
{"type": "radio", "selector": "hash-algorithm", "value": "MD5"} | ||
] | ||
"name": "field_hasher", | ||
"config": [ | ||
{ | ||
"type": "drop-down", | ||
"selector": "property-mapping", | ||
"value": "sensorId" | ||
}, | ||
{ "type": "radio", "selector": "hash-algorithm", "value": "MD5" } | ||
] | ||
} |
12 changes: 6 additions & 6 deletions
12
ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/description.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"name": "field_mapper", | ||
"config": [ | ||
{"type": "checkbox", "selector": "value1", "value": "check"}, | ||
{"type": "checkbox", "selector": "value2", "value": "check"}, | ||
{"type": "input", "selector": "fieldName", "value": "hashedField"} | ||
] | ||
"name": "field_mapper", | ||
"config": [ | ||
{ "type": "checkbox", "selector": "value1", "value": "check" }, | ||
{ "type": "checkbox", "selector": "value2", "value": "check" }, | ||
{ "type": "input", "selector": "fieldName", "value": "hashedField" } | ||
] | ||
} |
Oops, something went wrong.