Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFR] Fix analysis and assessment metric tests #825

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cypress/e2e/tests/custom-metrics/analysis_metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe(["@tier2"], "Custom Metrics - Count the total number of initiated analy
metrics.getValue(metricName).then((counterValue) => {
counter = counterValue;
});
Application.open(true);
});

it("Perform analyses - Validate the tasks initiated counter increased", function () {
Expand All @@ -65,6 +66,7 @@ describe(["@tier2"], "Custom Metrics - Count the total number of initiated analy
counter++;
applicationList.push(bookServerApp);

Application.open(true);
const application = new Analysis(
getRandomApplicationData("uploadBinary"),
getRandomAnalysisData(this.analysisData["uploadbinary_analysis_on_acmeair"])
Expand Down
6 changes: 5 additions & 1 deletion cypress/e2e/tests/custom-metrics/assessment_metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ import {
import { Assessment } from "../../models/migration/applicationinventory/assessment";
import { Metrics } from "../../models/migration/custom-metrics/custom-metrics";
import { Stakeholders } from "../../models/migration/controls/stakeholders";
import { AssessmentQuestionnaire } from "../../models/administration/assessment_questionnaire/assessment_questionnaire";
import { Application } from "../../models/migration/applicationinventory/application";
const metrics = new Metrics();
const metricName = "konveyor_assessments_initiated_total";
let applicationList: Array<Assessment> = [];
let stakeholdersList: Array<Stakeholders> = [];
let counter: number;
const fileName = "Legacy Pathfinder";

describe(["@tier2"], "Custom Metrics - The total number of initiated assessments", function () {
before("Login and create test data", function () {
Expand All @@ -39,6 +42,7 @@ describe(["@tier2"], "Custom Metrics - The total number of initiated assessments

// Create 2 applications
applicationList = createMultipleApplications(2);
AssessmentQuestionnaire.enable(fileName);
});

beforeEach("Get the current counter value", function () {
Expand Down Expand Up @@ -73,7 +77,7 @@ describe(["@tier2"], "Custom Metrics - The total number of initiated assessments
it("Discard Assessment-Validate metrics assessment count doesn't change ", function () {
// Discard assessment of application
applicationList[0].verifyStatus("assessment", "Completed");
applicationList[0].discard_assessment();
applicationList[0].selectKebabMenuItem("Discard assessment(s)");

// Validate the assessment initiated count doesn't change
metrics.validateMetric(metricName, counter);
Expand Down
Loading