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 Source analysis #1314

Merged
merged 1 commit into from
Jan 28, 2025
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
4 changes: 3 additions & 1 deletion cypress/e2e/models/migration/dynamic-report/issues/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ export class Issues {
);
Issues.validateSection(issue.name, sections.targetTechnologies, span, issue.targets);
Issues.validateSection(issue.name, sections.sourceTechnologies, div, issue.sources);
Issues.validateSection(issue.name, sections.ruleSet, div, issue.ruleSet);
if (issue.ruleSet) {
Issues.validateSection(issue.name, sections.ruleSet, div, issue.ruleSet);
}
Issues.validateSection(issue.name, sections.rule, div, issue.rule);
Issues.validateSection(issue.name, sections.labels, div, issue.labels);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ describe(["@tier1"], "Source Analysis", () => {
cy.wait(2 * SEC);
application.analyze();
application.verifyAnalysisStatus("Completed");
Application.open();
// Polarion TC 406
application.verifyEffort(this.analysisData["analysis_on_example-1-app"]["effort"]);
});
Expand All @@ -284,6 +285,7 @@ describe(["@tier1"], "Source Analysis", () => {
application.manageCredentials(source_credential.name, maven_credential.name);
application.analyze();
application.verifyAnalysisStatus("Completed");
Application.open();
application.verifyEffort(
this.analysisData["jws6_source+dep_analysis_on_tackletestapp"]["effort"]
);
Expand Down Expand Up @@ -364,22 +366,22 @@ describe(["@tier1"], "Source Analysis", () => {
cy.wait(5 * SEC);
application.analyze();
application.verifyAnalysisStatus("Completed");
Application.open();
application.verifyEffort(this.analysisData["tackle-testapp-public-4-targets"]["effort"]);
});

// Automates customer bug MTA-2973
it("Source analysis on tackle app public with custom rule", function () {
const { appData, analysisData } = this;
const applicationData = getRandomApplicationData("tackle-public-customRule", {
sourceData: appData["tackle-testapp-public"],
});

const analysisDataCustomRule = analysisData["tackle-testapp-public-customRule"];
const applicationsList = [];

for (let i = 0; i < 2; i++) {
applicationsList.push(
new Analysis(applicationData, getRandomAnalysisData(analysisDataCustomRule))
const application = new Analysis(
getRandomApplicationData("tackle-public-customRule", {
sourceData: this.appData["tackle-testapp-public"],
}),
getRandomAnalysisData(this.analysisData["tackle-testapp-public-customRule"])
);
applicationsList.push(application);
}

// Analyze an application
Expand All @@ -388,10 +390,9 @@ describe(["@tier1"], "Source Analysis", () => {
if (credentials) application.manageCredentials(null, credentials.name);
application.analyze();
application.verifyAnalysisStatus("Completed");
application.validateIssues(analysisDataCustomRule.issues);
analysisDataCustomRule.issues.forEach((issue) => {
application.validateAffected(issue);
});
application.validateIssues(
this.analysisData["tackle-testapp-public-customRule"]["issues"]
);
};

// Analyze application with Maven credentials
Expand Down
3 changes: 1 addition & 2 deletions cypress/fixtures/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -1403,9 +1403,8 @@
"totalEffort": 1,
"incidents": 1,
"affectedFiles": 1,
"ruleSet": "files",
"rule": "corporate-config-01000",
"labels": ["None"]
"labels": ["configuration", "konveyor.io/include=always"]
}
]
},
Expand Down
Loading