Sync Integ to Master
[sdc.git] / ui-ci / src / main / java / org / openecomp / sdc / ci / tests / execute / sanity / VfDeploymentInformationalArtifacts.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.ci.tests.execute.sanity;
22
23 import java.util.ArrayList;
24 import java.util.List;
25
26 import org.openecomp.sdc.be.dao.api.ActionStatus;
27 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
28 import org.openecomp.sdc.be.model.User;
29 import org.openecomp.sdc.ci.tests.datatypes.ArtifactInfo;
30 import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum;
31 import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum.Dashboard;
32 import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails;
33 import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum;
34 import org.openecomp.sdc.ci.tests.execute.setup.SetupCDTest;
35 import org.openecomp.sdc.ci.tests.pages.CompositionPage;
36 import org.openecomp.sdc.ci.tests.pages.ResourceGeneralPage;
37 import org.openecomp.sdc.ci.tests.utilities.ArtifactUIUtils;
38 import org.openecomp.sdc.ci.tests.utilities.FileHandling;
39 import org.openecomp.sdc.ci.tests.utilities.GeneralUIUtils;
40 import org.openecomp.sdc.ci.tests.utilities.ResourceUIUtils;
41 import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
42 import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils;
43 import org.openecomp.sdc.common.api.ArtifactTypeEnum;
44 import org.openqa.selenium.WebElement;
45 import org.testng.Assert;
46 import org.testng.SkipException;
47 import org.testng.annotations.Test;
48
49
50 public class VfDeploymentInformationalArtifacts extends SetupCDTest {
51         
52         
53         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
54         // START US824719
55         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
56         
57         // US824719 - Import VSP - VF informational artifacts
58         // TC1434241 - Import VF Artifacts - Deployment Artifacts - One Artifact, One Type
59         @Test
60         public void importVfArtifactsDeploymentArtifactsOneArtifactOneType() throws Exception {
61                 String fileName = "TC1434241.csar";
62                 String folder ="US825779";
63                 
64                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
65                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1"));
66                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
67                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
68                 
69                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null);
70         }
71         
72         // US824719 - Import VSP - VF informational artifacts
73         // TC1434245 - Import VF Artifacts - Deployment Artifacts - Multiple Artifacts, Multiple Types
74         @Test
75         public void importVfArtifactsDeploymentArtifactsMultipleArtifactsMultipleTypes() throws Exception {
76                 String fileName = "TC1434245.csar";
77                 String folder ="US825779";
78                 
79                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
80                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1"));
81                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1"));
82                 
83                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
84                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
85                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
86                 
87                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
88                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
89                 
90                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName,folder, deploymentArtifacts, null);
91         }
92         
93         // US824719 - Import VSP - VF informational artifacts
94         // TC1434247 - Import VF Artifacts - Informational Artifacts - One Artifact, One Type
95         @Test
96         public void importVfArtifactsInformationalArtifactsOneArtifactOneType() throws Exception {
97                 String fileName = "TC1434247.csar";
98                 String folder ="US825779";
99                 
100                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
101                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
102                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
103                 
104                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
105                 informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"));
106                 
107                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts);
108         }
109         
110         // US824719 - Import VSP - VF informational artifacts
111         // TC1434248 -  Import VF Artifacts - Informational Artifacts - Multiple Artifacts, Multiple Types
112         @Test
113         public void importVfArtifactsInformationalArtifactsMultipleArtifactsMultipleTypes() throws Exception {
114                 String fileName = "TC1434248.csar";
115                 String folder ="US825779";
116                 
117                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
118                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
119                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
120                 
121                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
122                 informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"));
123                 informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1"));
124                 informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1"));
125                 
126                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName,  folder, deploymentArtifacts, informationalArtifacts);
127         }
128         
129         // US824719 - Import VSP - VF informational artifacts
130         // TC1434249 -  Import VF Artifacts - Deployment and Informational Artifacts - Multiple Artifacts, Multiple Types
131         @Test
132         public void importVfArtifactsDeploymentAndInformationalArtifactsMultipleArtifactsMultipleTypes() throws Exception {
133                 String fileName = "TC1434249.csar";
134                 String folder ="US825779";
135                 
136                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
137                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1"));
138                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1"));
139                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
140                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
141                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
142                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
143                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
144                 
145                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
146                 informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"));
147                 informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1"));
148                 informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1"));
149                 
150                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, informationalArtifacts);
151         }
152         
153         // TODO: there is defect in flow: "Updated button enabled for artifact in invalid type folder"
154         // TODO: re-check it after defect fix
155         // US824719 - Import VSP - VF informational artifacts
156         // TC1438310 - Import VF Artifacts - Deployment Artifacts - Artifact Type Invalid
157         @Test
158         public void importVFArtifactsDeploymentArtifactsArtifactTypeInvalid() throws Exception {
159                 String fileName = "DeploymentArtifactWithInvalidType.csar";
160                 String folder ="US825779";
161                 
162                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
163                 deploymentArtifacts.add(new ArtifactInfo(null, "ArtifactName.yaml", null, "ArtifactName", ArtifactTypeEnum.OTHER.getType(), "1"));
164                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
165                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
166                 
167                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, null);
168         }
169         
170         // US824719 - Import VSP - VF informational artifacts
171         // TC1438311 - Import VF Artifacts - Informational Artifacts - Artifact Type Invalid
172         @Test
173         public void importVfArtifactsInformationalArtifactsArtifactTypeInvalid() throws Exception {
174                 String fileName = "InformationArtifactWithInvalidType.csar";
175                 String folder ="US825779";
176                 
177                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
178                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
179                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
180                 
181                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
182                 informationalArtifacts.add(new ArtifactInfo(null, "ArtifactName.yaml", null, "ArtifactName", ArtifactTypeEnum.OTHER.getType(), "1"));
183                 
184                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, informationalArtifacts);
185         }
186         
187         // US824719 - Import VSP - VF informational artifacts
188         // TC1438231 -  Import VF Artifacts - Deployment Artifacts - Artifact Name To Long
189         @Test
190         public void importVfArtifactsDeploymentArtifactsArtifactNameToLong() throws Exception {         
191                 String folder = "US825779";
192                 ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
193         
194                 String fileName = "DeploymentArtifactWithLongName.csar";
195                 
196                 importVfFromCsar(resourceMetaData, folder, fileName, getUser());        
197                 
198                 String errorMessage = GeneralUIUtils.getWebElementByClassName("w-sdc-modal-caption").getText();
199         String checkUIResponseOnError = ErrorValidationUtils.checkUIResponseOnError(ActionStatus.EXCEEDS_LIMIT.name());
200         Assert.assertTrue(errorMessage.contains(checkUIResponseOnError));
201         }
202         
203         // US824719 - Import VSP - VF informational artifacts
204         // TC1438232 - Import VF Artifacts - Informational Artifacts - Artifact Name To Long
205         // TODO: make informational artifact name longer then 255
206         // TODO: windows/linux not allowed it
207         @Test(enabled=false)
208         public void importVfArtifactsInformationalArtifactsArtifactNameToLong() throws Exception {
209                 String folder ="US825779";
210                 ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
211         
212                 String fileName = "InformationArtifactWithLongName.csar";
213                 
214                 importVfFromCsar(resourceMetaData, folder, fileName, getUser());        
215                 
216                 String errorMessage = GeneralUIUtils.getWebElementByClassName("w-sdc-modal-caption").getText();
217             String checkUIResponseOnError = ErrorValidationUtils.checkUIResponseOnError(ActionStatus.EXCEEDS_LIMIT.name());
218             Assert.assertTrue(errorMessage.contains(checkUIResponseOnError));
219         }
220         
221         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
222         // END US824719
223         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
224         
225         
226         
227         
228         
229         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
230         // START US825779
231         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
232         
233         
234         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
235         // TC1443736 - Update With One New Deployment Artifact
236         @Test
237         public void updateWithOneNewDeploymentArtifact() throws Exception {
238                 
239                 if(true){
240                         throw new SkipException("Open bug 310971 and 369139");                  
241                 }
242                 
243                 String fileName =  "ImportTC1443736.csar";
244                 String folder ="US825779";
245                 
246                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
247                 
248                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
249                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4"));
250                 
251                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, null);
252                 
253                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
254                 
255                 fileName = "UpdateTC1443736.csar";
256                 deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"));
257                 
258                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, null, null, null);
259         }
260         
261         
262         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
263         // TC1443737 - Update With One Removed Deployment Artifact
264         @Test
265         public void updateWithOneRemovedDeploymentArtifact() throws Exception {
266                 
267                 if(true){
268                         throw new SkipException("Open bug 310971 and 369139");                  
269                 }
270                 
271                 String fileName =  "ImportTC1443737.csar";
272                 String folder ="US825779";
273                 
274                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
275                 
276                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
277                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4"));
278                 ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1");
279                 deploymentArtifacts.add(artifactInfo);
280                 
281                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null);
282                 
283                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
284                 
285                 fileName = "UpdateTC1443737.csar";
286                 deploymentArtifacts.remove(artifactInfo);
287                 
288                 List<ArtifactInfo> deploymentArtifactsNotExist = new ArrayList<ArtifactInfo>();
289                 deploymentArtifactsNotExist.add(artifactInfo);
290                 
291                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, null, deploymentArtifactsNotExist, null);
292         }
293         
294         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
295         // TC1443738 - Update With One New Version Deployment Artifact
296         @Test
297         public void updateWithOneNewVersionDeploymentArtifact() throws Exception {
298                 
299                 if(true){
300                         throw new SkipException("Open bug 310971 and 369139");                  
301                 }
302                 
303                 String fileName =  "ImportTC1443738.csar";
304                 String folder ="US825779";
305                         
306                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
307                         
308                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
309                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4"));
310                 ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1");
311                 deploymentArtifacts.add(artifactInfo);
312                         
313                         
314                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null);
315                         
316                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
317                         
318                 fileName = "UpdateTC1443738.csar";
319                 artifactInfo.setArtifactVersion("2");
320                         
321                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, null, null, null);
322         }
323         
324         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
325         // TC1443887 - Update With One New Informational Artifact
326         @Test
327         public void updateWithOneNewInformationalArtifact() throws Exception {
328                 
329                 if(true){
330                         throw new SkipException("Open bug 310971 and 369139");                  
331                 }
332                 
333                 String fileName =  "ImportTC1443887.csar";
334                 String folder ="US825779";
335                         
336                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
337                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
338                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));                     
339                         
340                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, null);
341                         
342                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
343                         
344                 fileName = "UpdateTC1443887.csar";
345                 
346                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
347                 informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"));
348                         
349                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, informationalArtifacts, null, null);
350         }
351         
352         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
353         // TC1443888 - Update With One Removed Informational Artifact
354         @Test
355         public void updateWithOneRemovedInformationalArtifact() throws Exception {
356                 
357                 if(true){
358                         throw new SkipException("Open bug 310971 and 369139");                  
359                 }
360                 
361                 String folder ="US825779";
362                 String fileName =  "ImportTC1443888.csar";
363                         
364                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
365                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
366                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));                     
367                 
368                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
369                 ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1");
370                 informationalArtifacts.add(artifactInfo);
371                         
372                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, informationalArtifacts);
373                 
374                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
375                         
376                 fileName = "UpdateTC1443888.csar";
377                 
378                 informationalArtifacts.remove(artifactInfo);
379                 
380                 List<ArtifactInfo> informationalArtifactNotExist = new ArrayList<ArtifactInfo>();
381                 informationalArtifactNotExist.add(artifactInfo);
382                         
383                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, informationalArtifacts, null, informationalArtifactNotExist);
384         }
385         
386         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
387         // TC1443890 - Update With One New Artifact Version Informational Artifact
388         @Test
389         public void updateWithOneNewArtifactVersionInformationalArtifact() throws Exception {
390                 
391                 if(true){
392                         throw new SkipException("Open bug 310971 and 369139");                  
393                 }
394                 
395                 String folder ="US825779";
396                 String fileName =  "ImportTC1443890.csar";
397                         
398                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
399                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
400                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));                     
401                 
402                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
403                 ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1");
404                 informationalArtifacts.add(artifactInfo);
405                         
406                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, informationalArtifacts);
407                 
408                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
409                         
410                 fileName = "UpdateTC1443890.csar";
411                 artifactInfo.setArtifactVersion("2");
412                         
413                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, informationalArtifacts, null, null);
414         }
415         
416         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
417         // TC1443893 - Update CSAR With Same Artifacts As Imported
418         @Test
419         public void updateCSARWithSameArtifactsAsImported() throws Exception {
420                 
421                 if(true){
422                         throw new SkipException("Open bug 310971 and 369139");                  
423                 }
424                 
425                 String folder ="US825779";
426                 String fileName =  "ImportUpdateTC1443893.csar";
427                         
428                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
429                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
430                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));                     
431                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1"));
432                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1"));     
433                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
434                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
435                 deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1"));
436                 
437                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
438                 informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"));
439                 informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1"));
440                 informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1"));
441                         
442                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, informationalArtifacts);
443                 
444                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
445                         
446                 fileName = "ImportUpdateTC1443893.csar";
447                         
448                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, informationalArtifacts, null, null);
449         }
450         
451         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
452         // TC1443954 - Update With Multiple Changes In Deployment And Informational Artifacts
453         @Test
454         public void updateWithMultipleChangesInDeploymentAndInformationalArtifacts() throws Exception {
455                 String folder ="US825779";
456                 String fileName =  "ImportTC1443954.csar";
457                 
458                 ArtifactInfo deploymentHeat1 = new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1");
459                 ArtifactInfo deploymentHeat2 = new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1");
460                 ArtifactInfo deploymentHeat3 = new ArtifactInfo(null, "heatartifactname3.yaml", null, "heatartifactname3", ArtifactTypeEnum.HEAT.getType(), "1");
461                 
462                 ArtifactInfo deploymentHeatVol1 = new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1");
463                 ArtifactInfo deploymentHeatVol2 = new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1");
464                 
465                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
466                 deploymentArtifacts.add(deploymentHeat1);
467                 deploymentArtifacts.add(deploymentHeat2);
468                 deploymentArtifacts.add(deploymentHeat3);
469                 deploymentArtifacts.add(deploymentHeatVol1);
470                 deploymentArtifacts.add(deploymentHeatVol2);
471                 
472                 ArtifactInfo infoGuide1 = new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1");
473                 ArtifactInfo infoGuide2 = new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1");
474                 
475                 ArtifactInfo infoOther1 = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1");
476                 ArtifactInfo infoOther2 = new ArtifactInfo(null, "artifactname2.txt", null, "artifactname2", ArtifactTypeEnum.OTHER.getType(), "1");
477                 ArtifactInfo infoOther3 = new ArtifactInfo(null, "artifactname3.txt", null, "artifactname3", ArtifactTypeEnum.OTHER.getType(), "1");
478                 
479                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
480                 informationalArtifacts.add(infoGuide1);
481                 informationalArtifacts.add(infoGuide2);
482                 informationalArtifacts.add(infoOther1);
483                 informationalArtifacts.add(infoOther2);
484                 informationalArtifacts.add(infoOther3);
485                         
486                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, informationalArtifacts);
487                 
488                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
489                         
490                 fileName = "UpdateTC1443954.csar";
491                 
492                 List<ArtifactInfo> informationalArtifactsNotExist = new ArrayList<ArtifactInfo>();
493                 List<ArtifactInfo> deploymentArtifactsNotExist = new ArrayList<ArtifactInfo>();
494                 
495                 // Changes in deployment artifacts
496                 deploymentArtifactsNotExist.add(deploymentHeat1);
497                 deploymentArtifactsNotExist.add(deploymentHeat2);
498                 deploymentArtifacts.remove(deploymentHeat1);
499                 deploymentArtifacts.remove(deploymentHeat2);
500                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname4.yaml", null, "heatartifactname4", ArtifactTypeEnum.HEAT.getType(), "1"));
501                 deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname5.yaml", null, "heatartifactname5", ArtifactTypeEnum.HEAT.getType(), "1"));
502                 deploymentHeatVol1.setArtifactVersion("2");
503                 deploymentHeatVol2.setArtifactVersion("2");
504                 
505                 // Changes in informational artifacts
506                 infoGuide1.setArtifactVersion("2");
507                 infoOther1.setArtifactVersion("2");
508                 informationalArtifactsNotExist.add(infoGuide2);
509                 informationalArtifactsNotExist.add(infoOther2);
510                 informationalArtifacts.remove(infoGuide2);
511                 informationalArtifacts.remove(infoOther2);
512                 informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact3.yml", null, "GuideInfoArtifact3", ArtifactTypeEnum.GUIDE.getType(), "1"));
513                 informationalArtifacts.add(new ArtifactInfo(null, "artifactname4.txt", null, "artifactname4", ArtifactTypeEnum.OTHER.getType(), "1"));
514                         
515                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, informationalArtifacts, deploymentArtifactsNotExist, informationalArtifactsNotExist);
516         }
517         
518         
519         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
520         // TC1444206 - Update With Existed Deployment Artifact By Artifact With Different Type
521         @Test
522         public void updateWithExistedDeploymentArtifactByArtifactWithDifferentType() throws Exception {
523                 String folder ="US825779";
524                 String fileName =  "ImportTC1444206.csar";
525                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
526                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
527                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));                     
528                 deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"));
529                         
530                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, null);
531                 
532                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
533                         
534                 fileName = "UpdateTC1444206.csar";
535                 String filePath = FileHandling.getFilePath(folder); ;
536                         
537                 ResourceUIUtils.updateVfWithCsar(filePath, fileName);
538                 
539                 String errorMessage = GeneralUIUtils.getWebElementByClassName("w-sdc-modal-caption").getText();
540             String checkUIResponseOnError = ErrorValidationUtils.checkUIResponseOnError(ActionStatus.ARTIFACT_ALRADY_EXIST_IN_DIFFERENT_TYPE_IN_CSAR.name());
541             Assert.assertTrue(errorMessage.contains(checkUIResponseOnError));
542         }
543         
544         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
545         // TC1444207 - Update With Existed Informational Artifact By Artifact With Different Type
546         @Test
547         public void updateWithExistedInformationalArtifactByArtifactWithDifferentType() throws Exception {
548                 String folder ="US825779";
549                 String fileName =  "ImportTC1444207.csar";
550                         
551                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
552                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
553                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));             
554                 
555                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
556                 informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"));
557                         
558                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, informationalArtifacts);
559                 
560                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
561                 
562                 fileName = "UpdateTC1444207.csar";
563                 String filePath = FileHandling.getFilePath(folder); ;
564                         
565                 ResourceUIUtils.updateVfWithCsar(filePath, fileName);
566                 
567                 String errorMessage = GeneralUIUtils.getWebElementByClassName("w-sdc-modal-caption").getText();
568             String checkUIResponseOnError = ErrorValidationUtils.checkUIResponseOnError(ActionStatus.ARTIFACT_ALRADY_EXIST_IN_DIFFERENT_TYPE_IN_CSAR.name());
569             Assert.assertTrue(errorMessage.contains(checkUIResponseOnError));
570         }
571         
572         
573         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
574         // TC1444208 - Update With Existed Informational Artifact By Deployment Artifact With Different Type
575         @Test
576         public void updateWithExistedInformationalArtifactByDeploymentArtifactWithDifferentType() throws Exception {            
577                 String folder ="US825779";
578                 String fileName =  "ImportTC1444208.csar";
579                         
580                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
581                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
582                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));             
583                 deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"));
584                         
585                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, null);
586                 
587                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
588                 
589                 fileName = "UpdateTC1444208.csar";
590                 String filePath = FileHandling.getFilePath(folder); ;
591                                 
592                 ResourceUIUtils.updateVfWithCsar(filePath, fileName);
593                 
594                 String errorMessage = GeneralUIUtils.getWebElementByClassName("w-sdc-modal-caption").getText();
595             String checkUIResponseOnError = ErrorValidationUtils.checkUIResponseOnError(ActionStatus.ARTIFACT_ALRADY_EXIST_IN_DIFFERENT_TYPE_IN_CSAR.name());
596             Assert.assertTrue(errorMessage.contains(checkUIResponseOnError));
597         }
598         
599         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
600         // TC1444520 - Update Deployment Artifact With Name To Long
601         @Test
602         public void updateDeploymentArtifactWithNameToLong() throws Exception {
603                 String folder ="US825779";
604                 
605                 String fileName =  "ImportTC1444520.csar";
606                         
607                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  null, null);
608                 
609                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
610                 
611                 fileName = "UpdateTC1444520.csar";
612                 String filePath = FileHandling.getFilePath(folder); ;
613                                 
614                 ResourceUIUtils.updateVfWithCsar(filePath, fileName);
615                 
616                 String errorMessage = GeneralUIUtils.getWebElementByClassName("w-sdc-modal-caption").getText();
617             String checkUIResponseOnError = ErrorValidationUtils.checkUIResponseOnError(ActionStatus.EXCEEDS_LIMIT.name());
618             Assert.assertTrue(errorMessage.contains(checkUIResponseOnError));
619         }
620         
621         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
622         // TC1444521 - Update Informational Artifact With Name To Long
623         @Test
624         public void updateInformationalArtifactWithNameToLong() throws Exception {
625                 
626                 String folder = "US825779";
627                 String fileName =  "ImportTC1444521.csar";
628                         
629                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  null, null);
630                 
631                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
632                 
633                 fileName = "UpdateTC1444521.csar";
634                 String filePath = FileHandling.getFilePath(folder); ;
635                                 
636                 ResourceUIUtils.updateVfWithCsar(filePath, fileName);
637                 
638                 String errorMessage = GeneralUIUtils.getWebElementByClassName("w-sdc-modal-caption").getText();
639             String checkUIResponseOnError = ErrorValidationUtils.checkUIResponseOnError(ActionStatus.EXCEEDS_LIMIT.name());
640             Assert.assertTrue(errorMessage.contains(checkUIResponseOnError));
641         }
642         
643         // TODO: only after below TODO's it complete test
644         // TODO: verify that if delete/edit button need to be disabled then check that there is no such buttons
645         // TODO: in composition & artifact pages
646         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
647         // TC1444530 - Update Deployment Artifact With Invalid Type
648         @Test
649         public void updateDeploymentArtifactWithInvalidType() throws Exception {
650                 
651                 if(true){
652                         throw new SkipException("Open bug 310971 and 369139");                  
653                 }
654
655                 String folder ="US825779";
656                 String fileName =  "ImportTC1444530.csar";
657                 
658                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
659                 
660                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
661                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
662                 
663                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, null);
664                 
665                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
666                 
667                 fileName = "UpdateTC1444530.csar";
668                 deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"));
669                 
670                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, null, null, null);
671         }
672         
673         
674         // US825779 - Story: [BE] Import VSP - VF informational artifacts  - Update
675         // TC1444531 - Update Informational Artifact With Invalid Type
676         @Test
677         public void updateInformationalArtifactWithInvalidType() throws Exception {             
678                 String folder ="US825779";
679                 String fileName =  "ImportTC1444531.csar";
680                 
681                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  null, null);
682                 
683                 GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1");
684                 
685                 fileName = "UpdateTC1444531.csar";
686                 
687                 List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>();
688                 informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"));
689                 
690                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, null, informationalArtifacts, null, null);
691         }
692         
693         
694         @Test
695         public void importValidInformationalArtifactInInvalidFolerTest_TC1438313() throws Exception{
696                 String fileName =  "ValidArtifactNameInInvalidFolder.csar";
697                 String folder = "US824719";
698                 
699                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
700                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1"));
701                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));                     
702                 
703                 importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder,  deploymentArtifacts, null);
704         }
705         
706         @Test
707         public void updateValidInformationalArtifactInInvalidFolerTest_TC1444533() throws Exception{
708                 String fileName =  "ImportTC1444533.csar";
709                 String folder = "US824719";
710                 String filePath = FileHandling.getFilePath(folder);
711                 
712                 ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
713                 ResourceUIUtils.importVfFromCsar(resourceMetaData, filePath, fileName, getUser());
714                 
715                 String updatedCsarFileName = "UpdateTC1444533.csar";
716                 
717                 List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>();
718                 deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2"));
719                 deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4"));                     
720                 
721                 updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, updatedCsarFileName, deploymentArtifacts, null, null, null);
722         }
723         
724         
725         
726         
727         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
728         // END US825779
729         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
730         
731         
732         
733         public void updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(String folder, String fileName,
734                         List<ArtifactInfo> deploymentArtifacts, List<ArtifactInfo> informationalArtifacts,
735                         List<ArtifactInfo> deploymentArtifactsNotExist, List<ArtifactInfo> informationalArtifactsNotExist) throws Exception {
736                 String filePath = FileHandling.getFilePath(folder);
737                 ResourceUIUtils.updateVfWithCsar(filePath, fileName);
738                 
739                 validateDeploymentArtifactPage(deploymentArtifacts, null);
740                 validateInformationalArtifactPage(informationalArtifacts, null);
741                 
742                 ResourceGeneralPage.getLeftMenu().moveToCompositionScreen();
743                 
744                 validateDeploymentArtifactInComposition(deploymentArtifacts, null);
745                 validateInformationalArtifactInComposition(informationalArtifacts, null);
746                 
747         }
748         
749
750         public void importVfFromCsar(ResourceReqDetails resourceMetaData, String folder, String fileName, User user) {
751                 String filePath = FileHandling.getFilePath(folder);
752                 GeneralUIUtils.hoverOnAreaByTestId(Dashboard.IMPORT_AREA.getValue());
753                 // Insert file to the browse dialog
754                 WebElement browseWebElement = GeneralUIUtils.getInputElement(DataTestIdEnum.Dashboard.IMPORT_VF_FILE.getValue());
755                 browseWebElement.sendKeys(filePath + fileName);
756
757                 // Fill the general page fields.
758                 GeneralUIUtils.waitForLoader();
759                 ResourceUIUtils.fillResourceGeneralInformationPage(resourceMetaData, getUser(), true);
760                 GeneralUIUtils.clickOnAreaJS(DataTestIdEnum.GeneralElementsEnum.CREATE_BUTTON.getValue());
761         }
762
763         
764         
765         
766         public void importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(String fileName, String folder, List<ArtifactInfo> deploymentArtifacts, List<ArtifactInfo> informationalArtifacts) throws Exception {
767                 String filePath = FileHandling.getFilePath(folder);
768                 ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
769                 ResourceUIUtils.importVfFromCsar(resourceMetaData, filePath, fileName, getUser());
770                 
771                 validateDeploymentArtifactPage(deploymentArtifacts, null);
772                 validateInformationalArtifactPage(informationalArtifacts, null);
773                 
774                 ResourceGeneralPage.getLeftMenu().moveToCompositionScreen();
775                 
776                 validateDeploymentArtifactInComposition(deploymentArtifacts, null);
777                 validateInformationalArtifactInComposition(informationalArtifacts, null);
778         }
779         
780         public void validateInformationalArtifactInComposition(List<ArtifactInfo> informationalArtifacts, List<ArtifactInfo> informationalArtifactsNotExist) throws Exception {
781                 CompositionPage.showInformationArtifactTab();
782                 // Composition informational
783                 if(informationalArtifacts != null && informationalArtifacts.size() > 0) {
784                         validateEachArtifactOnCompositionRightMenuInformationPage(informationalArtifacts);
785                 }
786                 if(informationalArtifactsNotExist != null && informationalArtifactsNotExist.size() > 0) {
787                         validateEachArtifactNotExistOnCompositionRightMenuInformationPage(informationalArtifactsNotExist);
788                 }
789         }
790         
791         public void validateDeploymentArtifactInComposition(List<ArtifactInfo> deploymentArtifacts, List<ArtifactInfo> deploymentArtifactsNotExist) throws Exception {
792                 CompositionPage.showDeploymentArtifactTab();
793                 // Composition deployment
794                 if(deploymentArtifacts != null && deploymentArtifacts.size() > 0) {
795                         validateEachArtifactOnCompositionRightMenuDeploymentPage(deploymentArtifacts);
796                 }
797                 if(deploymentArtifactsNotExist != null && deploymentArtifactsNotExist.size() > 0) {
798                         validateEachArtifactNotExistOnCompositionRightMenuDeploymentPage(deploymentArtifactsNotExist);
799                 }
800         }
801         
802         public void validateInformationalArtifactPage(List<ArtifactInfo> informationalArtifacts, List<ArtifactInfo> informationalArtifactsNotExist) {
803                 ResourceGeneralPage.getLeftMenu().moveToInformationalArtifactScreen();
804                 // Informational page
805                 if(informationalArtifacts != null && informationalArtifacts.size() > 0) {       
806                         validateEachArtifactInformationPage(informationalArtifacts);
807                 }
808                 if(informationalArtifactsNotExist != null && informationalArtifactsNotExist.size() > 0) {       
809                         validateEachArtifactNotExistInformationPage(informationalArtifactsNotExist);
810                 }
811         }
812         
813         public void validateDeploymentArtifactPage(List<ArtifactInfo> deploymentArtifacts, List<ArtifactInfo> deploymentArtifactsNotExist) {
814                 ResourceGeneralPage.getLeftMenu().moveToDeploymentArtifactScreen();
815                 // Deployment page
816                 if(deploymentArtifacts != null && deploymentArtifacts.size() > 0) {
817                         validateEachArtifactOnDeploymentPage(deploymentArtifacts);
818                 }
819                 if(deploymentArtifactsNotExist != null && deploymentArtifactsNotExist.size() > 0) {
820                         validateEachArtifactNotExistOnDeploymentPage(deploymentArtifactsNotExist);
821                 }
822         }
823         
824         // TODO: add validation that if not editable / deleteable then button should not appear
825         public void validateEachArtifactOnDeploymentPage(List<ArtifactInfo> artifactInfoList) {
826                 for(ArtifactInfo artifact: artifactInfoList) {
827                         String type = artifact.getArtifactType();
828                         String label = artifact.getArtifactLabel();
829                         String version = artifact.getArtifactVersion();
830                         
831                         if (type.equals(ArtifactTypeEnum.HEAT.getType()) || type.equals(ArtifactTypeEnum.HEAT_VOL.getType()) || type.equals(ArtifactTypeEnum.HEAT_NET.getType())){
832                                 ArtifactUIUtils.validateExistArtifactOnDeploymentInformationPage(label, null, version, type, true, false, false, true);
833                         }
834                         else{
835                                 ArtifactUIUtils.validateExistArtifactOnDeploymentInformationPage(label, null, version, type, true, true, true, false);
836                         }
837                 }
838         }
839         
840         public void validateEachArtifactNotExistOnDeploymentPage(List<ArtifactInfo> artifactInfoList) {
841                 for(ArtifactInfo artifact: artifactInfoList) {
842                         ArtifactUIUtils.validateNotExistArtifactOnDeploymentInformationPage(artifact.getArtifactLabel());
843                 }
844         }
845         
846         public void validateEachArtifactInformationPage(List<ArtifactInfo> artifactInfoList) {
847                 for(ArtifactInfo artifact: artifactInfoList) {
848                         ArtifactUIUtils.validateExistArtifactOnDeploymentInformationPage(artifact.getArtifactLabel(), null, artifact.getArtifactVersion(), artifact.getArtifactType(), true, true, true, false);
849                 }
850         }
851         
852         public void validateEachArtifactNotExistInformationPage(List<ArtifactInfo> artifactInfoList) {
853                 for(ArtifactInfo artifact: artifactInfoList) {
854                         ArtifactUIUtils.validateNotExistArtifactOnDeploymentInformationPage(artifact.getArtifactLabel());
855                 }
856         }
857         
858         public void validateEachArtifactOnCompositionRightMenuDeploymentPage(List<ArtifactInfo> artifactInfoList) {
859                 for(ArtifactInfo artifact: artifactInfoList) {
860                         
861                         String type = artifact.getArtifactType();
862                         String label = artifact.getArtifactLabel();
863                         String filename = artifact.getFilename();
864                         
865                         if (type.equals(ArtifactTypeEnum.HEAT.getType()) || type.equals(ArtifactTypeEnum.HEAT_VOL.getType()) || type.equals(ArtifactTypeEnum.HEAT_NET.getType())){
866                                 ArtifactUIUtils.validateExistArtifactOnCompositionRightMenuDeploymentInformationPage(filename, label, false, true, true, false);
867                         }
868                         else{
869                                 ArtifactUIUtils.validateExistArtifactOnCompositionRightMenuDeploymentInformationPage(filename, label, true, false, true, true);
870                         }
871                 }
872         }
873         
874         public void validateEachArtifactNotExistOnCompositionRightMenuDeploymentPage(List<ArtifactInfo> artifactInfoList) {
875                 for(ArtifactInfo artifact: artifactInfoList) {
876                         ArtifactUIUtils.validateNotExistArtifactOnCompositionRightMenuDeploymentInformationPage(artifact.getArtifactLabel());
877                 }
878         }
879         
880         // TODO: there is defect in this flow
881         // TODO: change isEditable to false when defect fix
882         public void validateEachArtifactOnCompositionRightMenuInformationPage(List<ArtifactInfo> artifactInfoList) {
883                 for(ArtifactInfo artifact: artifactInfoList) {
884                         ArtifactUIUtils.validateExistArtifactOnCompositionRightMenuDeploymentInformationPage(artifact.getFilename(), artifact.getArtifactLabel(), true, false, true, true);
885                 }
886         }
887         
888         public void validateEachArtifactNotExistOnCompositionRightMenuInformationPage(List<ArtifactInfo> artifactInfoList) {
889                 for(ArtifactInfo artifact: artifactInfoList) {
890                         ArtifactUIUtils.validateNotExistArtifactOnCompositionRightMenuDeploymentInformationPage(artifact.getArtifactLabel());
891                 }
892         }
893
894
895
896         @Override
897         protected UserRoleEnum getRole() {
898                 return UserRoleEnum.DESIGNER;
899         }
900
901 }