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