Skip to content

Commit

Permalink
[RFR][CR][JF] Fix tier3 failures (#820)
Browse files Browse the repository at this point in the history
* Fix tier3 failures

Signed-off-by: Shveta Sachdeva <sshveta@edhat.com>

* Fix tier3 failures

Signed-off-by: Shveta Sachdeva <sshveta@edhat.com>

---------

Signed-off-by: Shveta Sachdeva <sshveta@edhat.com>
Co-authored-by: Shveta Sachdeva <sshveta@edhat.com>
  • Loading branch information
sshveta and Shveta Sachdeva authored Nov 20, 2023
1 parent d0b7de4 commit 716a89d
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 233 deletions.
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();
// 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

0 comments on commit 716a89d

Please sign in to comment.