@@ -278,10 +278,9 @@ export function createHostAndCancelJob(
278
278
cy . filterTableByMultiSelect ( 'name' , [ inventory . name ] ) ;
279
279
cy . get ( '[data-cy="name-column-cell"]' ) . contains ( inventory . name ) . click ( ) ;
280
280
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
283
282
cy . get ( '[data-cy="launch-template"]' ) . first ( ) . click ( ) ;
284
- cy . wait ( '@launch ') . should ( 'exist' ) ;
283
+ cy . location ( 'pathname ') . should ( 'match' , / \/ o u t p u t $ / ) ;
285
284
if ( hostInInventory ) {
286
285
// go to the Hosts under Inventory
287
286
cy . navigateTo ( 'awx' , 'inventories' ) ;
@@ -332,10 +331,9 @@ export function createHostAndLaunchJob(
332
331
cy . filterTableByMultiSelect ( 'name' , [ inventory . name ] ) ;
333
332
cy . get ( '[data-cy="name-column-cell"]' ) . contains ( inventory . name ) . click ( ) ;
334
333
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
337
335
cy . get ( '[data-cy="launch-template"]' ) . first ( ) . click ( ) ;
338
- cy . wait ( '@launch ') . should ( 'exist' ) ;
336
+ cy . location ( 'pathname ') . should ( 'match' , / \/ o u t p u t $ / ) ;
339
337
if ( hostInInventory ) {
340
338
// go to the Hosts under Inventory
341
339
cy . navigateTo ( 'awx' , 'inventories' ) ;
0 commit comments