File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
tests/e2e/pageObjects/dialogs Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ export class AddRedisDatabaseDialog {
72
72
aiChatMessage = Selector ( '[data-testid=ai-chat-message-btn]' ) ;
73
73
aiCloseMessage = Selector ( '[aria-label="Closes this modal window"]' ) ;
74
74
75
- getDeleteCertificate = ( certificate : TlsCertificates ) => Selector ( `[data-testid^=delete-${ certificate } -cert]` ) ;
75
+ trashIconMsk = ( certificate : TlsCertificates ) => `[data-testid^=delete-${ certificate } -cert]`
76
+
77
+ getDeleteCertificate = ( certificate : TlsCertificates ) => Selector ( this . trashIconMsk ( certificate ) ) ;
76
78
77
79
/**
78
80
* Adding a new redis database
@@ -268,16 +270,17 @@ export class AddRedisDatabaseDialog {
268
270
const row = Selector ( 'button' )
269
271
. find ( 'div' )
270
272
. withText ( name ) ;
271
- const removeButton = String ( this . getDeleteCertificate ( certificate ) ) ;
273
+ const removeButton = this . trashIconMsk ( certificate ) ;
272
274
const removeButtonFooter = Selector ( '[class^=_popoverFooter]' ) ;
273
275
274
- if ( certificate === TlsCertificates . CA ) {
276
+ if ( certificate === TlsCertificates . CA ) {
275
277
await t . click ( this . caCertField ) ;
276
- }
277
- else {
278
+ } else {
278
279
await t . click ( this . clientCertField ) ;
279
280
}
281
+
280
282
await t . click ( row . find ( removeButton ) ) ;
283
+
281
284
await t . click ( removeButtonFooter . find ( removeButton ) ) ;
282
285
}
283
286
}
You can’t perform that action at this time.
0 commit comments