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] Validate auto tagging of applications based on assessment answers #947

Merged
merged 1 commit into from
Feb 5, 2024
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
11 changes: 11 additions & 0 deletions cypress/e2e/models/migration/applicationinventory/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
northdependenciesDropdownBtn,
southdependenciesDropdownBtn,
closeForm,
tagsColumnSelector,
} from "../../../views/applicationinventory.view";
import { appDetailsView } from "../../../views/applicationinventory.view";
import * as commonView from "../../../views/common.view";
Expand Down Expand Up @@ -908,6 +909,16 @@ export class Application {
});
}

validateTagsCount(tagsCount): void {
Application.open();
cy.get(tdTag)
.contains(this.name)
.parent(trTag)
.within(() => {
cy.get(tagsColumnSelector).contains(tagsCount, { timeout: 30 * SEC });
});
}

deleteAssessments(): void {
this.clickAssessButton();
Assessment.deleteAssessments();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,21 @@ describe(["@tier3"], "Tests related to application assessment and review", () =>
deleteByList(archetypes);
});

it("Validates auto tagging of applications based on assessment answers", function () {
//automates polarion MTA-387
AssessmentQuestionnaire.deleteAllQuestionnaires();
AssessmentQuestionnaire.import(yamlFile);
AssessmentQuestionnaire.enable(cloudNative);
AssessmentQuestionnaire.disable(legacyPathfinder);

const applications = createMultipleApplications(1);
applications[0].perform_assessment("medium", stakeholderList, null, cloudNative);
applications[0].validateTagsCount("1");
applications[0].applicationDetailsTab("Tags");
applications[0].tagAndCategoryExists("Spring Boot");
applications[0].closeApplicationDetails();
});

after("Perform test data clean up", function () {
deleteByList(stakeholderList);
deleteByList(applicationList);
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/views/applicationinventory.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const actionButton = "button[aria-label='kebab dropdown toggle']";
export const applicationNameInput = "input[name=name]";
export const applicationDescriptionInput = "input[name=description]";
export const applicationBusinessServiceSelect = "[placeholder='Select a business service']";
export const tagsColumnSelector = "td[data-label='Tags']";

export const applicationContributorsInput =
"#contributors-select-toggle-select-multi-typeahead-typeahead";
export const applicationContributorsText = ".pf-v5-c-chip__text";
Expand Down
44 changes: 22 additions & 22 deletions cypress/fixtures/questionnaire_import/cloud-native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,49 @@ sections:
rationale: ""
mitigation: ""
applyTags:
- category: Technology
- category: Runtime
tag: Quarkus
autoAnswerFor:
- category: Technology
- category: Runtime
tag: Quarkus
- order: 0
text: Spring Boot
risk: green
rationale: ""
mitigation: ""
applyTags:
- category: Technology
- category: Runtime
tag: Spring Boot
autoAnswerFor:
- category: Technology
- category: Runtime
tag: Spring Boot
- order: 0
text: Java EE
risk: yellow
rationale: This might not be the most cloud friendly technology.
mitigation: Maybe start thinking about migrating to Quarkus or Jakarta EE.
applyTags:
- category: Technology
- category: Runtime
tag: Java EE
autoAnswerFor:
- category: Technology
- category: Runtime
tag: Java EE
- order: 0
text: J2EE
risk: red
rationale: This is obsolete.
mitigation: Maybe start thinking about migrating to Quarkus or Jakarta EE.
applyTags:
- category: Technology
- category: Runtime
tag: J2EE
autoAnswerFor:
- category: Technology
- category: Runtime
tag: J2EE
- order: 0
text: What version of Java EE does the application use?
explanation: What version of the Java EE specification is your application using?
includeFor:
- category: Technology
- category: Runtime
tag: Java EE
answers:
- order: 0
Expand Down Expand Up @@ -112,9 +112,9 @@ sections:
text: What implementation of JAX-WS does your application use?
explanation: ""
excludeFor:
- category: Technology
- category: Runtime
tag: Spring Boot
- category: Technology
- category: Runtime
tag: Quarkus
answers:
- order: 0
Expand Down Expand Up @@ -150,49 +150,49 @@ sections:
rationale: ""
mitigation: ""
applyTags:
- category: Technology
- category: Runtime
tag: Quarkus
autoAnswerFor:
- category: Technology
- category: Runtime
tag: Quarkus
- order: 0
text: Spring Boot
risk: green
rationale: ""
mitigation: ""
applyTags:
- category: Technology
- category: Runtime
tag: Spring Boot
autoAnswerFor:
- category: Technology
- category: Runtime
tag: Spring Boot
- order: 0
text: Java EE
risk: yellow
rationale: This might not be the most cloud friendly technology.
mitigation: Maybe start thinking about migrating to Quarkus or Jakarta EE.
applyTags:
- category: Technology
- category: Runtime
tag: Java EE
autoAnswerFor:
- category: Technology
- category: Runtime
tag: Java EE
- order: 0
text: J2EE
risk: red
rationale: This is obsolete.
mitigation: Maybe start thinking about migrating to Quarkus or Jakarta EE.
applyTags:
- category: Technology
- category: Runtime
tag: J2EE
autoAnswerFor:
- category: Technology
- category: Runtime
tag: J2EE
- order: 0
text: What version of Java EE does the application use?
explanation: What version of the Java EE specification is your application using?
includeFor:
- category: Technology
- category: Runtime
tag: Java EE
answers:
- order: 0
Expand Down Expand Up @@ -242,9 +242,9 @@ sections:
text: What implementation of JAX-WS does your application use?
explanation: ""
excludeFor:
- category: Technology
- category: Runtime
tag: Spring Boot
- category: Technology
- category: Runtime
tag: Quarkus
answers:
- order: 0
Expand Down
Loading