Skip to content

Commit

Permalink
Advance and Basic Joiner Plugin features.
Browse files Browse the repository at this point in the history
Selected input scenarios for basic joins.
  • Loading branch information
rahuldash171 committed Sep 5, 2023
1 parent 339807e commit d583ed3
Show file tree
Hide file tree
Showing 8 changed files with 301 additions and 2 deletions.
261 changes: 261 additions & 0 deletions core-plugins/src/e2e-test/features/joiner/JoinerWithFile.feature

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public static void uncheckPluginFieldAliasCheckBox(String plugin, String field)
ElementHelper.selectCheckbox(JoinerLocators.fieldAliasCheckBox(plugin, field));
}

public static void selectRequiredInputCheckbox(int value, String inputSchemaName) {
ElementHelper.selectCheckbox(JoinerLocators.requiredInputCheckbox(value - 1, inputSchemaName));
}

public static void selectJoinerType(String targetJoinerType) {
ElementHelper.selectDropdownOption(JoinerLocators.joinerTypeSelectDropdown,
CdfPluginPropertiesLocators.locateDropdownListItem(targetJoinerType));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ public class JoinerLocators {

public static WebElement fieldAliasCheckBox(String pluginName, String field) {
String xpath = "//*[@data-cy='" + pluginName + "-stage-expansion-panel']" + "//*[@data-cy='" + field +
"-field-selector-name']/..//*[@type='checkbox']";
"-field-selector-name']/..//*[@data-cy='" + field + "-field-selector-checkbox']";
return SeleniumDriver.getDriver().findElement(By.xpath(xpath));
}

public static WebElement requiredInputCheckbox(int value, String inputSchemaName) {
String xpath = "//*[@type='checkbox'][@value='" + value + "-" + inputSchemaName + "']";
return SeleniumDriver.getDriver().findElement(By.xpath(xpath));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public void uncheckPluginFieldAliasCheckBox(String plugin, String field) {
JoinerActions.uncheckPluginFieldAliasCheckBox(plugin, field);
}

@Then("Click on the required input checkbox for schema {int} named {string}")
public void clickRequiredInput(int value, String inputSchemaName) {
JoinerActions.selectRequiredInputCheckbox(value, inputSchemaName);
}

@Then("Enter numPartitions {string}")
public void openJoinerProperties(String partitions) {
JoinerActions.enterNumPartitions(PluginPropertyUtils.pluginProp(partitions));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ joinerInvalidPartitions=&*^*
joinerKeys=File.purchase_id = File2.customer_id
joinerInputMemory=File
joinerNullKeys=false
joinConditionSQLExpression=File.customer_name = customers.name
joinConditionSQLExpression=File.id = File2.customerid
joinerOutputSchema={ "type": "record", "name": "text", "fields": [ \
{ "name": "purchase_id", "type": "int" }, { "name": "customer_name", "type": "string" }, \
{ "name": "item", "type": "string" }, { "name": "customer_id", "type": "int" }, { "name": "name", "type": "string" } ] }
Expand All @@ -242,6 +242,10 @@ joinerTest2OutputFile=e2e-tests/expected_outputs/CSV_JOINER_TEST2_Output.csv
joinerTest3OutputFile=e2e-tests/expected_outputs/CSV_JOINER_TEST3_Output.csv
joinerTest4OutputFile=e2e-tests/expected_outputs/CSV_JOINER_TEST4_Output.csv
joinerMacroOutputFile=e2e-tests/expected_outputs/CSV_JOINER_TEST5_Output.csv
joinerTest6OutputFile=e2e-tests/expected_outputs/CSV_JOINER_TEST6_Output.csv
joinerTest7OutputFile=e2e-tests/expected_outputs/CSV_JOINER_TEST7_Output.csv
joinerTest8OutputFile=e2e-tests/expected_outputs/CSV_JOINER_TEST8_Output.csv

## JOINER-PLUGIN-PROPERTIES-END

## ERROR-COLLECTOR-PROPERTIES-START
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1,Douglas,1, Vista Montana,San Jose,95134,408-777-3214,1
1,Douglas,1, Vista Montana,San Jose,95134,408-777-3214,1
2,David,3, Baypointe Parkway,Houston,78970,804-777-2341,2
2,David,3, Baypointe Parkway,Houston,78970,804-777-2341,2
5,Frank,1609 Far St.,San Diego,29770,201-506-8756,5
3,Hugh,5, Cool Way,Manhattan,67263,708-234-2168,3
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1,Douglas,1, Vista Montana,San Jose,CA,95134,408-777-3214,1,0.8
1,Douglas,1, Vista Montana,San Jose,CA,95134,408-777-3214,1,2.05
6,Serena,123 Far St.,Las Vegas,Nv,45334,888-605-3479,,
4,Walter,3828, Piermont Dr,Orlando,FL,73498,201-734-7315,,
2,David,3, Baypointe Parkway,Houston,TX,78970,804-777-2341,2,1.5
2,David,3, Baypointe Parkway,Houston,TX,78970,804-777-2341,2,0.5
5,Frank,1609 Far St.,San Diego,CA,29770,201-506-8756,5,0.5
3,Hugh,5, Cool Way,Manhattan,NY,67263,708-234-2168,3,1.99
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1,Douglas,1, Vista Montana,San Jose,95134,408-777-3214,1
1,Douglas,1, Vista Montana,San Jose,95134,408-777-3214,1
2,David,3, Baypointe Parkway,Houston,78970,804-777-2341,2
2,David,3, Baypointe Parkway,Houston,78970,804-777-2341,2
5,Frank,1609 Far St.,San Diego,29770,201-506-8756,5
3,Hugh,5, Cool Way,Manhattan,67263,708-234-2168,3

0 comments on commit d583ed3

Please sign in to comment.