Skip to content

Commit 255eaf5

Browse files
Check redirect instead of API request (#2597)
1 parent c0b0f65 commit 255eaf5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

cypress/support/hostsfunctions.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,9 @@ export function createHostAndCancelJob(
278278
cy.filterTableByMultiSelect('name', [inventory.name]);
279279
cy.get('[data-cy="name-column-cell"]').contains(inventory.name).click();
280280
cy.get('.pf-v5-c-tabs__item > a').contains('Job templates').click();
281-
// run a template and wait for request
282-
cy.intercept('POST', awxAPI`/job_templates/*/launch`).as('launch');
281+
// run a template and wait for redirect to Job output
283282
cy.get('[data-cy="launch-template"]').first().click();
284-
cy.wait('@launch').should('exist');
283+
cy.location('pathname').should('match', /\/output$/);
285284
if (hostInInventory) {
286285
// go to the Hosts under Inventory
287286
cy.navigateTo('awx', 'inventories');
@@ -332,10 +331,9 @@ export function createHostAndLaunchJob(
332331
cy.filterTableByMultiSelect('name', [inventory.name]);
333332
cy.get('[data-cy="name-column-cell"]').contains(inventory.name).click();
334333
cy.get('.pf-v5-c-tabs__item > a').contains('Job templates').click();
335-
// run a template and wait for request
336-
cy.intercept('POST', awxAPI`/job_templates/*/launch`).as('launch');
334+
// run a template and wait for redirect to Job output
337335
cy.get('[data-cy="launch-template"]').first().click();
338-
cy.wait('@launch').should('exist');
336+
cy.location('pathname').should('match', /\/output$/);
339337
if (hostInInventory) {
340338
// go to the Hosts under Inventory
341339
cy.navigateTo('awx', 'inventories');

0 commit comments

Comments
 (0)