diff --git a/cypress/e2e/models/migration/issues/issues.ts b/cypress/e2e/models/migration/issues/issues.ts index 86c3efc44..be0611bdb 100644 --- a/cypress/e2e/models/migration/issues/issues.ts +++ b/cypress/e2e/models/migration/issues/issues.ts @@ -60,7 +60,7 @@ export class Issues { click(searchButton); } else if (item == filterIssue.bs && !Array.isArray(itemName)) { click(bsFilterName); - clickWithinByText(bsFilterName, button, itemName); + clickByText(button, itemName); } else if (item == filterIssue.tags && Array.isArray(itemName)) { click(tagFilterName); itemName.forEach((name) => { diff --git a/cypress/e2e/tests/migration/issues/filter.test.ts b/cypress/e2e/tests/migration/issues/all-issues/filter.test.ts similarity index 70% rename from cypress/e2e/tests/migration/issues/filter.test.ts rename to cypress/e2e/tests/migration/issues/all-issues/filter.test.ts index 81c804f78..5e8bf449a 100644 --- a/cypress/e2e/tests/migration/issues/filter.test.ts +++ b/cypress/e2e/tests/migration/issues/all-issues/filter.test.ts @@ -21,15 +21,21 @@ import { getRandomAnalysisData, deleteByList, clearAllFilters, -} from "../../../../utils/utils"; -import { Analysis } from "../../../models/migration/applicationinventory/analysis"; -import { SEC, filterIssue } from "../../../types/constants"; -import { Issues } from "../../../models/migration/issues/issues"; +} from "../../../../../utils/utils"; +import { Analysis } from "../../../../models/migration/applicationinventory/analysis"; +import { SEC, filterIssue } from "../../../../types/constants"; +import { Issues } from "../../../../models/migration/issues/issues"; +import { BusinessServices } from "../../../../models/migration/controls/businessservices"; +import * as data from "../../../../../utils/data_utils"; let applicationsList: Array = []; +let appBusinessService: BusinessServices; + describe(["@tier2"], "Issues filtering", () => { before("Login", function () { login(); + appBusinessService = new BusinessServices(data.getCompanyName(), data.getDescription()); + appBusinessService.create(); }); beforeEach("Load data", function () { @@ -49,6 +55,7 @@ describe(["@tier2"], "Issues filtering", () => { }), getRandomAnalysisData(this.analysisData["source_analysis_on_bookserverapp"]) ); + application.business = appBusinessService.name; application.create(); applicationsList.push(application); cy.wait(2 * SEC); @@ -60,7 +67,14 @@ describe(["@tier2"], "Issues filtering", () => { clearAllFilters(); }); + it("Filtering issues by BS", function () { + Issues.filterBy(filterIssue.bs, appBusinessService.name); + cy.get("tr").should("not.contain", "No data available"); + clearAllFilters(); + }); + after("Perform test data clean up", function () { deleteByList(applicationsList); + appBusinessService.delete(); }); });