From 503193cc6d2ee7f4df17c66db4f844c09721ca6b Mon Sep 17 00:00:00 2001 From: Adriana Cruz Date: Tue, 16 Jul 2024 16:22:00 -0600 Subject: [PATCH] fixing tests --- cypress/support/hostsfunctions.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cypress/support/hostsfunctions.ts b/cypress/support/hostsfunctions.ts index 282fc1098d..de87d53f86 100644 --- a/cypress/support/hostsfunctions.ts +++ b/cypress/support/hostsfunctions.ts @@ -21,7 +21,7 @@ export function createAndCheckHost(host_type: string, inventory: string) { // create host cy.clickButton(/^Create host$/); - cy.verifyPageTitle('Create Host'); + cy.verifyPageTitle('Create host'); cy.getByDataCy('name').type(hostName); cy.getByDataCy('description').type('This is the description'); @@ -61,19 +61,19 @@ export function createHost(host_type: string, inventoryID: number) { return hostName; } -function editHost(invenotryName: string, host_type: string, hostName: string, view: string) { +function editHost(inventoryName: string, host_type: string, hostName: string, view: string) { // function that editing host data from list or details views // this function cover both inventory host and stand alone host if (view === 'list') { - navigateToBaseView(host_type, invenotryName); + navigateToBaseView(host_type, inventoryName); cy.filterTableByMultiSelect('name', [hostName]); } else { // for details view - navigateToHost(host_type, hostName, '[data-cy="name-column-cell"] a', invenotryName); + navigateToHost(host_type, hostName, '[data-cy="name-column-cell"] a', inventoryName); } cy.getByDataCy('edit-host').click(); - cy.verifyPageTitle('Edit host'); + cy.verifyPageTitle(`Edit ${hostName}`); cy.getByDataCy('description').clear().type('This is the description edited'); cy.getByDataCy('Submit').click(); cy.hasDetail(/^Description$/, 'This is the description edited'); @@ -161,7 +161,7 @@ export function checkHostGroup(host_type: string, organization: Organization) { cy.clickLink(/^Groups$/); //check edit group cy.getByDataCy('edit-group').click(); - cy.verifyPageTitle('Edit group'); + cy.verifyPageTitle(`Edit ${group.name}`); cy.getByDataCy('name-form-group').type('-changed'); cy.getByDataCy('Submit').click(); cy.verifyPageTitle(group.name + '-changed'); @@ -277,7 +277,7 @@ export function createHostAndCancelJob( cy.navigateTo('awx', 'inventories'); cy.filterTableByMultiSelect('name', [inventory.name]); cy.get('[data-cy="name-column-cell"]').contains(inventory.name).click(); - cy.get('.pf-v5-c-tabs__item > a').contains('Job templates').click(); + cy.get('.pf-v5-c-tabs__item > a').contains('Job Templates').click(); // run a template and wait for redirect to Job output cy.get('[data-cy="launch-template"]').first().click(); cy.location('pathname').should('match', /\/output$/); @@ -323,7 +323,7 @@ export function launchHostJob( cy.navigateTo('awx', 'inventories'); cy.filterTableByMultiSelect('name', [inventory.name]); cy.get('[data-cy="name-column-cell"]').contains(inventory.name).click(); - cy.contains(`[role='tab']`, 'Job templates').click(); + cy.contains(`[role='tab']`, 'Job Templates').click(); // run a template and wait for request cy.intercept('POST', awxAPI`/job_templates/*/launch`).as('launch');