@@ -153,14 +153,15 @@ describe('tokens', () => {
153153 it ( 'can delete a token' , ( ) => {
154154 cy . get ( '.cf-resource-card' ) . should ( 'have.length' , 4 )
155155
156- cy . intercept ( '**/authorizations/*' ) . as ( 'deleteToken' )
157-
158156 cy . getByTestID ( 'token-card token test 03' ) . within ( ( ) => {
159157 cy . getByTestID ( 'context-delete-menu--button' ) . click ( )
160158 } )
161159 cy . getByTestID ( 'context-delete-menu--confirm-button' ) . click ( )
162160
163- cy . wait ( '@deleteToken' )
161+ cy . getByTestID ( 'notification-success' ) . should (
162+ 'contain' ,
163+ 'API token was deleted successfully'
164+ )
164165
165166 cy . get ( '.cf-resource-card' ) . should ( 'have.length' , 3 )
166167
@@ -171,34 +172,53 @@ describe('tokens', () => {
171172 . first ( )
172173 . within ( ( ) => {
173174 cy . getByTestID ( 'context-delete-menu--button' )
174- . should ( 'exist ' )
175+ . should ( 'be.visible ' )
175176 . click ( )
176177 } )
177- cy . getByTestID ( 'context-delete-menu--confirm-button' ) . click ( )
178+ cy . getByTestID ( 'context-delete-menu--confirm-button' )
179+ . should ( 'be.visible' )
180+ . click ( )
181+
182+ cy . getByTestID ( 'notification-success' ) . should (
183+ 'contain' ,
184+ 'API token was deleted successfully'
185+ )
178186
179- cy . wait ( '@deleteToken' )
187+ cy . getByTestID ( 'notification-success--dismiss' ) . click ( )
180188
181189 cy . get ( '.cf-resource-card' )
182190 . first ( )
183191 . within ( ( ) => {
184192 cy . getByTestID ( 'context-delete-menu--button' )
185- . should ( 'exist ' )
193+ . should ( 'be.visible ' )
186194 . click ( )
187195 } )
188196 cy . getByTestID ( 'context-delete-menu--confirm-button' )
189- . should ( 'exist ' )
197+ . should ( 'be.visible ' )
190198 . click ( )
191199
192- cy . wait ( '@deleteToken' )
200+ cy . getByTestID ( 'notification-success' ) . should (
201+ 'contain' ,
202+ 'API token was deleted successfully'
203+ )
193204
194205 cy . get ( '.cf-resource-card' )
195206 . first ( )
196207 . within ( ( ) => {
197208 cy . getByTestID ( 'context-delete-menu--button' )
198- . should ( 'exist ' )
209+ . should ( 'be.visible ' )
199210 . click ( )
200211 } )
201- cy . getByTestID ( 'context-delete-menu--confirm-button' ) . click ( )
212+ cy . getByTestID ( 'context-delete-menu--confirm-button' )
213+ . should ( 'be.visible' )
214+ . click ( )
215+
216+ cy . getByTestID ( 'notification-success' ) . should (
217+ 'contain' ,
218+ 'API token was deleted successfully'
219+ )
220+
221+ cy . getByTestID ( 'notification-success--dismiss' ) . click ( )
202222
203223 // Assert empty state
204224 cy . getByTestID ( 'empty-state' ) . within ( ( ) => {
0 commit comments