forked from TouK/nussknacker
-
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.
* minor deps * some major deps * more deps & warns fix * tests fix for r17 * cypress init * cypress tests * minor deps * scripts * readme * cleanup * readme * start-server-and-test * image snapshots
- Loading branch information
1 parent
bcb9b36
commit 7fd8cdb
Showing
27 changed files
with
6,444 additions
and
3,834 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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"baseUrl": "http://localhost:3000", | ||
"ignoreTestFiles": [ | ||
"**/__snapshots__/*", | ||
"**/__image_snapshots__/*" | ||
], | ||
"env": { | ||
"cypress-plugin-snapshots": { | ||
"imageConfig": { | ||
"threshold": 0.01 | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"BASIC_AUTH": { | ||
"username": "username", | ||
"password": "password" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,214 @@ | ||
{ | ||
"metaData": { | ||
"id" : "FeaturesTest", | ||
"typeSpecificData": { | ||
"parallelism": 1, | ||
"splitStateToDisk": true, | ||
"useAsyncInterpretation": null, | ||
"checkpointIntervalInSeconds": null, | ||
"type": "StreamMetaData" | ||
}, | ||
"isSubprocess": false, | ||
"additionalFields": { | ||
"description": null, | ||
"groups": [], | ||
"properties": { | ||
"numberOfThreads": "1", | ||
"environment": "test" | ||
} | ||
}, | ||
"subprocessVersions": {} | ||
}, | ||
"exceptionHandlerRef": { | ||
"parameters": [] | ||
}, | ||
"nodes": [ | ||
{ | ||
"id": "kafka-transaction", | ||
"ref": { | ||
"typ": "kafka-transaction", | ||
"parameters": [] | ||
}, | ||
"additionalFields": { | ||
"description": null, | ||
"layoutData": { | ||
"x": 0, | ||
"y": 0 | ||
} | ||
}, | ||
"type": "Source" | ||
}, | ||
{ | ||
"id": "configuratorService", | ||
"service": { | ||
"id": "configuratorService", | ||
"parameters": [ | ||
{ | ||
"name": "Template ID", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "'ddddddd'" | ||
} | ||
}, | ||
{ | ||
"name": "Version", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "0" | ||
} | ||
}, | ||
{ | ||
"name": "JsonConfig", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "'sdfsaf'" | ||
} | ||
} | ||
] | ||
}, | ||
"isDisabled": null, | ||
"additionalFields": { | ||
"description": null, | ||
"layoutData": { | ||
"x": 0, | ||
"y": 135 | ||
} | ||
}, | ||
"type": "Processor" | ||
}, | ||
{ | ||
"nextFalse": [], | ||
"id": "filter", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "true" | ||
}, | ||
"isDisabled": null, | ||
"additionalFields": { | ||
"description": null, | ||
"layoutData": { | ||
"x": 0, | ||
"y": 270 | ||
} | ||
}, | ||
"type": "Filter" | ||
}, | ||
{ | ||
"outputs": { | ||
"output": [ | ||
{ | ||
"id": "meetingService", | ||
"service": { | ||
"id": "meetingService", | ||
"parameters": [ | ||
{ | ||
"name": "Date", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "T(java.time.LocalDateTime).parse('2020-11-11T00:00')" | ||
} | ||
}, | ||
{ | ||
"name": "EndTime", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "T(java.time.LocalTime).parse('02:00:00')" | ||
} | ||
}, | ||
{ | ||
"name": "Duration", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "T(java.time.Duration).parse('P1D')" | ||
} | ||
}, | ||
{ | ||
"name": "Period", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "T(java.time.Period).parse('P2Y')" | ||
} | ||
}, | ||
{ | ||
"name": "NextMeeting", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "T(java.time.LocalDate).parse('2020-11-05')" | ||
} | ||
}, | ||
{ | ||
"name": "Scheduler", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "new com.cronutils.parser.CronParser(T(com.cronutils.model.definition.CronDefinitionBuilder).instanceDefinitionFor(T(com.cronutils.model.CronType).QUARTZ)).parse('0 0 00 1/1 * ? *')" | ||
} | ||
} | ||
] | ||
}, | ||
"isDisabled": null, | ||
"additionalFields": { | ||
"description": null, | ||
"layoutData": { | ||
"x": 0, | ||
"y": 540 | ||
} | ||
}, | ||
"type": "Processor" | ||
}, | ||
{ | ||
"id": "kafka-string", | ||
"ref": { | ||
"typ": "kafka-string", | ||
"parameters": [ | ||
{ | ||
"name": "topic", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "'ala'" | ||
} | ||
} | ||
] | ||
}, | ||
"endResult": { | ||
"language": "spel", | ||
"expression": "#input" | ||
}, | ||
"isDisabled": null, | ||
"additionalFields": { | ||
"description": null, | ||
"layoutData": { | ||
"x": 0, | ||
"y": 675 | ||
} | ||
}, | ||
"type": "Sink" | ||
} | ||
] | ||
}, | ||
"id": "enricher", | ||
"ref": { | ||
"id": "enricher", | ||
"parameters": [ | ||
{ | ||
"name": "param", | ||
"expression": { | ||
"language": "spel", | ||
"expression": "'default value'" | ||
} | ||
} | ||
] | ||
}, | ||
"additionalFields": { | ||
"description": null, | ||
"layoutData": { | ||
"x": 0, | ||
"y": 405 | ||
} | ||
}, | ||
"isDisabled": null, | ||
"subprocessParams": null, | ||
"type": "SubprocessInput" | ||
} | ||
], | ||
"additionalBranches": [] | ||
} |
Binary file added
BIN
+94.6 KB
...tegration/__image_snapshots__/Processes diagram should allow drag model #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...tegration/__image_snapshots__/Processes diagram should allow drag model #1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+74 KB
...ation/__image_snapshots__/Processes diagram should import JSON and save #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+90.7 KB
...ation/__image_snapshots__/Processes diagram should import JSON and save #1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+74 KB
...ation/__image_snapshots__/Processes diagram should show process diagram #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import {createTestProcess, deleteTestProcess, getProcessName, jsonToBlob} from "../support/tools" | ||
|
||
describe("Processes diagram", () => { | ||
let processName: string | ||
|
||
before(() => { | ||
processName = getProcessName() | ||
createTestProcess(processName) | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.fixture("env") | ||
.then(({BASIC_AUTH}) => cy.visit(`/visualization/${processName}?businessView=false`, {auth: BASIC_AUTH})) | ||
cy.get("#graphContainer").toMatchImageSnapshot() | ||
}) | ||
|
||
after(() => { | ||
deleteTestProcess(processName) | ||
}) | ||
|
||
it("should show process diagram", () => { | ||
cy.url().should("contain", `visualization\/${processName}`) | ||
cy.contains(/has never been deployed/i).should("be.visible") | ||
}) | ||
|
||
it("should import JSON and save", () => { | ||
cy.intercept("PUT", "/api/processes/*").as("save") | ||
cy.fixture("testProcess").then(json => cy.get("[title=import]") | ||
.next("[type=file]") | ||
.should("exist") | ||
.attachFile({fileContent: jsonToBlob({...json, metaData: {...json.metaData, id: processName}})})) | ||
cy.get("#graphContainer").toMatchImageSnapshot() | ||
cy.contains(/^save/i).should("be.enabled").click() | ||
cy.contains(/^ok$/i).should("be.enabled").click() | ||
cy.wait("@save").its("response.statusCode").should("eq", 200) | ||
}) | ||
|
||
it("should allow drag model", () => { | ||
cy.get("[model-id=meetingService]") | ||
.should("be.visible") | ||
.trigger("mousedown", {which: 1}) | ||
.trigger("mousemove", {clientX: 10, clientY: 10}) | ||
.trigger("mouseup", {force: true}) | ||
cy.get("[model-id=meetingService]").should("not.be.visible") | ||
cy.get("#graphContainer").toMatchImageSnapshot() | ||
}) | ||
}) |
Oops, something went wrong.