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

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


The following commit(s) were added to refs/heads/STREAMPIPES-380 by this push:
     new 855c712  [STREAMPIPES-380] Add cypress test for boolean inverter
855c712 is described below

commit 855c7122fc31bab4e0c95cd4c7c90b1e6b2fbdb5
Author: Philipp Zehnder <[email protected]>
AuthorDate: Thu Jun 24 13:37:21 2021 +0200

    [STREAMPIPES-380] Add cypress test for boolean inverter
---
 .../pipelineElement/booleanInverter1/expected.csv  | 11 +++++++
 .../pipelineElement/booleanInverter1/input.csv     | 11 +++++++
 .../pipelineElement/booleanInverter1.ts            | 38 ++++++++++++++++++++++
 3 files changed, 60 insertions(+)

diff --git a/ui/cypress/fixtures/pipelineElement/booleanInverter1/expected.csv 
b/ui/cypress/fixtures/pipelineElement/booleanInverter1/expected.csv
new file mode 100644
index 0000000..03ab7ac
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/booleanInverter1/expected.csv
@@ -0,0 +1,11 @@
+time;booleantoinvert;sp_internal_label;timestamp
+1623871499055;false;;1.623871499055E12
+1623871500059;false;;1.623871500059E12
+1623871501064;false;;1.623871501064E12
+1623871502070;true;;1.62387150207E12
+1623871503078;true;;1.623871503078E12
+1623871504082;true;;1.623871504082E12
+1623871505084;false;;1.623871505084E12
+1623871506086;false;;1.623871506086E12
+1623871507091;true;;1.623871507091E12
+1623871508093;false;;1.623871508093E12
diff --git a/ui/cypress/fixtures/pipelineElement/booleanInverter1/input.csv 
b/ui/cypress/fixtures/pipelineElement/booleanInverter1/input.csv
new file mode 100644
index 0000000..71796a0
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/booleanInverter1/input.csv
@@ -0,0 +1,11 @@
+timestamp;booleanToInvert
+1623871499055;true
+1623871500059;true
+1623871501064;true
+1623871502070;false
+1623871503078;false
+1623871504082;false
+1623871505084;true
+1623871506086;true
+1623871507091;false
+1623871508093;true
diff --git a/ui/cypress/integration/pipelineElement/booleanInverter1.ts 
b/ui/cypress/integration/pipelineElement/booleanInverter1.ts
new file mode 100644
index 0000000..b2778d2
--- /dev/null
+++ b/ui/cypress/integration/pipelineElement/booleanInverter1.ts
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import { ProcessingElementTestUtils } from 
'../../support/utils/ProcessingElementTestUtils';
+import { PipelineElementBuilder } from 
'../../support/builder/PipelineElementBuilder';
+import { ProcessorTestBuilder } from 
'../../support/builder/ProcessorTestBuilder';
+
+describe('Test Field Renamer 1', () => {
+
+    it('Login', () => {
+        cy.login();
+    });
+
+    const processorTest = ProcessorTestBuilder.create('booleanInverter1')
+      .setProcessor(
+        PipelineElementBuilder.create('boolean_inverter')
+          .addInput('drop-down', 'invert-field', 'booleanToInvert')
+          .build())
+      .build();
+
+    ProcessingElementTestUtils.testElement(processorTest);
+
+});

Reply via email to