@@ -53,7 +53,7 @@ describe('Subscriptions', () => {
5353 cy . getByTestID ( 'subscriptions-empty-state' ) . should ( 'exist' )
5454 } )
5555
56- it ( 'should create, update and delete LP subscription' , ( ) => {
56+ it ( 'should create, update, stop, start and delete LP subscription' , ( ) => {
5757 cy . getByTestID ( 'subscriptions--tab' ) . click ( )
5858 cy . getByTestID ( 'create-subscription-button--empty' ) . should ( 'be.visible' )
5959 cy . getByTestID ( 'create-subscription-button--empty' )
@@ -172,6 +172,28 @@ describe('Subscriptions', () => {
172172 . click ( )
173173 cy . get ( '.cf-resource-card' ) . should ( 'have.length' , 1 )
174174 cy . get ( '.cf-resource-card' ) . contains ( 'My Edited Subscription' )
175+ // stop subscription
176+ cy . getByTestID ( 'subscription-name' ) . should ( 'be.visible' )
177+ cy . getByTestID ( 'subscription-name' ) . click ( )
178+ cy . get ( '.subscription-details-page' ) . should ( 'be.visible' )
179+ cy . getByTestID ( 'subscription-details-page--status-button' )
180+ . should ( 'be.visible' )
181+ . click ( )
182+ cy . get ( '.cf-spinner-container' ) . should ( 'be.visible' )
183+ cy . get ( '.subscription-details-page__status--STOPPED' )
184+ . should ( 'be.visible' )
185+ . contains ( 'STOPPED' )
186+ // start subscription
187+ cy . getByTestID ( 'subscription-details-page--status-button' )
188+ . should ( 'be.visible' )
189+ . click ( )
190+ cy . get ( '.cf-spinner-container' ) . should ( 'be.visible' )
191+ cy . get ( '.subscription-details-page__status--RUNNING' )
192+ . should ( 'be.visible' )
193+ . contains ( 'RUNNING' )
194+ cy . getByTestID ( 'update-broker-form--cancel' )
195+ . should ( 'be.visible' )
196+ . click ( )
175197 // delete
176198 cy . getByTestID ( 'context-delete-menu--button' ) . should ( 'be.visible' )
177199 cy . getByTestID ( 'context-delete-menu--button' ) . click ( )
@@ -182,7 +204,7 @@ describe('Subscriptions', () => {
182204 cy . wait ( '@GetSubscriptions' )
183205 cy . getByTestID ( 'subscriptions-empty-state' ) . should ( 'be.visible' )
184206 } )
185- it ( 'should create, update and delete a JSON subscription' , ( ) => {
207+ it ( 'should create, update, stop, start and delete a JSON subscription' , ( ) => {
186208 cy . getByTestID ( 'subscriptions--tab' ) . click ( )
187209 cy . getByTestID ( 'create-subscription-button--control-bar' ) . should (
188210 'be.visible'
@@ -321,6 +343,28 @@ describe('Subscriptions', () => {
321343 . click ( )
322344 cy . get ( '.cf-resource-card' ) . should ( 'have.length' , 1 )
323345 cy . get ( '.cf-resource-card' ) . contains ( 'My Edited Subscription' )
346+ // stop subscription
347+ cy . getByTestID ( 'subscription-name' ) . should ( 'be.visible' )
348+ cy . getByTestID ( 'subscription-name' ) . click ( )
349+ cy . get ( '.subscription-details-page' ) . should ( 'be.visible' )
350+ cy . getByTestID ( 'subscription-details-page--status-button' )
351+ . should ( 'be.visible' )
352+ . click ( )
353+ cy . get ( '.cf-spinner-container' ) . should ( 'be.visible' )
354+ cy . get ( '.subscription-details-page__status--STOPPED' )
355+ . should ( 'be.visible' )
356+ . contains ( 'STOPPED' )
357+ // start subscription
358+ cy . getByTestID ( 'subscription-details-page--status-button' )
359+ . should ( 'be.visible' )
360+ . click ( )
361+ cy . get ( '.cf-spinner-container' ) . should ( 'be.visible' )
362+ cy . get ( '.subscription-details-page__status--RUNNING' )
363+ . should ( 'be.visible' )
364+ . contains ( 'RUNNING' )
365+ cy . getByTestID ( 'update-broker-form--cancel' )
366+ . should ( 'be.visible' )
367+ . click ( )
324368 // delete
325369 cy . getByTestID ( 'context-delete-menu--button' ) . should ( 'be.visible' )
326370 cy . getByTestID ( 'context-delete-menu--button' ) . click ( )
@@ -332,7 +376,7 @@ describe('Subscriptions', () => {
332376 cy . getByTestID ( 'subscriptions-empty-state' ) . should ( 'be.visible' )
333377 } )
334378
335- it ( 'should create, update and delete a String subscription' , ( ) => {
379+ it ( 'should create, update, stop, start and delete a String subscription' , ( ) => {
336380 cy . getByTestID ( 'subscriptions--tab' ) . click ( )
337381 cy . getByTestID ( 'create-subscription-button--control-bar' ) . should (
338382 'be.visible'
@@ -456,6 +500,28 @@ describe('Subscriptions', () => {
456500 . click ( )
457501 cy . get ( '.cf-resource-card' ) . should ( 'have.length' , 1 )
458502 cy . get ( '.cf-resource-card' ) . contains ( 'My Edited Subscription' )
503+ // stop subscription
504+ cy . getByTestID ( 'subscription-name' ) . should ( 'be.visible' )
505+ cy . getByTestID ( 'subscription-name' ) . click ( )
506+ cy . get ( '.subscription-details-page' ) . should ( 'be.visible' )
507+ cy . getByTestID ( 'subscription-details-page--status-button' )
508+ . should ( 'be.visible' )
509+ . click ( )
510+ cy . get ( '.cf-spinner-container' ) . should ( 'be.visible' )
511+ cy . get ( '.subscription-details-page__status--STOPPED' )
512+ . should ( 'be.visible' )
513+ . contains ( 'STOPPED' )
514+ // start subscription
515+ cy . getByTestID ( 'subscription-details-page--status-button' )
516+ . should ( 'be.visible' )
517+ . click ( )
518+ cy . get ( '.cf-spinner-container' ) . should ( 'be.visible' )
519+ cy . get ( '.subscription-details-page__status--RUNNING' )
520+ . should ( 'be.visible' )
521+ . contains ( 'RUNNING' )
522+ cy . getByTestID ( 'update-broker-form--cancel' )
523+ . should ( 'be.visible' )
524+ . click ( )
459525 // delete
460526 cy . getByTestID ( 'context-delete-menu--button' ) . should ( 'be.visible' )
461527 cy . getByTestID ( 'context-delete-menu--button' ) . click ( )
0 commit comments