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][CR][JF] Fix tier3 failures #820

Merged
merged 2 commits into from
Nov 20, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
deleteAppImportsTableRows,
validatePagination,
} from "../../../../../utils/utils";
import { sideKebabMenuImports } from "../../../../views/applicationinventory.view";
import { sideKebabMenu } from "../../../../views/applicationinventory.view";

import * as commonView from "../../../../views/common.view";
import { Application } from "../../../../models/migration/applicationinventory/application";
Expand Down Expand Up @@ -119,7 +119,7 @@ describe(["@tier3"], "Manage imports pagination validations", function () {
.get("tbody")
.find("td[data-label='File name']")
.each(($tableRow) => {
click(sideKebabMenuImports);
click(sideKebabMenu);
cy.get("ul[role=menu] > li").contains("Delete").click();
click(commonView.confirmButton);
cy.wait("@deleteImport");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
deleteTableRows,
deleteApplicationTableRows,
deleteAllBusinessServices,
deleteAllItems,
} from "../../../../../utils/utils";
import { SEC } from "../../../../types/constants";
import { prevPageButton } from "../../../../views/common.view";
Expand Down Expand Up @@ -81,7 +82,7 @@ describe(["@tier3"], "Business services pagination validations", function () {
cy.wait(2 * SEC);
goToLastPage();
// Delete all items of last page
deleteTableRows();
deleteAllItems();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we agreed not to remove everything, but only things created by test

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In pagination tests some items are deleted for validation and then we don't know what to delete . In such cases we need to remove all Items.

// Verify that page is re-directed to previous page
cy.get("td[data-label=Name]").then(($rows) => {
cy.wrap($rows.length).should("eq", 10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ import {
deleteByList,
validatePagination,
} from "../../../../../utils/utils";
import {
firstPageButton,
lastPageButton,
nextPageButton,
pageNumInput,
prevPageButton,
} from "../../../../views/common.view";
import { pageNumInput, prevPageButton } from "../../../../views/common.view";
import { Jobfunctions } from "../../../../models/migration/controls/jobfunctions";
let jobFunctionsList: Array<Jobfunctions> = [];

Expand Down Expand Up @@ -72,7 +66,7 @@ describe(["@tier3"], "Job functions pagination validations", function () {
});
});

it("Bug MTA-1675: Page number validations", function () {
it("Page number validations", function () {
// Navigate to Job functions tab
Jobfunctions.openList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ limitations under the License.
import {
login,
selectItemsPerPage,
deleteTableRows,
createMultipleStakeholderGroups,
validatePagination,
deleteAllStakeholderGroups,
deleteAllItems,
} from "../../../../../utils/utils";
import { Stakeholdergroups } from "../../../../models/migration/controls/stakeholdergroups";
import { lastPageButton, pageNumInput, prevPageButton } from "../../../../views/common.view";

let stakeholderGroupsList: Array<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 All @@ -46,7 +45,7 @@ describe(["@tier3"], "Stakeholder groups pagination validations", function () {
validatePagination();
});

it("Items per page validations", function () {
it("Bug MTA-1694: Items per page validations", function () {
// Navigate to stakeholder groups tab
Stakeholdergroups.openList();
cy.get("@getStakeholdergroups");
Expand Down Expand Up @@ -88,7 +87,7 @@ describe(["@tier3"], "Stakeholder groups pagination validations", function () {
});
});

it("Bug MTA-1675: Last page item(s) deletion, impact on page reload validation", function () {
it("Bug MTA-1694: Last page item(s) deletion, impact on page reload validation", function () {
// Issue - https://issues.redhat.com/browse/TACKLE-155
// Navigate to stakeholder groups tab
Stakeholdergroups.openList();
Expand All @@ -103,7 +102,7 @@ describe(["@tier3"], "Stakeholder groups pagination validations", function () {
cy.wait(2000);

// Delete all items of last page
deleteTableRows();
deleteAllItems();

// Verify that page is re-directed to previous page
cy.get("td[data-label=Name]").then(($rows) => {
Expand All @@ -112,6 +111,6 @@ describe(["@tier3"], "Stakeholder groups pagination validations", function () {
});

after("Perform test data clean up", function () {
deleteTableRows();
deleteAllStakeholderGroups();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ limitations under the License.
import {
login,
selectItemsPerPage,
deleteTableRows,
createMultipleStakeholders,
validatePagination,
deleteAllItems,
} from "../../../../../utils/utils";
import { lastPageButton, pageNumInput, prevPageButton } from "../../../../views/common.view";
import { Stakeholders } from "../../../../models/migration/controls/stakeholders";
Expand Down Expand Up @@ -101,7 +101,7 @@ describe(["@tier3"], "Stakeholder pagination validations", function () {
cy.wait(2000);

// Delete all items of last page
deleteTableRows(stakeHoldersTable);
deleteAllItems(stakeHoldersTable);

// Verify that page is re-directed to previous page
cy.get("td[data-label=Email]").then(($rows) => {
Expand All @@ -110,6 +110,6 @@ describe(["@tier3"], "Stakeholder pagination validations", function () {
});

after("Perform test data clean up", function () {
deleteTableRows(stakeHoldersTable);
deleteAllItems(stakeHoldersTable);
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/views/applicationinventory.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const topKebabMenu = "#toolbar-kebab";
export const kebabMenuItem = "span.pf-v5-c-menu__item-text";
export const bulkApplicationSelectionCheckBox = "input[name='bulk-selected-items-checkbox']";
// This is on the Application imports page.
export const sideKebabMenuImports = "button[aria-label='Kebab toggle']";
export const sideKebabMenu = "button[aria-label='Kebab toggle']";

//Fields related to analysis - source mode
export const sourceRepository = "input[name=sourceRepository]";
Expand Down
Loading