diff --git a/pom.xml b/pom.xml
index 94b2f9f..22d6584 100644
--- a/pom.xml
+++ b/pom.xml
@@ -683,7 +683,7 @@
io.cdap.tests.e2e
cdap-e2e-framework
- 0.2.0-SNAPSHOT
+ 0.3.0-SNAPSHOT
test
diff --git a/src/e2e-test/features/sfmcsink/DesignTime.feature b/src/e2e-test/features/sfmcsink/DesignTime.feature
index 3019124..79b0ed6 100644
--- a/src/e2e-test/features/sfmcsink/DesignTime.feature
+++ b/src/e2e-test/features/sfmcsink/DesignTime.feature
@@ -40,3 +40,20 @@ Feature: Salesforce Marketing Cloud Sink - Design time scenarios
| INSERT | TRUE | FALSE | TRUE |
| UPDATE | FALSE | TRUE | TRUE |
| UPSERT | FALSE | FALSE | TRUE |
+
+ @BATCH-TS-SFMC-DSGN-02 @CONNECTION
+ Scenario: Verify user should be able to successfully validate the sink for All Operation Types
+ When Open Datafusion Project to configure pipeline
+ And Select Sink plugin: "SalesforceDataExtension" from the plugins list
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Browse Connections button
+ And Click on the Add Connection button
+ And Click plugin property: "connector-MarketingCloud"
+ And Enter input plugin property: "name" with value: "connection.name"
+ And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
+ And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
+ And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
+ And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
+ Then Click on the Test Connection button
+ And Verify the test connection is successful
diff --git a/src/e2e-test/features/sfmcsink/DesignTimeValidation.feature b/src/e2e-test/features/sfmcsink/DesignTimeValidation.feature
index b7e6a19..18b580f 100644
--- a/src/e2e-test/features/sfmcsink/DesignTimeValidation.feature
+++ b/src/e2e-test/features/sfmcsink/DesignTimeValidation.feature
@@ -69,3 +69,20 @@ Feature: Salesforce Marketing Cloud Sink - Design time validation scenarios
And Click on the Validate button
Then Verify mandatory property error for below listed properties:
| dataExtension |
+
+ @BATCH-TS-SFMC-DSGN-ERROR-04 @CONNECTION
+ Scenario: Verify user should be able to get invalid credentials validation message when using invalid credentials in the connection manager functionality
+ When Open Datafusion Project to configure pipeline
+ And Select Sink plugin: "SalesforceDataExtension" from the plugins list
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Browse Connections button
+ And Click on the Add Connection button
+ And Click plugin property: "connector-MarketingCloud"
+ And Enter input plugin property: "name" with value: "connection.name"
+ And Enter input plugin property: "clientId" with value: "invalid.clientid"
+ And Enter input plugin property: "clientSecret" with value: "invalid.clientsecret"
+ And Enter input plugin property: "authEndpoint" with value: "invalid.authenticationbase.uri"
+ And Enter input plugin property: "soapEndpoint" with value: "invalid.soapapi.endpoint"
+ Then Click on the Test Connection button
+ Then Verify the invalid connection error message: "invalid.testconnection.logmessage" on the footer
diff --git a/src/e2e-test/features/sfmcsink/DesignTimeWithMacros.feature b/src/e2e-test/features/sfmcsink/DesignTimeWithMacros.feature
index 5a422b4..bf98937 100644
--- a/src/e2e-test/features/sfmcsink/DesignTimeWithMacros.feature
+++ b/src/e2e-test/features/sfmcsink/DesignTimeWithMacros.feature
@@ -63,3 +63,14 @@ Feature: Salesforce Marketing Cloud Sink - Design time scenarios (macros)
And Click on the Macro button of Property: "maxBatchSize" and set the value to: "maxBatchSize"
And Click on the Macro button of Property: "columnMapping" and set the value to: "columnMapping"
Then Validate "Salesforce Marketing" plugin properties
+
+ @BATCH-TS-SFMC-DSGN-MACRO-04 @CONNECTION
+ Scenario: Verify user should be able to validate the plugin when configured for Connection Manager property with macros
+ When Open Datafusion Project to configure pipeline
+ And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Enter input plugin property: "referenceName" with value: "Referencename"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Macro button of Property: "connection" and set the value to: "Connection"
+ And Click on the Macro button of Property: "dataExtension" and set the value to: "DataExtension"
+ Then Validate "Salesforce Marketing" plugin properties
\ No newline at end of file
diff --git a/src/e2e-test/features/sfmcsink/RunTime.feature b/src/e2e-test/features/sfmcsink/RunTime.feature
index 86836f4..bdd4b7e 100644
--- a/src/e2e-test/features/sfmcsink/RunTime.feature
+++ b/src/e2e-test/features/sfmcsink/RunTime.feature
@@ -97,3 +97,51 @@ Feature: Salesforce Marketing Cloud Sink - Run time scenarios
And Wait till pipeline is in running state
Then Verify the pipeline status is "Succeeded"
Then Validate record created in Sink application for Object is equal to expected record
+
+ @SINK-TS-SFMC-RNTM-03 @BQ_SOURCE_UPDATE @BQ_SOURCE_CLEANUP @CONNECTION
+ Scenario:Verify user should be able to preview and deploy the pipeline when plugin is configured for Update Operation with Connection Manager
+ When Open Datafusion Project to configure pipeline
+ And Select plugin: "BigQuery" from the plugins list as: "Source"
+ And Navigate to the properties page of plugin: "BigQuery"
+ And Enter input plugin property: "referenceName" with value: "Reference"
+ And Replace input plugin property: "project" with value: "project.id" for Credentials and Authorization related fields
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId" for Credentials and Authorization related fields
+ And Enter input plugin property: "dataset" with value: "dataset" for Credentials and Authorization related fields
+ And Enter input plugin property: "table" with value: "bqsource.table"
+ Then Validate "BigQuery" plugin properties
+ And Close the Plugin Properties page
+ And Select Sink plugin: "SalesforceDataExtension" from the plugins list
+ And Connect source as "BigQuery" and sink as "SalesforceDataExtension" to establish connection
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Enter input plugin property: "referenceName" with value: "Referencename"
+ And Enter input plugin property: "dataExtension" with value: "Stores"
+ And Select radio button plugin property: "operation" with value: "UPDATE"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Browse Connections button
+ And Click on the Add Connection button
+ And Click plugin property: "connector-MarketingCloud"
+ And Enter input plugin property: "name" with value: "connection.name"
+ And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
+ And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
+ And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
+ And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
+ Then Click on the Test Connection button
+ And Verify the test connection is successful
+ Then Click on the Create button
+ And Use new connection
+ And Select radio button plugin property: "truncateText" with value: "true"
+ And Select radio button plugin property: "failOnError" with value: "true"
+ And Select radio button plugin property: "replaceWithSpaces" with value: "false"
+ And Replace input plugin property: "maxBatchSize" with value: "1000"
+ Then Validate "Salesforce Marketing" plugin properties
+ And Close the Plugin Properties page
+ And Preview and run the pipeline
+ And Wait till pipeline preview is in running state
+ And Open and capture pipeline preview logs
+ And Verify the preview run status of pipeline in the logs is "succeeded"
+ And Close the pipeline logs
+ And Close the preview
+ And Save and Deploy Pipeline
+ And Run the Pipeline in Runtime
+ And Wait till pipeline is in running state
+ Then Verify the pipeline status is "Succeeded"
\ No newline at end of file
diff --git a/src/e2e-test/features/sfmcsink/RunTimeWithMacros.feature b/src/e2e-test/features/sfmcsink/RunTimeWithMacros.feature
index 7bf00c2..47e3682 100644
--- a/src/e2e-test/features/sfmcsink/RunTimeWithMacros.feature
+++ b/src/e2e-test/features/sfmcsink/RunTimeWithMacros.feature
@@ -123,3 +123,59 @@ Feature: Salesforce Marketing Cloud Sink - Run time scenarios (macros)
And Verify the pipeline status is "Succeeded"
And Close the pipeline logs
Then Validate record created in Sink application for Object is equal to expected record
+
+ @SINK-TS-SFMC-RNTM-MACRO-03 @BQ_SOURCE_TABLE @BQ_SOURCE_CLEANUP @CONNECTION
+ Scenario:Verify user should be able to preview and deploy the pipeline when plugin is configured for Connection Manager with macros
+ When Open Datafusion Project to configure pipeline
+ And Select plugin: "BigQuery" from the plugins list as: "Source"
+ And Navigate to the properties page of plugin: "BigQuery"
+ And Enter input plugin property: "referenceName" with value: "Reference"
+ And Replace input plugin property: "project" with value: "project.id" for Credentials and Authorization related fields
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId" for Credentials and Authorization related fields
+ And Enter input plugin property: "dataset" with value: "dataset" for Credentials and Authorization related fields
+ And Enter input plugin property: "table" with value: "bqsource.table"
+ Then Validate "BigQuery" plugin properties
+ And Close the Plugin Properties page
+ And Select Sink plugin: "SalesforceDataExtension" from the plugins list
+ And Connect source as "BigQuery" and sink as "SalesforceDataExtension" to establish connection
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Enter input plugin property: "referenceName" with value: "Referencename"
+ And Enter input plugin property: "dataExtension" with value: "Stores"
+ And Select radio button plugin property: "operation" with value: "INSERT"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Browse Connections button
+ And Click on the Add Connection button
+ And Click plugin property: "connector-MarketingCloud"
+ And Enter input plugin property: "name" with value: "connection.name"
+ And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
+ And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
+ And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
+ And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
+ Then Click on the Test Connection button
+ And Verify the test connection is successful
+ Then Click on the Create button
+ And Use new connection
+ And Click on the Macro button of Property: "connection" and set the value to: "Connection"
+ And Select radio button plugin property: "truncateText" with value: "true"
+ And Select radio button plugin property: "failOnError" with value: "true"
+ And Select radio button plugin property: "replaceWithSpaces" with value: "false"
+ And Replace input plugin property: "maxBatchSize" with value: "1000"
+ Then Validate "Salesforce Marketing" plugin properties
+ And Close the Plugin Properties page
+ And Save the pipeline
+ And Preview and run the pipeline
+ And Enter runtime argument value "connectionMacros" for key "Connection"
+ And Run the preview of pipeline with runtime arguments
+ And Wait till pipeline preview is in running state
+ And Open and capture pipeline preview logs
+ And Verify the preview run status of pipeline in the logs is "succeeded"
+ And Close the pipeline logs
+ And Close the preview
+ And Save and Deploy Pipeline
+ And Run the Pipeline in Runtime
+ And Enter runtime argument value "connectionMacros" for key "Connection"
+ And Run the Pipeline in Runtime with runtime arguments
+ And Wait till pipeline is in running state
+ And Open and capture logs
+ And Verify the pipeline status is "Succeeded"
+ And Close the pipeline logs
diff --git a/src/e2e-test/features/sfmcsource/DesignTime.feature b/src/e2e-test/features/sfmcsource/DesignTime.feature
index 1101086..58bd8f7 100644
--- a/src/e2e-test/features/sfmcsource/DesignTime.feature
+++ b/src/e2e-test/features/sfmcsource/DesignTime.feature
@@ -110,3 +110,20 @@ Feature: Salesforce Marketing Cloud Source - Design time scenarios
Examples:
| ObjectName | ExpectedSchema | Filter |
| BOUNCE_EVENT | sfmcSourceSchema.bounceevent | filter.value |
+
+ @BATCH-TS-SFMC-DSGN-06 @CONNECTION
+ Scenario: Verify user should be able to create the valid connection using connection manager functionality
+ When Open Datafusion Project to configure pipeline
+ And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Browse Connections button
+ And Click on the Add Connection button
+ And Click plugin property: "connector-MarketingCloud"
+ And Enter input plugin property: "name" with value: "connection.name"
+ And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
+ And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
+ And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
+ And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
+ Then Click on the Test Connection button
+ And Verify the test connection is successful
diff --git a/src/e2e-test/features/sfmcsource/DesignTimeValidation.feature b/src/e2e-test/features/sfmcsource/DesignTimeValidation.feature
index d605b07..d6dd17d 100644
--- a/src/e2e-test/features/sfmcsource/DesignTimeValidation.feature
+++ b/src/e2e-test/features/sfmcsource/DesignTimeValidation.feature
@@ -78,3 +78,20 @@ Feature: Salesforce Marketing Cloud Source - Design time Validation scenarios
| DATA_EXTENSION | BOUNCE_EVENT |
And Click on the Validate button
Then Verify that the Plugin Property: "dataExtensionKeyList" is displaying an in-line error message: "required.property.dataextensionkeymultiobject"
+
+ @BATCH-TS-SFMC-DSGN-ERROR-05 @CONNECTION
+ Scenario: Verify user should be able to get invalid credentials validation message when using invalid credentials in the connection manager functionality
+ When Open Datafusion Project to configure pipeline
+ And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Browse Connections button
+ And Click on the Add Connection button
+ And Click plugin property: "connector-MarketingCloud"
+ And Enter input plugin property: "name" with value: "connection.name"
+ And Enter input plugin property: "clientId" with value: "invalid.clientid"
+ And Enter input plugin property: "clientSecret" with value: "invalid.clientsecret"
+ And Enter input plugin property: "authEndpoint" with value: "invalid.authenticationbase.uri"
+ And Enter input plugin property: "soapEndpoint" with value: "invalid.soapapi.endpoint"
+ Then Click on the Test Connection button
+ Then Verify the invalid connection error message: "invalid.testconnection.logmessage" on the footer
\ No newline at end of file
diff --git a/src/e2e-test/features/sfmcsource/DesignTimeWithMacros.feature b/src/e2e-test/features/sfmcsource/DesignTimeWithMacros.feature
index c716f0e..9f7ebf5 100644
--- a/src/e2e-test/features/sfmcsource/DesignTimeWithMacros.feature
+++ b/src/e2e-test/features/sfmcsource/DesignTimeWithMacros.feature
@@ -45,7 +45,7 @@ Feature: Salesforce Marketing Cloud Source - Design time Scenarios (macros)
And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
And Click on the Macro button of Property: "queryMode" and set the value to: "queryMode"
And Click on the Macro button of Property: "objectName" and set the value to: "objectName"
- And Click on the Macro button of Property: "dataExtensionKey" and set the value to: "dataExtensionKey"
+ And Click on the Macro button of Property: "dataExtensionKey" and set the value to: "DataExtensionKey"
Then Validate "Salesforce Marketing" plugin properties
@BATCH-TS-SFMC-DSGN-MACRO-03
@@ -60,7 +60,7 @@ Feature: Salesforce Marketing Cloud Source - Design time Scenarios (macros)
And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
And Click on the Macro button of Property: "queryMode" and set the value to: "queryMode"
And Click on the Macro button of Property: "objectList" and set the value to: "objectList"
- And Click on the Macro button of Property: "dataExtensionKeyList" and set the value to: "dataExtensionKeyList"
+ And Click on the Macro button of Property: "dataExtensionKey" and set the value to: "DataExtensionKey"
And Click on the Macro button of Property: "tableNameField" and set the value to: "tablename"
Then Validate "Salesforce Marketing" plugin properties
@@ -77,3 +77,14 @@ Feature: Salesforce Marketing Cloud Source - Design time Scenarios (macros)
And Click on the Macro button of Property: "objectName" and set the value to: "objectName"
And Click on the Macro button of Property: "filter" and set the value to: "filter"
Then Validate "Salesforce Marketing" plugin properties
+
+ @BATCH-TS-SFMC-DSGN-MACRO-05 @CONNECTION
+ Scenario: Verify user should be able to validate the plugin when configured for Connection Manager property with macros
+ When Open Datafusion Project to configure pipeline
+ And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Enter input plugin property: "referenceName" with value: "Referencename"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Macro button of Property: "connection" and set the value to: "Connection"
+ And Click on the Macro button of Property: "dataExtensionKey" and set the value to: "DataExtensionKey"
+ Then Validate "Salesforce Marketing" plugin properties
\ No newline at end of file
diff --git a/src/e2e-test/features/sfmcsource/RunTime.feature b/src/e2e-test/features/sfmcsource/RunTime.feature
index 1395779..55b29a6 100644
--- a/src/e2e-test/features/sfmcsource/RunTime.feature
+++ b/src/e2e-test/features/sfmcsource/RunTime.feature
@@ -141,3 +141,56 @@ Feature: Salesforce Marketing Cloud Source - Run time Scenarios
Examples:
| ObjectName | Filter |
| MAILING_LIST | filter.value |
+
+ @BATCH-TS-SFMC-RNTM-04 @BQ_SINK @FILE_PATH @BQ_SINK_CLEANUP @CONNECTION
+ Scenario Outline: Verify user should be able to create the valid connection using connection manager functionality
+ When Open Datafusion Project to configure pipeline
+ And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Enter input plugin property: "referenceName" with value: "Referencename"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Browse Connections button
+ And Click on the Add Connection button
+ And Click plugin property: "connector-MarketingCloud"
+ And Enter input plugin property: "name" with value: "connection.name"
+ And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
+ And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
+ And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
+ And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
+ Then Click on the Test Connection button
+ And Verify the test connection is successful
+ Then Click on the Create button
+ And Use new connection
+ And Select dropdown plugin property: "select-queryMode" with option value: "Single Object"
+ And configure source plugin for Object: "" in the Single Object mode
+ And Enter input plugin property: "filter" with value: ""
+ Then Validate "Salesforce Marketing" plugin properties
+ And Capture the generated Output Schema
+ And Close the Plugin Properties page
+ And Select Sink plugin: "BigQueryTable" from the plugins list
+ And Navigate to the properties page of plugin: "BigQuery"
+ And Enter input plugin property: "referenceName" with value: "Reference"
+ And Replace input plugin property: "project" with value: "project.id" for Credentials and Authorization related fields
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId" for Credentials and Authorization related fields
+ And Enter input plugin property: "dataset" with value: "dataset" for Credentials and Authorization related fields
+ And Enter input plugin property: "table" with value: "bqtarget.table"
+ Then Validate "BigQuery" plugin properties
+ And Close the Plugin Properties page
+ And Connect source as "Salesforce-Marketing" and sink as "BigQueryTable" to establish connection
+ And Preview and run the pipeline
+ And Wait till pipeline preview is in running state
+ And Open and capture pipeline preview logs
+ And Verify the preview run status of pipeline in the logs is "succeeded"
+ And Close the pipeline logs
+ And Close the preview
+ And Save and Deploy Pipeline
+ And Run the Pipeline in Runtime
+ And Wait till pipeline is in running state
+ And Open and capture logs
+ And Verify the pipeline status is "Succeeded"
+ And Close the pipeline logs
+ Then Validate record created in Sink application for Object is equal to expected output file "expectedOutputFile1"
+ Examples:
+ | ObjectName | Filter |
+ | MAILING_LIST | filter.value |
+
diff --git a/src/e2e-test/features/sfmcsource/RunTimeWithMacros.feature b/src/e2e-test/features/sfmcsource/RunTimeWithMacros.feature
index 19f41fb..7b42ef8 100644
--- a/src/e2e-test/features/sfmcsource/RunTimeWithMacros.feature
+++ b/src/e2e-test/features/sfmcsource/RunTimeWithMacros.feature
@@ -125,3 +125,59 @@ Feature: Salesforce Marketing Cloud Source - Run time Scenarios (macros)
And Verify the pipeline status is "Succeeded"
And Close the pipeline logs
Then Validate record created in Sink application for Multi object mode is equal to expected output file "expectedOutputFile1"
+
+ @BATCH-TS-SFMC-DSGN-MACRO-03 @CONNECTION @BQ_SINK @FILE_PATH @BQ_SINK_CLEANUP
+ Scenario: Verify user should be able to preview and deploy the pipeline when plugin is configured for Connection Manager property with macros
+ When Open Datafusion Project to configure pipeline
+ And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
+ And Navigate to the properties page of plugin: "Salesforce Marketing"
+ And Enter input plugin property: "referenceName" with value: "Referencename"
+ And Click plugin property: "switch-useConnection"
+ And Click on the Browse Connections button
+ And Click on the Add Connection button
+ And Click plugin property: "connector-MarketingCloud"
+ And Enter input plugin property: "name" with value: "connection.name"
+ And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
+ And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
+ And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
+ And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
+ Then Click on the Test Connection button
+ And Verify the test connection is successful
+ Then Click on the Create button
+ And Use new connection
+ And Click on the Macro button of Property: "connection" and set the value to: "Connection"
+ And Select dropdown plugin property: "select-queryMode" with option value: "Single Object"
+ And Click on the Macro button of Property: "objectName" and set the value to: "objectName"
+ And Click on the Macro button of Property: "filter" and set the value to: "filter"
+ Then Validate "Salesforce Marketing" plugin properties
+ And Close the Plugin Properties page
+ And Select Sink plugin: "BigQueryTable" from the plugins list
+ And Navigate to the properties page of plugin: "BigQuery"
+ And Enter input plugin property: "referenceName" with value: "Reference"
+ And Replace input plugin property: "project" with value: "project.id" for Credentials and Authorization related fields
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId" for Credentials and Authorization related fields
+ And Enter input plugin property: "dataset" with value: "dataset" for Credentials and Authorization related fields
+ And Enter input plugin property: "table" with value: "bqtarget.table"
+ Then Validate "BigQuery" plugin properties
+ And Close the Plugin Properties page
+ And Connect source as "Salesforce-Marketing" and sink as "BigQueryTable" to establish connection
+ And Save the pipeline
+ And Preview and run the pipeline
+ And Enter runtime argument value "singleobjectmode.objectname" for key "objectName"
+ And Enter runtime argument value "filter.value" for key "filter"
+ And Enter runtime argument value "connectionMacros" for key "Connection"
+ And Run the preview of pipeline with runtime arguments
+ And Open and capture pipeline preview logs
+ And Verify the preview run status of pipeline in the logs is "succeeded"
+ And Close the pipeline logs
+ And Close the preview
+ And Save and Deploy Pipeline
+ And Run the Pipeline in Runtime
+ And Enter runtime argument value "singleobjectmode.objectname" for key "objectName"
+ And Enter runtime argument value "filter.value" for key "filter"
+ And Enter runtime argument value "connectionMacros" for key "Connection"
+ And Run the Pipeline in Runtime with runtime arguments
+ And Wait till pipeline is in running state
+ And Open and capture logs
+ And Verify the pipeline status is "Succeeded"
+ And Close the pipeline logs
diff --git a/src/e2e-test/java/io/cdap/plugin/sfmcsource/actions/SfmcSourcePropertiesPageActions.java b/src/e2e-test/java/io/cdap/plugin/sfmcsource/actions/SfmcSourcePropertiesPageActions.java
index db817d2..834b009 100644
--- a/src/e2e-test/java/io/cdap/plugin/sfmcsource/actions/SfmcSourcePropertiesPageActions.java
+++ b/src/e2e-test/java/io/cdap/plugin/sfmcsource/actions/SfmcSourcePropertiesPageActions.java
@@ -151,4 +151,9 @@ public static void verifyIfRecordCreatedInSinkForMultipleObjectsAreCorrect(Strin
Assert.assertTrue(compareValueOfBothResponses(expectedOutput.get(row), bigQueryRows.get(row)));
}
}
+
+ public static void clickOnMarketingConnection() {
+ String connectionName = PluginPropertyUtils.pluginProp("connection.name");
+ ElementHelper.clickOnElement(CdfPluginPropertiesLocators.locateElementContainingText(connectionName));
+ }
}
diff --git a/src/e2e-test/java/io/cdap/plugin/sfmcsource/stepsdesign/DesignTimeSteps.java b/src/e2e-test/java/io/cdap/plugin/sfmcsource/stepsdesign/DesignTimeSteps.java
index e4f3569..db06618 100644
--- a/src/e2e-test/java/io/cdap/plugin/sfmcsource/stepsdesign/DesignTimeSteps.java
+++ b/src/e2e-test/java/io/cdap/plugin/sfmcsource/stepsdesign/DesignTimeSteps.java
@@ -64,4 +64,9 @@ public void validateRecordCreatedInSinkApplicationForMultiObjectModeIsEqualToExp
expectedOutputFile) throws IOException, InterruptedException {
SfmcSourcePropertiesPageActions.verifyIfRecordCreatedInSinkForMultipleObjectsAreCorrect(expectedOutputFile);
}
+
+ @Then("Use new connection")
+ public void clickOnMarketingConnection() {
+ SfmcSourcePropertiesPageActions.clickOnMarketingConnection();
+ }
}
diff --git a/src/e2e-test/java/io/cdap/plugin/tests/hooks/TestSetupHooks.java b/src/e2e-test/java/io/cdap/plugin/tests/hooks/TestSetupHooks.java
index 48460a1..2461ad3 100644
--- a/src/e2e-test/java/io/cdap/plugin/tests/hooks/TestSetupHooks.java
+++ b/src/e2e-test/java/io/cdap/plugin/tests/hooks/TestSetupHooks.java
@@ -159,4 +159,13 @@ private static void dropBqTable(String table) throws IOException, InterruptedExc
String dropQuery = "DROP TABLE `" + projectId + "." + datasetName + "." + table + "`";
BigQueryClient.getSoleQueryResult(dropQuery);
}
+ @Before(order = 1, value = "@CONNECTION")
+ public static void setNewConnectionName() {
+ String connectionName = "Connection" + RandomStringUtils.randomAlphanumeric(10);
+ PluginPropertyUtils.addPluginProp("connection.name", connectionName);
+ BeforeActions.scenario.write("New Connection name: " + connectionName);
+
+ String connectionMacros = "${conn(" + connectionName + ")}";
+ PluginPropertyUtils.addPluginProp("connectionMacros", connectionMacros);
+ }
}
diff --git a/src/e2e-test/resources/errorMessage.properties b/src/e2e-test/resources/errorMessage.properties
index 7cb4c5b..e250d4c 100644
--- a/src/e2e-test/resources/errorMessage.properties
+++ b/src/e2e-test/resources/errorMessage.properties
@@ -9,3 +9,5 @@ required.property.dataextensionkeysingleobject=Data Extension Key must be specif
required.property.invalidcredentials=Error while validating Marketing Cloud client: http//authenticationbase.com//v2/token: bad URL
#Validation messages
validationSuccessMessage=No errors found.
+#Connection Manager messages
+invalid.testconnection.logmessage=Unable to connect to Salesforce Instance. Ensure properties like Client ID, Client Secret, API Endpoint , Soap Endpoint, Auth Endpoint are correct.
diff --git a/src/e2e-test/resources/pluginParameters.properties b/src/e2e-test/resources/pluginParameters.properties
index 05527fa..4724a3a 100644
--- a/src/e2e-test/resources/pluginParameters.properties
+++ b/src/e2e-test/resources/pluginParameters.properties
@@ -1,9 +1,9 @@
#SFMC Credentials
-admin.clientid = SALESFORCE_MARKETING_CLIENT_ID
+admin.clientid=SALESFORCE_MARKETING_CLIENT_ID
admin.clientsecret =SALESFORCE_MARKETING_CLIENT_SECRET
admin.base.uri=SALESFORCE_MARKETING_BASE_URI
admin.soap.endpoint=SALESFORCE_MARKETING_SOAP_API_ENDPOINT
-admin.rest.endpoint = SALESFORCE_MARKETING_REST_API_ENDPOINT
+
#SFMC User -Invalid Credentials
invalid.clientid=a231
@@ -22,6 +22,9 @@ singleobjectmode.dataextensionkey=Stores
multiobjectmode.dataextensionkeylist=key1,key2
multiobjectmode.tablename=Table1
+#Connection Manager
+connectionMacros=dummy1212
+connection.name = dummy1213
#Sink properties
INSERT=insert