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

Sg fix #1267

Closed
wants to merge 5 commits into from
Closed

Sg fix #1267

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
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe(["@tier1"], "Source Analysis", () => {
cy.get("h2", { timeout: 5 * SEC }).should("contain", "No tags available");
});

it("Analysis for Konveyor example1 application", function () {
it("Bug MTA-4135: Analysis for Konveyor example1 application", function () {
// Automates https://github.com/konveyor/example-applications/tree/main/example-1
const application = new Analysis(
getRandomApplicationData("Example 1", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ import {
validatePagination,
itemsPerPageValidation,
autoPageChangeValidations,
deleteByList,
deleteAllStakeholderGroups,
} from "../../../../../utils/utils";
import { Stakeholdergroups } from "../../../../models/migration/controls/stakeholdergroups";
import { appTable } from "../../../../views/common.view";
let stakeholderGroupsList: Stakeholdergroups[] = [];

describe(["@tier3"], "Stakeholder groups pagination validations", function () {
before("Login and Create Test Data", function () {
login();
stakeholderGroupsList = createMultipleStakeholderGroups(11);
createMultipleStakeholderGroups(11);
});

beforeEach("Interceptors", function () {
Expand Down Expand Up @@ -62,6 +61,6 @@ describe(["@tier3"], "Stakeholder groups pagination validations", function () {
});

after("Perform test data clean up", function () {
deleteByList(stakeholderGroupsList);
deleteAllStakeholderGroups;
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,50 @@ limitations under the License.
import {
login,
selectItemsPerPage,
createMultipleStakeholders,
createMultipleStakeholderGroups,
validatePagination,
itemsPerPageValidation,
autoPageChangeValidations,
deleteAllRows,
deleteByList,
} from "../../../../../utils/utils";
import { Stakeholdergroups } from "../../../../models/migration/controls/stakeholdergroups";
import { appTable } from "../../../../views/common.view";
import { Stakeholders } from "../../../../models/migration/controls/stakeholders";
let stakeholderGroupsList: Stakeholdergroups[] = [];

describe(["@tier3"], "Stakeholder pagination validations", function () {
describe(["@tier3"], "Stakeholder groups pagination validations", function () {
before("Login and Create Test Data", function () {
login();
createMultipleStakeholders(11);
stakeholderGroupsList = createMultipleStakeholderGroups(11);
});

beforeEach("Interceptors", function () {
// Interceptors
cy.intercept("GET", "/hub/stakeholder*").as("getStakeholders");
cy.intercept("GET", "/hub/stakeholdergroups*").as("getStakeholdergroups");
});

it("Navigation button validations", function () {
Stakeholders.openList();
cy.get("@getStakeholders");
Stakeholdergroups.openList();
cy.get("@getStakeholdergroups");
selectItemsPerPage(10);
validatePagination();
});

it("Items per page validations", function () {
Stakeholders.openList();
cy.get("@getStakeholders");
selectItemsPerPage(10);
itemsPerPageValidation(appTable, "Email");
Stakeholdergroups.openList();
cy.get("@getStakeholdergroups");
itemsPerPageValidation();
});

it("Last page item(s) deletion, impact on page reload validation", function () {
Stakeholders.openList();
cy.get("@getStakeholders");
// Issue - https://issues.redhat.com/browse/TACKLE-155
// Navigate to stakeholder groups tab
Stakeholdergroups.openList();
cy.get("@getStakeholdergroups");
selectItemsPerPage(10);
autoPageChangeValidations(appTable, "Email", true);
autoPageChangeValidations(appTable, "Name", true);
});

after("Perform test data clean up", function () {
deleteAllRows();
deleteByList(stakeholderGroupsList);
});
});
});
2 changes: 1 addition & 1 deletion cypress/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ export function deleteAllBusinessServices() {

export function deleteAllStakeholderGroups(cancel = false): void {
Stakeholdergroups.openList();
deleteAllItems();
deleteAllRows();
}

export function deleteAllStakeholders(): void {
Expand Down
Loading