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/08/02 06:34:47 UTC

[incubator-streampipes] branch dev updated: [hotfix] Add slider as possible user input in tests

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


The following commit(s) were added to refs/heads/dev by this push:
     new f08ed0cd9 [hotfix] Add slider as possible user input in tests
f08ed0cd9 is described below

commit f08ed0cd9b87a77fb53133fb23fc3791e064ee48
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Tue Aug 2 08:34:40 2022 +0200

    [hotfix] Add slider as possible user input in tests
---
 .../pipelineElement/filters-siddhi/increase1/description.json  |  2 +-
 .../pipelineElement/filters-siddhi/increase2/description.json  |  2 +-
 .../pipelineElement/filters-siddhi/increase3/description.json  |  2 +-
 ui/cypress/support/model/UserInputType.ts                      |  1 +
 ui/cypress/support/utils/StaticPropertyUtils.ts                | 10 ++++++----
 5 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase1/description.json b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase1/description.json
index 6635a5f75..dc722f6c7 100644
--- a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase1/description.json
+++ b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase1/description.json
@@ -12,7 +12,7 @@
       "value": "Increase"
     },
     {
-      "type": "input",
+      "type": "slider",
       "selector": "increase",
       "value": "100"
     },
diff --git a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase2/description.json b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase2/description.json
index 6635a5f75..dc722f6c7 100644
--- a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase2/description.json
+++ b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase2/description.json
@@ -12,7 +12,7 @@
       "value": "Increase"
     },
     {
-      "type": "input",
+      "type": "slider",
       "selector": "increase",
       "value": "100"
     },
diff --git a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/description.json b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/description.json
index 6635a5f75..dc722f6c7 100644
--- a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/description.json
+++ b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/description.json
@@ -12,7 +12,7 @@
       "value": "Increase"
     },
     {
-      "type": "input",
+      "type": "slider",
       "selector": "increase",
       "value": "100"
     },
diff --git a/ui/cypress/support/model/UserInputType.ts b/ui/cypress/support/model/UserInputType.ts
index 694b84cb9..0938fd5a5 100644
--- a/ui/cypress/support/model/UserInputType.ts
+++ b/ui/cypress/support/model/UserInputType.ts
@@ -25,5 +25,6 @@ export type UserInputType =
     'code-input' |
     'click' |
     'button' |
+    'slider' |
     'select';
 
diff --git a/ui/cypress/support/utils/StaticPropertyUtils.ts b/ui/cypress/support/utils/StaticPropertyUtils.ts
index c87e67697..e3e730deb 100644
--- a/ui/cypress/support/utils/StaticPropertyUtils.ts
+++ b/ui/cypress/support/utils/StaticPropertyUtils.ts
@@ -33,14 +33,16 @@ export class StaticPropertyUtils {
       } else if (config.type === 'radio') {
         cy.dataCy(config.selector.replace(' ', '_').toLowerCase() + '-' + config.value.replace(' ', '_').toLowerCase()).click();
       } else if (config.type === 'click') {
-        cy.dataCy(config.selector).click({ force: true });
+        cy.dataCy(config.selector).click({force: true});
       } else if (config.type === 'code-input') {
         cy.dataCy('reset-code-' + config.selector).click();
         cy.dataCy('code-editor-' + config.selector).type(config.value);
       } else if (config.type === 'input') {
-          cy.dataCy(config.selector).clear().type(config.value).blur();
-        } else {
-          cy.dataCy(config.selector).type(config.value);
+        cy.dataCy(config.selector).clear().type(config.value).blur();
+      } else if (config.type === 'slider') {
+        cy.dataCy(config.selector).type(config.value);
+      } else {
+        cy.dataCy(config.selector).type(config.value);
       }
     });
   }