Catalog alignment
[sdc.git] / catalog-ui / cypress / integration / distribution_page.spec.js
1 import { initCommonFixtures } from "../common/init";
2
3 describe('Distribution Page', () => {
4     beforeEach(() => {
5     cy.server();
6     initCommonFixtures(cy);
7
8     cy.fixture('deployment-artifacts/metadata-service-with-vsp').as('metadata');
9     cy.fixture('distribution-page/distributionList').as('distributionList');
10     cy.fixture('distribution-page/distributionStatus').as('distributionStatus');
11 });
12
13 it('Test the No Distribution Label exist in case no distributions', function () {
14     cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
15
16     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
17     cy.visit(distributionPageUrl);
18
19     console.log('Make sure No Distributions To Present is visible');
20     cy.get('[data-tests-id="noDistributionsLabel"]').should('be.visible');
21     cy.get('[data-tests-id="noDistributionsLabel"]').should('have.text','No Distributions To Present');
22 });
23
24
25 it('Test Distribution Sum, Search and Refresh exist in case there are distributions', function () {
26     cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
27     cy.route('GET', '**/services/*/distribution', '@distributionList');
28
29     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
30     cy.visit(distributionPageUrl);
31
32     console.log('Make sure No Distributions To Present is visible');
33     cy.get('[data-tests-id="noDistributionsLabel"]').should('not.be.visible')
34
35     console.log('Make sure Number of Distributions is as expected');
36     cy.get('[data-tests-id="DistributionsLabel"]').should('be.visible');
37     cy.get('[data-tests-id="totalArtifacts"]').should('be.visible');
38     cy.get('[data-tests-id="DistributionsLabel"]').should('have.text','DISTRIBUTION [2]');
39
40     console.log('Make sure Filter text box appear is as expected');
41     cy.get('[data-tests-id="searchTextbox"]').should('be.visible');
42
43     console.log('Make sure refresh button appear is as expected');
44     cy.get('[data-tests-id="refreshButton"]').should('be.visible');
45 });
46
47 it('Test Filter Distributions as expectd', function () {
48     cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
49     cy.route('GET', '**/services/*/distribution', '@distributionList');
50
51     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
52     cy.visit(distributionPageUrl);
53
54     console.log('Make sure 2 Distributions are presented in the table');
55     cy.get('[data-tests-id="expandIcon_d2595"]').should('be.visible');
56
57     cy.get('[data-tests-id="distID_d2595"]').should('be.visible');
58     cy.get('[data-tests-id="userID_d2595"]').should('be.visible');
59     cy.get('[data-tests-id="timeStamp_d2595"]').should('be.visible');
60     cy.get('[data-tests-id="status_d2595"]').should('be.visible');
61
62     cy.get('[data-tests-id="distID_9a5b5"]').should('be.visible');
63     cy.get('[data-tests-id="userID_9a5b5"]').should('be.visible');
64     cy.get('[data-tests-id="timeStamp_9a5b5"]').should('be.visible');
65     cy.get('[data-tests-id="status_9a5b5"]').should('be.visible');
66
67     console.log('Verify the Distribution details in the Distributions Table');
68     cy.get('[data-tests-id="distID_9a5b5"]').should('have.text','9a5b5a9d-5d52-40df-bd62-fe71e7c01b85');
69     cy.get('[data-tests-id="userID_9a5b5"]').should('have.text','Aretha Franklin(op0001)');
70     cy.get('[data-tests-id="timeStamp_9a5b5"]').should('have.text','2019-07-25 09:47:55.849 UTC ');
71     cy.get('[data-tests-id="status_9a5b5"]').should('contains.text','Distributed');
72
73     console.log('Insert filter criteria to the input text box');
74     cy.get('[data-tests-id="searchTextbox"]').type('9a');
75
76     console.log('Verify that distribution that should not be displayed is not in the table');
77     cy.get('[data-tests-id="distID_d2595"]').should('not.be.visible');
78     cy.get('[data-tests-id="userID_d2595"]').should('not.be.visible');
79     cy.get('[data-tests-id="timeStamp_d2595"]').should('not.be.visible');
80     cy.get('[data-tests-id="status_d2595"]').should('not.be.visible');
81
82     console.log('Clear the filter');
83     cy.get('[data-tests-id="searchTextbox"]').clear();
84
85     console.log('Verify all appear as expected');
86     cy.get('[data-tests-id="distID_d2595"]').should('be.visible');
87     cy.get('[data-tests-id="userID_d2595"]').should('be.visible');
88     cy.get('[data-tests-id="timeStamp_d2595"]').should('be.visible');
89     cy.get('[data-tests-id="status_d2595"]').should('be.visible');
90
91     cy.get('[data-tests-id="distID_9a5b5"]').should('be.visible');
92     cy.get('[data-tests-id="userID_9a5b5"]').should('be.visible');
93     cy.get('[data-tests-id="timeStamp_9a5b5"]').should('be.visible');
94     cy.get('[data-tests-id="status_9a5b5"]').should('be.visible');
95 });
96
97     it('Test Distribution and Component Statuses for specific Distribution ID', function () {
98         cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
99         cy.route('GET', '**/services/*/distribution', '@distributionList');
100         cy.route('GET', '**/services/distribution/9a5b5a9d-5d52-40df-bd62-fe71e7c01b85', '@distributionStatus');
101
102     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
103     cy.visit(distributionPageUrl);
104
105     console.log('Click on specific DistributionID to display its status');
106     cy.get('[data-tests-id="expandIcon_9a5b5"]').click();
107
108     console.log('Verify Total Artifacts label for Distribution');
109     cy.get('[data-tests-id="totalDistributionArtifactsLabel"]').should('be.visible');
110     cy.get('[data-tests-id="totalDistributionArtifactsLabel"]').should('have.text','Total Artifacts 8 ');
111
112     console.log('Verify Total Notified label for Distribution');
113     cy.get('[data-tests-id="totalDistributionNotifiedArtifactsLabel"]').should('be.visible');
114     cy.get('[data-tests-id="totalDistributionNotifiedArtifactsLabel"]').should('have.text','Notified 1');
115
116     console.log('Verify Total Downloaded label for Distribution');
117     cy.get('[data-tests-id="totalDistributionDownloadedArtifactsLabel"]').should('be.visible');
118     cy.get('[data-tests-id="totalDistributionDownloadedArtifactsLabel"]').should('have.text','Downloaded 1');
119
120     console.log('Verify Total Deployed label for Distribution');
121     cy.get('[data-tests-id="totalDistributionDeployedArtifactsLabel"]').should('be.visible');
122     cy.get('[data-tests-id="totalDistributionDeployedArtifactsLabel"]').should('have.text','Deployed 1');
123
124     console.log('Verify Total Not Notified label for Distribution');
125     cy.get('[data-tests-id="totalDistributionNotNotifiedArtifactsLabel"]').should('be.visible');
126     cy.get('[data-tests-id="totalDistributionNotNotifiedArtifactsLabel"]').should('have.text','Not Notified 1');
127
128     console.log('Verify Total Download Errors label for Distribution');
129     cy.get('[data-tests-id="totalDistributionDownloadErrorArtifactsLabel"]').should('be.visible');
130     cy.get('[data-tests-id="totalDistributionDownloadErrorArtifactsLabel"]').should('have.text','Download Errors 1');
131
132     console.log('Verify Total Deploy Errors label for Distribution');
133     cy.get('[data-tests-id="totalDistributionDeployErrorArtifactsLabel"]').should('be.visible');
134     cy.get('[data-tests-id="totalDistributionDeployErrorArtifactsLabel"]').should('have.text','Deploy Errors 1');
135
136
137
138     console.log('Verify Total Artifacts label for Consumer1');
139     cy.get('[data-tests-id="totalConsumer1ArtifactsLabel"]').should('be.visible');
140     cy.get('[data-tests-id="totalConsumer1ArtifactsLabel"]').should('have.text','Consumer1 1');
141
142     console.log('Verify Total Notified label for Consumer1');
143     cy.get('[data-tests-id="totalConsumer1NotifiedArtifactsLabel"]').should('be.visible');
144     cy.get('[data-tests-id="totalConsumer1NotifiedArtifactsLabel"]').should('have.text','Notified 1');
145
146     console.log('Verify Total Downloaded label for Consumer1');
147     cy.get('[data-tests-id="totalConsumer1DownloadedArtifactsLabel"]').should('be.visible');
148     cy.get('[data-tests-id="totalConsumer1DownloadedArtifactsLabel"]').should('have.text','Downloaded 0');
149
150     console.log('Verify Total Deployed label for Consumer1');
151     cy.get('[data-tests-id="totalConsumer1DeployedArtifactsLabel"]').should('be.visible');
152     cy.get('[data-tests-id="totalConsumer1DeployedArtifactsLabel"]').should('have.text','Deployed 0');
153
154     console.log('Verify Total Not Notified label for Consumer1');
155     cy.get('[data-tests-id="totalConsumer1NotNotifiedArtifactsLabel"]').should('be.visible');
156     cy.get('[data-tests-id="totalConsumer1NotNotifiedArtifactsLabel"]').should('have.text','Not Notified 0');
157
158     console.log('Verify Total Download Errors label for Consumer1');
159     cy.get('[data-tests-id="totalConsumer1DownloadErrorsArtifactsLabel"]').should('be.visible');
160     cy.get('[data-tests-id="totalConsumer1DownloadErrorsArtifactsLabel"]').should('have.text','Download Errors 0');
161
162     console.log('Verify Total Deploy Errors label for Consumer1');
163     cy.get('[data-tests-id="totalConsumer1DeployErrorsArtifactsLabel"]').should('be.visible');
164     cy.get('[data-tests-id="totalConsumer1DeployErrorsArtifactsLabel"]').should('have.text','Deploy Errors 0');
165
166
167
168
169     console.log('Verify Total Artifacts label for Consumer2');
170     cy.get('[data-tests-id="totalConsumer2ArtifactsLabel"]').should('have.text','Consumer2 2');
171
172     console.log('Verify Total Notified label for Consumer2');
173     cy.get('[data-tests-id="totalConsumer2NotifiedArtifactsLabel"]').should('have.text','Notified 0');
174
175     console.log('Verify Total Downloaded label for Consumer2');
176     cy.get('[data-tests-id="totalConsumer2DownloadedArtifactsLabel"]').should('have.text','Downloaded 1');
177
178     console.log('Verify Total Deployed label for Consumer2');
179     cy.get('[data-tests-id="totalConsumer2DeployedArtifactsLabel"]').should('have.text','Deployed 1');
180
181     console.log('Verify Total Not Notified label for Consumer2');
182     cy.get('[data-tests-id="totalConsumer2NotNotifiedArtifactsLabel"]').should('have.text','Not Notified 0');
183
184     console.log('Verify Total Download Errors label for Consumer2');
185     cy.get('[data-tests-id="totalConsumer2DownloadErrorsArtifactsLabel"]').should('have.text','Download Errors 0');
186
187     console.log('Verify Total Deploy Errors label for Consumer2');
188     cy.get('[data-tests-id="totalConsumer2DeployErrorsArtifactsLabel"]').should('have.text','Deploy Errors 0');
189
190
191
192
193
194     console.log('Verify Total Artifacts label for Consumer3');
195     cy.get('[data-tests-id="totalConsumer3ArtifactsLabel"]').should('have.text','Consumer3 2');
196
197     console.log('Verify Total Notified label for Consumer3');
198     cy.get('[data-tests-id="totalConsumer3NotifiedArtifactsLabel"]').should('have.text','Notified 0');
199
200     console.log('Verify Total Downloaded label for Consumer3');
201     cy.get('[data-tests-id="totalConsumer3DownloadedArtifactsLabel"]').should('have.text','Downloaded 0');
202
203     console.log('Verify Total Deployed label for Consumer3');
204     cy.get('[data-tests-id="totalConsumer3DeployedArtifactsLabel"]').should('have.text','Deployed 0');
205
206     console.log('Verify Total Not Notified label for Consumer3');
207     cy.get('[data-tests-id="totalConsumer3NotNotifiedArtifactsLabel"]').should('have.text','Not Notified 1');
208
209     console.log('Verify Total Download Errors label for Consumer3');
210     cy.get('[data-tests-id="totalConsumer3DownloadErrorsArtifactsLabel"]').should('have.text','Download Errors 0');
211
212     console.log('Verify Total Deploy Errors label for Consumer3');
213     cy.get('[data-tests-id="totalConsumer3DeployErrorsArtifactsLabel"]').should('have.text','Deploy Errors 1');
214
215
216
217
218
219
220     console.log('Verify Total Artifacts label for Consumer4');
221     cy.get('[data-tests-id="totalConsumer4ArtifactsLabel"]').should('have.text','Consumer4 1');
222
223     console.log('Verify Total Notified label for Consumer4');
224     cy.get('[data-tests-id="totalConsumer4NotifiedArtifactsLabel"]').should('have.text','Notified 0');
225
226     console.log('Verify Total Downloaded label for Consumer4');
227     cy.get('[data-tests-id="totalConsumer4DownloadedArtifactsLabel"]').should('have.text','Downloaded 0');
228
229     console.log('Verify Total Deployed label for Consumer4');
230     cy.get('[data-tests-id="totalConsumer4DeployedArtifactsLabel"]').should('have.text','Deployed 0');
231
232     console.log('Verify Total Not Notified label for Consumer4');
233     cy.get('[data-tests-id="totalConsumer4NotNotifiedArtifactsLabel"]').should('have.text','Not Notified 0');
234
235     console.log('Verify Total Download Errors label for Consumer4');
236     cy.get('[data-tests-id="totalConsumer4DownloadErrorsArtifactsLabel"]').should('have.text','Download Errors 0');
237
238     console.log('Verify Total Deploy Errors label for Consumer4');
239     cy.get('[data-tests-id="totalConsumer4DeployErrorsArtifactsLabel"]').should('have.text','Deploy Errors 0');
240
241
242
243     console.log('Verify Total Artifacts label for Consumer5');
244     cy.get('[data-tests-id="totalConsumer5ArtifactsLabel"]').should('have.text','Consumer5 1');
245
246
247
248     console.log('Verify Total Artifacts label for Consumer6');
249     cy.get('[data-tests-id="totalConsumer6ArtifactsLabel"]').should('have.text','Consumer6 1');
250
251     console.log('Verify Total Download Errors label for Consumer6');
252     cy.get('[data-tests-id="totalConsumer6DownloadErrorsArtifactsLabel"]').should('have.text','Download Errors 1');
253
254 });
255
256 it('Test Artifacts table for Specific Consumer and specific Artifact', function () {
257     cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
258     cy.route('GET', '**/services/*/distribution', '@distributionList');
259     cy.route('GET', '**/services/distribution/9a5b5a9d-5d52-40df-bd62-fe71e7c01b85', '@distributionStatus');
260
261     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
262     cy.visit(distributionPageUrl);
263
264     console.log('Click on specific DistributionID icon to display its status');
265     cy.get('[data-tests-id="expandIcon_9a5b5"]').click();
266
267     console.log('Click on specific ServiceID icon to display its artifacts');
268     cy.get('[data-tests-id="expandIcon_Consumer1"]').click();
269
270     console.log('Verify ComponentID for Consumer: Consumer1, artifact: artifact1');
271     cy.get('[data-tests-id="compID_Consumer1_artifact1.env"]').should('be.visible');
272     cy.get('[data-tests-id="compID_Consumer1_artifact1.env"]').should('contain.text','Consumer1');
273
274     console.log('Verify Artifact Name for Consumer: Consumer1, artifact: artifact1');
275     cy.get('[data-tests-id="artName_Consumer1_artifact1.env"]').should('be.visible');
276     cy.get('[data-tests-id="artName_Consumer1_artifact1.env"]').should('have.text','artifact1.env');
277
278     console.log('Verify URL for Consumer: Consumer1, artifact: artifact1');
279     cy.get('[data-tests-id="url_Consumer1_artifact1.env"]').should('have.text','url/artifacts/artifact1.env');
280
281     console.log('Verify Time for Consumer: Consumer1, artifact: artifact1');
282     cy.get('[data-tests-id="time_Consumer1_artifact1.env"]').should('contain.text','7/25/19, 9:47 AM');
283
284     console.log('Verify Status for Consumer: Consumer1, artifact: artifact1');
285     cy.get('[data-tests-id="status_Consumer1_artifact1.env"]').should('have.text','NOTIFIED');
286
287     cy.get('[data-tests-id="expandIcon_Consumer2"]').click();
288     cy.get('[data-tests-id="compID_Consumer2_artifact2_1.csar"]').should('contain.text','Consumer2');
289     cy.get('[data-tests-id="artName_Consumer2_artifact2_1.csar"]').should('contain.text','artifact2_1.csar');
290     cy.get('[data-tests-id="time_Consumer2_artifact2_1.csar"]').should('contain.text','7/25/19, 9:47 AM');
291     cy.get('[data-tests-id="status_Consumer2_artifact2_1.csar"]').should('contain.text','DOWNLOAD_OK');
292
293     cy.get('[data-tests-id="compID_Consumer2_artifact2_2.csar"]').should('contain.text','Consumer2');
294     cy.get('[data-tests-id="artName_Consumer2_artifact2_2.csar"]').should('contain.text','artifact2_2.csar');
295     cy.get('[data-tests-id="time_Consumer2_artifact2_2.csar"]').should('contain.text','7/25/19, 9:47 AM');
296     cy.get('[data-tests-id="status_Consumer2_artifact2_2.csar"]').should('contain.text','DEPLOY_OK');
297
298 });
299
300 it('Test Artifacts Notifications for Specific Consumer and specific Artifact', function () {
301     cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
302     cy.route('GET', '**/services/*/distribution', '@distributionList');
303     cy.route('GET', '**/services/distribution/9a5b5a9d-5d52-40df-bd62-fe71e7c01b85', '@distributionStatus');
304
305     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
306     cy.visit(distributionPageUrl);
307
308     console.log('Click on specific DistributionID to display its status');
309     cy.get('[data-tests-id="expandIcon_9a5b5"]').click();
310
311     console.log('Click on specific ServiceID icon to display its artifacts');
312     cy.get('[data-tests-id="expandIcon_Consumer5"]').click();
313
314     console.log('Click on specific artifact to verify its notifications');
315     cy.get('[data-tests-id="expandIcon_compID_Consumer5_ArtifactWithTwoStatuses"]').click();
316
317     console.log('Verify EARLIER_STATUS Time Stamp');
318     cy.get('[data-tests-id="statusTimeStamp_EARLIER_STATUS_Consumer5_ArtifactWithTwoStatuses"]').should('be.visible');
319     cy.get('[data-tests-id="statusTimeStamp_EARLIER_STATUS_Consumer5_ArtifactWithTwoStatuses"]').should('have.text','7/24/19, 9:47 AM');
320
321     console.log('Verify EARLIER_STATUS Status Value');
322     cy.get('[data-tests-id="statusValue_EARLIER_STATUS_Consumer5_ArtifactWithTwoStatuses"]').should('be.visible');
323     cy.get('[data-tests-id="statusValue_EARLIER_STATUS_Consumer5_ArtifactWithTwoStatuses"]').should('have.text','EARLIER_STATUS');
324
325     console.log('Verify LATEST_STATUS Time Stamp');
326     cy.get('[data-tests-id="statusTimeStamp_LATEST_STATUS_Consumer5_ArtifactWithTwoStatuses"]').should('be.visible');
327     cy.get('[data-tests-id="statusTimeStamp_LATEST_STATUS_Consumer5_ArtifactWithTwoStatuses"]').should('have.text','7/25/19, 9:47 AM');
328
329     console.log('Verify LATEST_STATUS Status Value');
330     cy.get('[data-tests-id="statusValue_LATEST_STATUS_Consumer5_ArtifactWithTwoStatuses"]').should('be.visible');
331     cy.get('[data-tests-id="statusValue_LATEST_STATUS_Consumer5_ArtifactWithTwoStatuses"]').should('have.text','LATEST_STATUS');
332
333     console.log('Verify LATEST_STATUS Status apear in the component (verify that the last time stamp appear)');
334     cy.get('[data-tests-id="status_Consumer5_ArtifactWithTwoStatuses"]').should('have.text','LATEST_STATUS');
335 });
336
337     it('Test Open Notified Modal for specific Distribution ID', function () {
338         cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
339         cy.route('GET', '**/services/*/distribution', '@distributionList');
340         cy.route('GET', '**/services/distribution/9a5b5a9d-5d52-40df-bd62-fe71e7c01b85', '@distributionStatus');
341
342     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
343     cy.visit(distributionPageUrl);
344
345     console.log('Click on specific DistributionID to display its status');
346     cy.get('[data-tests-id="expandIcon_9a5b5"]').click();
347
348     //Clicks on "Total Artifacts Label"
349     console.log('Click on Notified to display its Modal');
350     cy.get('[data-tests-id="totalDistributionNotifiedArtifactsLabel"]').click();
351
352
353     console.log('Make sure the Distributions are presented in the table');
354     cy.get('[data-tests-id="distID_9a5b5_Modal"]').should('be.visible');
355
356     console.log('Verify the Distribution details in the Distributions Table');
357     cy.get('[data-tests-id="distID_9a5b5_Modal"]').should('have.text','9a5b5a9d-5d52-40df-bd62-fe71e7c01b85');
358
359     console.log('Open the Modal details')
360     cy.get('[data-tests-id="expandIcon_9a5b5_Modal"]').click()
361
362     console.log('Verify Status Notify and its summary in the Modal');
363     cy.get('[data-tests-id="modalStatusLabel"]').should('be.visible');
364     cy.get('[data-tests-id="modalStatusLabel"]').should('have.text','Status NOTIFIED 1');
365
366
367     console.log('Verify Component1 and Component2, 3, 4 & 5 and their summary in the Modal');
368     cy.get('[data-tests-id="modalComponentLabel"]').should('be.visible');
369     cy.get('[data-tests-id="modalComponentLabel"]').should('contains.text','Consumer1 1');
370     cy.get('[data-tests-id="modalComponentLabel"]').should('contains.text','Consumer2 0');
371     cy.get('[data-tests-id="modalComponentLabel"]').should('contains.text','Consumer3 0');
372     cy.get('[data-tests-id="modalComponentLabel"]').should('contains.text','Consumer4 0');
373     cy.get('[data-tests-id="modalComponentLabel"]').should('contains.text','Consumer5 0');
374     cy.get('[data-tests-id="modalComponentLabel"]').should('contains.text','Consumer6 0');
375
376     console.log('Open to display he component statuses');
377     cy.get('[data-tests-id="expandIcon_Consumer1_ForModal"]').click();
378     cy.get('[data-tests-id="expandIcon_compID_Consumer1_artifact1.env"]').click();
379
380     console.log('Verify Status & TimeStamp');
381
382     cy.get('[data-tests-id="time_Consumer1_artifact1.env"]').should('contain.text','7/25/19, 9:47 AM');
383     cy.get('[data-tests-id="statusValue_NOTIFIED_Consumer1_artifact1.env"]').should('have.text','NOTIFIED');
384
385     console.log('Close the Modal');
386     cy.get('[data-tests-id="button-close"]').should('be.visible');
387     cy.get('[data-tests-id="button-close"]').click();
388 });
389
390 it('Verify Mark As Deploy button appear for Designer', function () {
391     cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
392     cy.route('GET', '**/services/*/distribution', '@distributionList');
393
394     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
395     cy.visit(distributionPageUrl);
396
397     console.log('Make sure Mark As Deploy button Exist');
398     cy.get('[class="btnMarkAsDistributed"]').should('be.visible');
399 });
400
401 it('Verify COMPONENT_DONE_OK and COMPONENT_DONE_ERROR appear for relevant components', function () {
402     cy.route('GET', '**/services/*/filteredDataByParams?include=metadata', '@metadata');
403     cy.route('GET', '**/services/*/distribution', '@distributionList');
404     cy.route('GET', '**/services/distribution/9a5b5a9d-5d52-40df-bd62-fe71e7c01b85', '@distributionStatus');
405
406     const distributionPageUrl = '#!/dashboard/workspace/' + this.metadata.metadata.uniqueId + '/service/distribution';
407     cy.visit(distributionPageUrl);
408
409     console.log('Click on specific DistributionID icon to display its status');
410     cy.get('[data-tests-id="expandIcon_9a5b5"]').click();
411
412
413     cy.get('[class="msoStatus green"]').should('contain.text','COMPONENT_DONE_OK');
414     cy.get('[class="msoStatus red"]').should('contain.text','COMPONENT_DONE_ERROR');
415 });
416
417 });