Skip to content

Commit

Permalink
Task manager: application related tasks are deleted once the app is d…
Browse files Browse the repository at this point in the history
…eleted (#1288)

* New test case

Signed-off-by: Maayan Hadasi <[email protected]>

* Modifying comment

Signed-off-by: Maayan Hadasi <[email protected]>

---------

Signed-off-by: Maayan Hadasi <[email protected]>
  • Loading branch information
mguetta1 authored Dec 12, 2024
1 parent cb33ff7 commit dc9465e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cypress/e2e/tests/migration/task-manager/task_manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ import {
getRandomAnalysisData,
getRandomApplicationData,
login,
notExists,
validateTextPresence,
} from "../../../../utils/utils";
import { Analysis } from "../../../models/migration/applicationinventory/analysis";
import { Application } from "../../../models/migration/applicationinventory/application";
import { TaskManager } from "../../../models/migration/task-manager/task-manager";
import { TaskKind, TaskStatus } from "../../../types/constants";
import { TaskManagerColumns } from "../../../views/taskmanager.view";
import { TaskManagerColumns, tasksTable } from "../../../views/taskmanager.view";

let applicationsList: Array<Analysis> = [];
let application: Analysis;
Expand All @@ -38,6 +39,7 @@ describe(["@tier1"], "Task Manager", () => {
login();
deleteApplicationTableRows();
});

beforeEach("Load data", function () {
cy.fixture("application").then(function (appData) {
this.appData = appData;
Expand Down Expand Up @@ -79,6 +81,14 @@ describe(["@tier1"], "Task Manager", () => {
clearAllFilters();
});

it("Delete an application - related tasks are deleted", function () {
// Remove the last element from applicationsList
const app = applicationsList.pop();
app.delete();
TaskManager.open();
notExists(app.name, tasksTable);
});

after("Perform test data clean up", function () {
cy.wait(2000);
Application.open(true);
Expand Down

0 comments on commit dc9465e

Please sign in to comment.