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 2023/01/24 06:45:55 UTC
[streampipes] 02/02: [#1132] Fix preprocessing rule e2e tests
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch SP-1132
in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 6b826b28cb12c2af1d8f464a11ed08b606061b0b
Author: Philipp Zehnder <te...@users.noreply.github.com>
AuthorDate: Tue Jan 24 07:45:35 2023 +0100
[#1132] Fix preprocessing rule e2e tests
---
ui/cypress/fixtures/connect/aggregationRules/expected.csv | 2 --
ui/cypress/support/utils/connect/ConnectUtils.ts | 9 ++++++---
ui/cypress/tests/adapter/rules/streamRules.spec.ts | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ui/cypress/fixtures/connect/aggregationRules/expected.csv b/ui/cypress/fixtures/connect/aggregationRules/expected.csv
index bcb273f68..e69de29bb 100644
--- a/ui/cypress/fixtures/connect/aggregationRules/expected.csv
+++ b/ui/cypress/fixtures/connect/aggregationRules/expected.csv
@@ -1,2 +0,0 @@
-timestamp;value
-1623871499000;2.0
diff --git a/ui/cypress/support/utils/connect/ConnectUtils.ts b/ui/cypress/support/utils/connect/ConnectUtils.ts
index 614e3191e..18b9c51bf 100644
--- a/ui/cypress/support/utils/connect/ConnectUtils.ts
+++ b/ui/cypress/support/utils/connect/ConnectUtils.ts
@@ -182,7 +182,10 @@ export class ConnectUtils {
ConnectUtils.startAdapter(adapterInput);
}
- public static startAdapter(adapterInput: AdapterInput) {
+ public static startAdapter(
+ adapterInput: AdapterInput,
+ noLiveDataView = false,
+ ) {
// Set adapter name
cy.dataCy('sp-adapter-name').type(adapterInput.adapterName);
@@ -202,7 +205,7 @@ export class ConnectUtils {
ConnectBtns.adapterSettingsStartAdapter().click();
- if (adapterInput.startAdapter) {
+ if (adapterInput.startAdapter && !noLiveDataView) {
cy.dataCy('sp-connect-adapter-success-live-preview', {
timeout: 60000,
}).should('be.visible');
@@ -294,7 +297,7 @@ export class ConnectUtils {
ignoreTime: boolean,
waitTime = 0,
) {
- ConnectUtils.startAdapter(adapterConfiguration);
+ ConnectUtils.startAdapter(adapterConfiguration, true);
// Wait till data is stored
cy.wait(waitTime);
diff --git a/ui/cypress/tests/adapter/rules/streamRules.spec.ts b/ui/cypress/tests/adapter/rules/streamRules.spec.ts
index 6c874f594..48867115d 100644
--- a/ui/cypress/tests/adapter/rules/streamRules.spec.ts
+++ b/ui/cypress/tests/adapter/rules/streamRules.spec.ts
@@ -31,6 +31,7 @@ describe('Connect aggregation rule transformations', () => {
ConnectEventSchemaUtils.markPropertyAsTimestamp('timestamp');
ConnectEventSchemaUtils.finishEventSchemaConfiguration();
+
cy.dataCy('connect-reduce-event-rate-box').children().click();
cy.dataCy('connect-reduce-event-input').type('2000');
@@ -38,7 +39,6 @@ describe('Connect aggregation rule transformations', () => {
adapterConfiguration,
'cypress/fixtures/connect/aggregationRules/expected.csv',
false,
- 2000,
);
});
});