Skip to content

Commit 7360daa

Browse files
authored
Update assessment miscellaneous.test.ts (konveyor#1690)
Signed-off-by: Nandini Chandra <[email protected]>
1 parent c3eab52 commit 7360daa

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

cypress/e2e/models/migration/applicationinventory/application.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,15 +407,14 @@ export class Application {
407407
* Verify that tags and categories are present on Application details -> Tags page
408408
* @param tags tag or list of tags or list of category, tags
409409
*/
410-
tagAndCategoryExists(tags: string | string[] | [string, string[]][]): void {
410+
tagAndCategoryExists(tags: string | [string, string] | [string, string[]][]): void {
411411
if (typeof tags === "string") {
412412
// Case: single tag
413413
cy.get(appDetailsView.applicationTag).should("contain", tags);
414414
} else if (Array.isArray(tags) && typeof tags[0] === "string") {
415415
// Case: array of strings
416-
(tags as string[]).forEach((tag) => {
417-
cy.get(appDetailsView.applicationTag).should("contain", tag);
418-
});
416+
cy.get(appDetailsView.tagCategory).should("contain", tags[0]);
417+
cy.get(appDetailsView.applicationTag).should("contain", tags[1]);
419418
} else {
420419
// Case: [category, [tags]] pairs
421420
(tags as [string, string[]][]).forEach(([category, tagList]) => {

cypress/e2e/tests/migration/applicationinventory/assessment/miscellaneous.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ describe(["@tier3"], "Tests related to application assessment and review", () =>
337337
// Automates Polarion MTA-519 Validate application tag filtration
338338
application.validateTagsCount("2");
339339
application.filterTags("Assessment"); // Verify assessment tag is applied to application
340-
application.tagAndCategoryExists([assessmentTag]);
340+
application.tagAndCategoryExists(assessmentTag);
341341
application.tagAndCategoryDontExist([archetypeTag, ["Language", "C"]]);
342342
application.closeApplicationDetails();
343343

@@ -366,12 +366,12 @@ describe(["@tier3"], "Tests related to application assessment and review", () =>
366366

367367
// Verify archetype tag and assessment tag are present on application details page
368368
application2.filterTags("Archetype");
369-
application2.tagAndCategoryExists([archetypeTag]);
369+
application2.tagAndCategoryExists(archetypeTag);
370370
application2.tagAndCategoryDontExist([assessmentTag, ["Language", "Java"]]);
371371
application2.closeApplicationDetails();
372372

373373
application2.filterTags("Assessment");
374-
application2.tagAndCategoryExists([assessmentTag]);
374+
application2.tagAndCategoryExists(assessmentTag);
375375
application2.tagAndCategoryDontExist([archetypeTag, ["Language", "Java"]]);
376376
application2.closeApplicationDetails();
377377

0 commit comments

Comments
 (0)