Skip to content

Commit

Permalink
Application import: Verify assigned BS for imported application if BS…
Browse files Browse the repository at this point in the history
… already exists (#1273)

* Application import: Verify assigned BS if BS already exists

Signed-off-by: Nandini Chandra <[email protected]>

* Update test

Signed-off-by: Nandini Chandra <[email protected]>

* Update test

Signed-off-by: Nandini Chandra <[email protected]>

* Update missing_tags_and_bs.csv file

Signed-off-by: Nandini Chandra <[email protected]>

* Add bug ID and new import .csv file

Signed-off-by: Nandini Chandra <[email protected]>

---------

Signed-off-by: Nandini Chandra <[email protected]>
  • Loading branch information
nachandr authored Nov 28, 2024
1 parent 06b0824 commit 8312b92
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
deleteAppImportsTableRows,
deleteAllMigrationWaves,
} from "../../../../../utils/utils";
import { tdTag, trTag } from "../../../../../e2e/types/constants";
import { Application } from "../../../../models/migration/applicationinventory/application";
import { ManageImports } from "../../../../models/migration/applicationinventory/manageImports";

Expand Down Expand Up @@ -78,7 +79,8 @@ describe(["@tier3"], "Application import operations", () => {
imports.verifyImportErrorMsg(errorMsgs);
});

it("Applications import for non existing tags and BS", function () {
it("Bug MTA-4257: 1)Applications import for non existing tags and BS \
2)Verify assigned BS for imported application if BS was created through previous import", function () {
Application.open();
cy.wait("@getApplication");
// Import csv with non-existent tags
Expand All @@ -87,7 +89,22 @@ describe(["@tier3"], "Application import operations", () => {
importApplication(filePath + fileName, true);
cy.wait(2000);
ManageImports.open();
imports.verifyAppImport(fileName, "Completed", 2, "-");

// Automate bug MTA-4257, Polarion TC MTA-609
const fileName2 = "lantik_bug.csv";
importApplication(filePath + fileName2, true);
cy.wait(2000);
ManageImports.open();
imports.verifyAppImport(fileName, "Completed", 1, "-");
Application.open();
exists("App_bug4257");
cy.get(tdTag)
.contains("App_bug4257")
.closest(trTag)
.within(() => {
cy.get("td[data-label='Business Service']").should("contain.text", "Finance");
});
});

it("Applications import with minimum required field(s) and empty row", function () {
Expand Down
2 changes: 2 additions & 0 deletions cypress/fixtures/app_import/csv/lantik_bug.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Record Type 1,Application Name,Description,Comments,Business Service,Dependency,Dependency Direction,Binary Group,Binary Artifact,Binary Version,Binary Packaging,Repository Type,Repository URL,Repository Branch,Repository Path,Owner,Contributors,Tag Category 1,Tag 1,Tag Category 2,Tag 2,Tag Category 3,Tag 3,Tag Category 4,Tag 4
1,App_bug4257,,,Finance,,,,,,,,,,,,,,,,,,,,
3 changes: 2 additions & 1 deletion cypress/fixtures/app_import/csv/missing_tags_and_bs.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Record Type 1,Application Name,Description,Comments,Business Service,Dependency,Dependency Direction,Binary Group,Binary Artifact,Binary Version,Binary Packaging,Repository Type,Repository URL,Repository Branch,Repository Path,Owner,Contributors,Tag Category 1,Tag 1,Tag Category 2,Tag 2,Tag Category 3,Tag 3,Tag Category 4,Tag 4
1,Application123,Legacy Customers management service,,Finance,,,corp.acme.demo,customers-tomcat,0.0.1-SNAPSHOT,war,git,https://git-acme.local/customers.git,,,,,Operating System,RHEL 8,Database,Oracle,Language,TypeScript,Runtime,Tomcat
1,Application_123,Legacy Customers management service,,Finance,,,corp.acme.demo,customers-tomcat,0.0.1-SNAPSHOT,war,git,https://git-acme.local/customers.git,,,,,Operating System,RHEL 8,Database,Oracle,Language,TypeScript,Runtime,Tomcat
1,Application_456,,,HR,,,,,,,,,,,,,,,,,,,,

0 comments on commit 8312b92

Please sign in to comment.