-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFR] Added sorting test for single app issues (#922)
* Added sorting test for single app issues Signed-off-by: Igor Braginsky <[email protected]> * Updated tests to make them shorter Signed-off-by: Igor Braginsky <[email protected]> * Some fixes by Shveta's request Signed-off-by: Igor Braginsky <[email protected]> --------- Signed-off-by: Igor Braginsky <[email protected]>
- Loading branch information
Showing
2 changed files
with
62 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
cypress/e2e/tests/migration/dynamic-report/issues/singleApplication/sort.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Analysis } from "../../../../../models/migration/applicationinventory/analysis"; | ||
import { | ||
getRandomAnalysisData, | ||
getRandomApplicationData, | ||
login, | ||
validateSortBy, | ||
} from "../../../../../../utils/utils"; | ||
import { SEC } from "../../../../../types/constants"; | ||
import { Issues } from "../../../../../models/migration/dynamic-report/issues/issues"; | ||
|
||
describe(["@tier2"], "Issues sort validations", function () { | ||
let application: Analysis; | ||
const sortByList = ["Issue", "Category", "Effort", "Affected files"]; | ||
|
||
before("Load data", function () { | ||
login(); | ||
cy.fixture("application").then(function (appData) { | ||
this.appData = appData; | ||
}); | ||
cy.fixture("analysis").then(function (analysisData) { | ||
this.analysisData = analysisData; | ||
}); | ||
|
||
cy.intercept("GET", "/hub/application*").as("getApplication"); | ||
}); | ||
|
||
it("Creating data for sorting", function () { | ||
application = new Analysis( | ||
getRandomApplicationData("daytrader-app", { | ||
sourceData: this.appData["daytrader-app"], | ||
}), | ||
getRandomAnalysisData(this.analysisData["source+dep_analysis_on_daytrader-app"]) | ||
); | ||
application.create(); | ||
cy.wait("@getApplication"); | ||
application.analyze(); | ||
cy.wait(2 * SEC); | ||
application.verifyAnalysisStatus("Completed"); | ||
}); | ||
|
||
sortByList.forEach((column) => { | ||
it(`${ | ||
column == "Issue" ? "BUG MTA-2067 - " : "" | ||
}Sort single application issues by ${column}`, function () { | ||
Issues.openSingleApplication(application.name); | ||
validateSortBy(column); | ||
}); | ||
}); | ||
|
||
after("Perform test data clean up", function () { | ||
Analysis.open(true); | ||
application.delete(); | ||
}); | ||
}); |