You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2022/03/13 17:21:50 UTC
[incubator-streampipes] branch STREAMPIPES-514 updated (f56f6d9 -> b0bf408)
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a change to branch STREAMPIPES-514
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git.
from f56f6d9 [hotfix] Add class PipelineInput
new 76fe258 [hotfix] Fix description of file stream adapter
new b0bf408 [STREAMPIPES-514] Adapted tests for new format selection
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../strings.en | 2 +-
.../support/builder/GenericAdapterBuilder.ts | 5 ++--
ui/cypress/support/model/UserInput.ts | 4 ++-
.../cypress/support/model/UserInputType.ts | 14 ++++++++---
ui/cypress/support/model/pipeline/PipelineInput.ts | 29 ----------------------
ui/cypress/support/utils/ConnectUtils.ts | 12 ++++++++-
.../support/utils/ProcessingElementTestUtils.ts | 2 +-
.../{valueRules.smoke.spec.ts => valueRules.ts} | 0
.../tests/pipelineElement/SinglePipelineElement.ts | 2 +-
.../thirdparty/{Mqtt.smoke.spec.ts => Mqtt.ts} | 0
10 files changed, 30 insertions(+), 40 deletions(-)
copy streampipes-client/src/main/java/org/apache/streampipes/client/api/SupportsDataSinkApi.java => ui/cypress/support/model/UserInputType.ts (82%)
delete mode 100644 ui/cypress/support/model/pipeline/PipelineInput.ts
rename ui/cypress/tests/adapter/{valueRules.smoke.spec.ts => valueRules.ts} (100%)
rename ui/cypress/tests/thirdparty/{Mqtt.smoke.spec.ts => Mqtt.ts} (100%)
[incubator-streampipes] 01/02: [hotfix] Fix description of file stream adapter
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-514
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 76fe258850270d7417685abb1411b69b2a1f4890
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Sat Mar 12 15:00:40 2022 +0100
[hotfix] Fix description of file stream adapter
---
.../org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en
index 704eb5a..a80b7ef 100644
--- a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en
+++ b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en
@@ -1,5 +1,5 @@
org.apache.streampipes.connect.iiot.protocol.stream.file.title=File Stream
-org.apache.streampipes.connect.iioot.protocol.stream.file=Continuously streams the content from a file.
+org.apache.streampipes.connect.iiot.protocol.stream.file=Continuously streams the content from a file.
filePath.title=File
filePath.description=File Path
[incubator-streampipes] 02/02: [STREAMPIPES-514] Adapted tests for new format selection
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-514
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit b0bf4083979f07202b7219f448d6ad907c7920af
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Sun Mar 13 18:21:38 2022 +0100
[STREAMPIPES-514] Adapted tests for new format selection
---
ui/cypress/support/builder/GenericAdapterBuilder.ts | 5 +++--
ui/cypress/support/model/UserInput.ts | 4 +++-
.../{pipeline/PipelineInput.ts => UserInputType.ts} | 20 ++++++++++----------
ui/cypress/support/utils/ConnectUtils.ts | 12 +++++++++++-
.../support/utils/ProcessingElementTestUtils.ts | 2 +-
.../{valueRules.smoke.spec.ts => valueRules.ts} | 0
.../tests/pipelineElement/SinglePipelineElement.ts | 2 +-
.../tests/thirdparty/{Mqtt.smoke.spec.ts => Mqtt.ts} | 0
8 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/ui/cypress/support/builder/GenericAdapterBuilder.ts b/ui/cypress/support/builder/GenericAdapterBuilder.ts
index 5fec476..f06962a 100644
--- a/ui/cypress/support/builder/GenericAdapterBuilder.ts
+++ b/ui/cypress/support/builder/GenericAdapterBuilder.ts
@@ -18,6 +18,7 @@
import { UserInput } from '../model/UserInput';
import { GenericAdapterInput } from '../model/GenericAdapterInput';
+import { UserInputType } from '../model/UserInputType';
export class GenericAdapterBuilder {
genericAdapterInput: GenericAdapterInput;
@@ -53,7 +54,7 @@ export class GenericAdapterBuilder {
return this;
}
- public addProtocolInput(type: string, selector: string, value: string) {
+ public addProtocolInput(type: UserInputType, selector: string, value: string) {
const userInput = new UserInput();
userInput.type = type;
userInput.selector = selector;
@@ -69,7 +70,7 @@ export class GenericAdapterBuilder {
return this;
}
- public addFormatInput(type: string, selector: string, value: string) {
+ public addFormatInput(type: UserInputType, selector: string, value: string) {
const userInput = new UserInput();
userInput.type = type;
userInput.selector = selector;
diff --git a/ui/cypress/support/model/UserInput.ts b/ui/cypress/support/model/UserInput.ts
index 50de86d..1c9c675 100644
--- a/ui/cypress/support/model/UserInput.ts
+++ b/ui/cypress/support/model/UserInput.ts
@@ -16,8 +16,10 @@
*
*/
+import { UserInputType } from './UserInputType';
+
export class UserInput {
- type: 'checkbox' | 'input' | 'file' | 'drop-down' | 'radio' | 'code-input' | 'click' | 'button';
+ type: UserInputType;
selector: string;
value: string;
}
diff --git a/ui/cypress/support/model/pipeline/PipelineInput.ts b/ui/cypress/support/model/UserInputType.ts
similarity index 74%
rename from ui/cypress/support/model/pipeline/PipelineInput.ts
rename to ui/cypress/support/model/UserInputType.ts
index bb8fd2c..694b84c 100644
--- a/ui/cypress/support/model/pipeline/PipelineInput.ts
+++ b/ui/cypress/support/model/UserInputType.ts
@@ -16,14 +16,14 @@
*
*/
-import { PipelineElementInput } from './PipelineElementInput';
+export type UserInputType =
+ 'checkbox' |
+ 'input' |
+ 'file' |
+ 'drop-down' |
+ 'radio' |
+ 'code-input' |
+ 'click' |
+ 'button' |
+ 'select';
-export class PipelineInput {
- pipelineName: string;
- dataSource: string;
- dataSourceType: string | 'stream' | 'set';
-
- processingElement: PipelineElementInput;
-
- dataSink: PipelineElementInput;
-}
diff --git a/ui/cypress/support/utils/ConnectUtils.ts b/ui/cypress/support/utils/ConnectUtils.ts
index 7a9aa0c..becfa72 100644
--- a/ui/cypress/support/utils/ConnectUtils.ts
+++ b/ui/cypress/support/utils/ConnectUtils.ts
@@ -131,8 +131,18 @@ export class ConnectUtils {
}
public static configureFormat(adapterConfiguration: GenericAdapterInput) {
+
// Select format
- cy.dataCy(adapterConfiguration.format).click();
+ if (adapterConfiguration.format.indexOf('json') !== -1) {
+ cy.dataCy('connect-select-json-formats').click();
+ if (adapterConfiguration.format.indexOf('object') !== -1) {
+ cy.dataCy('single_object').click();
+ } else {
+ cy.dataCy('array').click();
+ }
+ } else {
+ cy.dataCy(adapterConfiguration.format).click();
+ }
StaticPropertyUtils.input(adapterConfiguration.formatConfiguration);
diff --git a/ui/cypress/support/utils/ProcessingElementTestUtils.ts b/ui/cypress/support/utils/ProcessingElementTestUtils.ts
index c531427..4735bde 100644
--- a/ui/cypress/support/utils/ProcessingElementTestUtils.ts
+++ b/ui/cypress/support/utils/ProcessingElementTestUtils.ts
@@ -32,7 +32,7 @@ export class ProcessingElementTestUtils {
const expectedResultFile = 'pipelineElement/' + pipelineElementTest.dir + '/expected.csv';
let formatType;
- pipelineElementTest.inputFile.endsWith('.csv') ? formatType = 'csv' : formatType = 'json_array_no_key';
+ pipelineElementTest.inputFile.endsWith('.csv') ? formatType = 'csv' : formatType = 'json_array';
FileManagementUtils.addFile(inputFile);
diff --git a/ui/cypress/tests/adapter/valueRules.smoke.spec.ts b/ui/cypress/tests/adapter/valueRules.ts
similarity index 100%
rename from ui/cypress/tests/adapter/valueRules.smoke.spec.ts
rename to ui/cypress/tests/adapter/valueRules.ts
diff --git a/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts b/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
index c223236..635d222 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 = ['count1'];
+ const testNames = ['countArray1'];
const processorTest = test as ProcessorTest;
diff --git a/ui/cypress/tests/thirdparty/Mqtt.smoke.spec.ts b/ui/cypress/tests/thirdparty/Mqtt.ts
similarity index 100%
rename from ui/cypress/tests/thirdparty/Mqtt.smoke.spec.ts
rename to ui/cypress/tests/thirdparty/Mqtt.ts