You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/06/29 18:21:47 UTC

[incubator-streampipes] 01/02: [test] Add new test for boolean counter

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 8ddffb5195ee3f8e9e8d7c063d27e2332f5284bf
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Jun 29 20:20:54 2022 +0200

    [test] Add new test for boolean counter
---
 .../pipelineElement/filters-siddhi/increase3/input.csv    |  1 +
 .../transformation-jvm/booleanCounter2/description.json   | 15 +++++++++++++++
 .../transformation-jvm/booleanCounter2/expected.csv       |  8 ++++++++
 .../transformation-jvm/booleanCounter2/input.csv          | 11 +++++++++++
 ui/cypress/tests/pipelineElement/SinglePipelineElement.ts |  2 +-
 5 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/input.csv b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/input.csv
index 73ccb343b..b881d671c 100644
--- a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/input.csv
+++ b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/input.csv
@@ -2,3 +2,4 @@ timestamp;sensorValue
 1623871499055;1.0
 1623871503078;10
 1623871503085;11
+1623871503086;15
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json
new file mode 100644
index 000000000..81ca935dd
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json
@@ -0,0 +1,15 @@
+{
+  "name": "boolean_counter",
+  "config": [
+    {
+      "type": "drop-down",
+      "selector": "field",
+      "value": "randomboolean"
+    },
+    {
+      "type": "radio",
+      "selector": "flank",
+      "value": "BOTH"
+    }
+  ]
+}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv
new file mode 100644
index 000000000..1eaabc8b2
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv
@@ -0,0 +1,8 @@
+time;counter;randomboolean
+1623871501064;1;true
+1623871502070;2;false
+1623871503078;3;true
+1623871504082;4;false
+1623871505084;5;true
+1623871506086;6;false
+1623871507091;7;true
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv
new file mode 100644
index 000000000..691d57416
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv
@@ -0,0 +1,11 @@
+timestamp;randomboolean
+1623871499055;false
+1623871500059;false
+1623871501064;true
+1623871502070;false
+1623871503078;true
+1623871504082;false
+1623871505084;true
+1623871506086;false
+1623871507091;true
+1623871508093;true
diff --git a/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts b/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
index 635d22228..40dc62333 100644
--- a/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
+++ b/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
@@ -22,7 +22,7 @@ import { ProcessorTest } from '../../support/model/ProcessorTest';
 const allTests = Cypress.env('processingElements');
 
 allTests.forEach(test => {
-  const testNames = ['countArray1'];
+  const testNames = ['booleanCounter1'];
 
   const processorTest = test as ProcessorTest;