diff --git a/cypress/e2e/models/migration/applicationinventory/application.ts b/cypress/e2e/models/migration/applicationinventory/application.ts index 5ba998c00..7723be52e 100644 --- a/cypress/e2e/models/migration/applicationinventory/application.ts +++ b/cypress/e2e/models/migration/applicationinventory/application.ts @@ -280,7 +280,7 @@ export class Application { }); } - getColumnText(columnSelector, columnText: string): void { + getColumnText(columnSelector: string, columnText: string): void { selectItemsPerPage(100); cy.get(tdTag) .contains(this.name) diff --git a/cypress/e2e/views/applicationinventory.view.ts b/cypress/e2e/views/applicationinventory.view.ts index d57f314e8..f8c5301cb 100644 --- a/cypress/e2e/views/applicationinventory.view.ts +++ b/cypress/e2e/views/applicationinventory.view.ts @@ -34,8 +34,7 @@ export const cyclicDependenciesErrorMsg = "cyclic dependencies are not allowed"; export const northdependenciesDropdownBtn = "button[aria-label='northbound-dependencies-toggle']"; export const southdependenciesDropdownBtn = "button[aria-label='southbound-dependencies-toggle']"; export const date = "Date"; -export const editButton = - "td[class='pf-v5-c-table__td pf-v5-c-table__inline-edit-action'] > button"; +export const editButton = "td[class='pf-v5-c-table__td pf-v5-c-table__action'] > button"; export const importStatus = "Status"; export const northboundHelper = "div[id=northbound-dependencies-helper]"; export const southboundHelper = "div[id=southbound-dependencies-helper]"; diff --git a/cypress/utils/utils.ts b/cypress/utils/utils.ts index 48e127960..1bafaa18b 100644 --- a/cypress/utils/utils.ts +++ b/cypress/utils/utils.ts @@ -122,29 +122,34 @@ export function clickByText( cy.wait(SEC, { log }); } -export function click(fieldId: string, isForced = true, log = false): void { +export function click(fieldId: string, isForced = true, log = false, number = 0): void { if (!log) { cy.log(`Click ${fieldId}`); } - cy.get(fieldId, { log, timeout: 30 * SEC }).click({ log, force: isForced }); + cy.get(fieldId, { log, timeout: 30 * SEC }) + .eq(number) + .click({ log, force: isForced }); } -export function clickWithFocus(fieldId: string, isForced = true, log = false): void { +export function clickWithFocus(fieldId: string, isForced = true, log = false, number = 0): void { if (!log) { cy.log(`Click ${fieldId}`); } cy.get(fieldId, { log, timeout: 30 * SEC }) + .eq(number) .focus() .click({ log, force: isForced }); } -export function clickJs(fieldId: string, isForced = true, log = false): void { +export function clickJs(fieldId: string, isForced = true, log = false, number = 0): void { if (!log) { cy.log(`Click ${fieldId}`); } - cy.get(fieldId, { log, timeout: 30 * SEC }).then(($obj) => { - $obj[0].click(); - }); + cy.get(fieldId, { log, timeout: 30 * SEC }) + .eq(number) + .then(($obj) => { + $obj[0].click(); + }); } export function submitForm(): void { @@ -913,7 +918,6 @@ export function performRowAction(itemName: string, action: string): void { export function performRowActionByIcon(itemName: string, action: string): void { // itemName is the text to be searched on the screen (For eg: application name, etc) // Action is the name of the action to be applied (For eg: edit or click kebab menu) - selectItemsPerPage(100); cy.contains(itemName, { timeout: 120 * SEC }) .closest(trTag) .within(() => {