@@ -8,8 +8,10 @@ const CREATE_APPLICATION_BUTTON_CANCEL: By = By.xpath('.//button[@qe-id="applica
88
99const CREATE_APPLICATION_FIELD_APP_NAME : By = By . xpath ( './/input[@qeid="application-create-field-app-name"]' ) ;
1010const CREATE_APPLICATION_FIELD_PROJECT : By = By . xpath ( './/input[@qe-id="application-create-field-project"]' ) ;
11- const CREATE_APPLICATION_FIELD_REPOSITORY_URL : By = By . xpath ( './/input[@qe-id="application-create-field-repository-url"]' ) ;
12- const CREATE_APPLICATION_FIELD_REPOSITORY_PATH : By = By . xpath ( './/input[@qe-id="application-create-field-path"]' ) ;
11+ const CREATE_APPLICATION_SOURCE_1_FIELD_REPOSITORY_URL : By = By . xpath ( './/input[@qe-id="application-create-source-1-field-repository-url"]' ) ;
12+ const CREATE_APPLICATION_SOURCE_1_FIELD_REPOSITORY_PATH : By = By . xpath ( './/input[@qe-id="application-create-source-1-field-path"]' ) ;
13+ const CREATE_APPLICATION_SOURCE_2_FIELD_REPOSITORY_PATH : By = By . xpath ( './/input[@qe-id="application-create-source-2-field-path"]' ) ;
14+ const CREATE_APPLICATION_SOURCE_2_FIELD_REPOSITORY_URL : By = By . xpath ( './/input[@qe-id="application-create-source-2-field-repository-url"]' ) ;
1315
1416const CREATE_APPLICATION_DROPDOWN_DESTINATION : By = By . xpath ( './/div[@qe-id="application-create-dropdown-destination"]' ) ;
1517const CREATE_APPLICATION_DROPDOWN_MENU_URL : By = By . xpath ( './/li[@qe-id="application-create-dropdown-destination-URL"]' ) ;
@@ -45,18 +47,35 @@ export class ApplicationCreatePanel extends Base {
4547 }
4648 }
4749
48- public async setSourceRepoUrl ( sourceRepoUrl : string ) : Promise < void > {
50+ public async setSourceOneRepoUrl ( sourceRepoUrl : string ) : Promise < void > {
4951 try {
50- const reposUrl = await UiTestUtilities . findUiElement ( this . driver , CREATE_APPLICATION_FIELD_REPOSITORY_URL ) ;
52+ const reposUrl = await UiTestUtilities . findUiElement ( this . driver , CREATE_APPLICATION_SOURCE_1_FIELD_REPOSITORY_URL ) ;
5153 await reposUrl . sendKeys ( sourceRepoUrl ) ;
5254 } catch ( err ) {
5355 throw new Error ( err ) ;
5456 }
5557 }
58+ public async setSourceTwoRepoUrl ( sourceRepoUrl : string ) : Promise < void > {
59+ try {
60+ const reposUrl = await UiTestUtilities . findUiElement ( this . driver , CREATE_APPLICATION_SOURCE_2_FIELD_REPOSITORY_URL ) ;
61+ await reposUrl . sendKeys ( sourceRepoUrl ) ;
62+ } catch ( err ) {
63+ throw new Error ( err ) ;
64+ }
65+ }
66+
67+ public async setSourceOneRepoPath ( sourceRepoPath : string ) : Promise < void > {
68+ try {
69+ const path = await UiTestUtilities . findUiElement ( this . driver , CREATE_APPLICATION_SOURCE_1_FIELD_REPOSITORY_PATH ) ;
70+ await path . sendKeys ( sourceRepoPath ) ;
71+ } catch ( err ) {
72+ throw new Error ( err ) ;
73+ }
74+ }
5675
57- public async setSourceRepoPath ( sourceRepoPath : string ) : Promise < void > {
76+ public async setSourceTwoRepoPath ( sourceRepoPath : string ) : Promise < void > {
5877 try {
59- const path = await UiTestUtilities . findUiElement ( this . driver , CREATE_APPLICATION_FIELD_REPOSITORY_PATH ) ;
78+ const path = await UiTestUtilities . findUiElement ( this . driver , CREATE_APPLICATION_SOURCE_2_FIELD_REPOSITORY_PATH ) ;
6079 await path . sendKeys ( sourceRepoPath ) ;
6180 } catch ( err ) {
6281 throw new Error ( err ) ;
@@ -184,17 +203,21 @@ export class ApplicationCreatePanel extends Base {
184203 public async createApplication (
185204 appName : string ,
186205 projectName : string ,
187- sourceRepoUrl : string ,
188- sourceRepoPath : string ,
206+ sourceOneRepoUrl : string ,
207+ sourceOneRepoPath : string ,
208+ sourceTwoRepoUrl : string ,
209+ sourceTwoRepoPath : string ,
189210 destinationClusterName : string ,
190211 destinationNamespace : string
191212 ) : Promise < void > {
192213 UiTestUtilities . log ( 'About to create application' ) ;
193214 try {
194215 await this . setAppName ( appName ) ;
195216 await this . setProjectName ( projectName ) ;
196- await this . setSourceRepoUrl ( sourceRepoUrl ) ;
197- await this . setSourceRepoPath ( sourceRepoPath ) ;
217+ await this . setSourceOneRepoUrl ( sourceOneRepoUrl ) ;
218+ await this . setSourceOneRepoPath ( sourceOneRepoPath ) ;
219+ await this . setSourceTwoRepoUrl ( sourceTwoRepoUrl ) ;
220+ await this . setSourceTwoRepoPath ( sourceTwoRepoPath ) ;
198221 await this . selectDestinationClusterNameMenu ( destinationClusterName ) ;
199222 await this . setDestinationNamespace ( destinationNamespace ) ;
200223 await this . clickCreateButton ( ) ;
0 commit comments