diff --git a/cypress/e2e/models/migration/dynamicreports/issue.ts b/cypress/e2e/models/migration/issues/issues.ts
similarity index 93%
rename from cypress/e2e/models/migration/dynamicreports/issue.ts
rename to cypress/e2e/models/migration/issues/issues.ts
index 431583180..f49e3e82f 100644
--- a/cypress/e2e/models/migration/dynamicreports/issue.ts
+++ b/cypress/e2e/models/migration/issues/issues.ts
@@ -20,15 +20,15 @@ import {
targetFilterName,
} from "../../../views/issue.view";
-export class Issue {
+export class Issues {
/** Contains URL of issues web page */
static fullUrl = Cypress.env("tackleUrl") + "/issues";
public static openList(itemsPerPage = 100, forceReload = false): void {
if (forceReload) {
- cy.visit(Issue.fullUrl);
+ cy.visit(Issues.fullUrl);
}
- if (!getUrl().includes(Issue.fullUrl)) {
+ if (!getUrl().includes(Issues.fullUrl)) {
selectUserPerspective(migration);
}
clickByText(navMenu, "Issues");
@@ -45,6 +45,7 @@ export class Issue {
[filterIssue.target]: targetFilterName,
};
+ Issues.openList();
selectFilter(item);
if (selectorMap[item]) {
inputText(selectorMap[item], itemName);
diff --git a/cypress/e2e/tests/migration/issues/filter.test.ts b/cypress/e2e/tests/migration/issues/filter.test.ts
new file mode 100644
index 000000000..dd629a571
--- /dev/null
+++ b/cypress/e2e/tests/migration/issues/filter.test.ts
@@ -0,0 +1,67 @@
+/*
+Copyright © 2021 the Konveyor Contributors (https://konveyor.io/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+///
+
+import {
+ login,
+ getRandomApplicationData,
+ 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";
+let applicationsList: Array = [];
+
+describe(["@tier2"], "Issues filtering", () => {
+ before("Login", function () {
+ login();
+ });
+
+ beforeEach("Load data", function () {
+ cy.fixture("application").then(function (appData) {
+ this.appData = appData;
+ });
+ cy.fixture("analysis").then(function (analysisData) {
+ this.analysisData = analysisData;
+ });
+ });
+
+ it("Running analysis and filtering issues by app name", function () {
+ // For source code analysis application must have source code URL git or svn
+ const application = new Analysis(
+ getRandomApplicationData("bookserverApp", {
+ sourceData: this.appData["bookserver-app"],
+ }),
+ getRandomAnalysisData(this.analysisData["source_analysis_on_bookserverapp"])
+ );
+ application.create();
+ applicationsList.push(application);
+ cy.wait("@getApplication");
+ cy.wait(2 * SEC);
+ application.analyze();
+ application.verifyAnalysisStatus("Completed");
+
+ Issues.filterBy(filterIssue.appName, application.name);
+ cy.get("tr").should("not.contain", "No data available");
+ clearAllFilters();
+ });
+
+ after("Perform test data clean up", function () {
+ deleteByList(applicationsList);
+ });
+});
diff --git a/cypress/e2e/views/issue.view.ts b/cypress/e2e/views/issue.view.ts
index f0abe6ac1..10974719f 100644
--- a/cypress/e2e/views/issue.view.ts
+++ b/cypress/e2e/views/issue.view.ts
@@ -1,6 +1,6 @@
-export const appFilterName = "#application.name-input";
-export const bsFilterName = "#businessService.name-filter-value-select";
-export const tagFilterName = "#tag.id-filter-value-select";
+export const appFilterName = "#application\\.name-input";
+export const bsFilterName = "#businessService\\.name-filter-value-select";
+export const tagFilterName = "#tag\\.id-filter-value-select";
export const categoryFilterName = "#category-input";
export const sourceFilterName = "#source-input";
export const targetFilterName = "#target-input";