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] Task manager: application related tasks are deleted once the app is deleted #1288

Merged
merged 2 commits into from
Dec 12, 2024
Merged
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
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
Loading