11import { rte } from '../../../../helpers/constants' ;
22import { DatabaseHelper } from '../../../../helpers/database' ;
33import { BrowserPage } from '../../../../pageObjects' ;
4- import { commonUrl , ossStandaloneConfig } from '../../../../helpers/conf' ;
4+ import { commonUrl , ossStandaloneConfig , ossStandaloneV7Config } from '../../../../helpers/conf' ;
55import { Common } from '../../../../helpers/common' ;
66import { DatabaseAPIRequests } from '../../../../helpers/api/api-database' ;
77import { APIKeyRequests } from '../../../../helpers/api/api-keys' ;
@@ -119,17 +119,16 @@ test('Verify that user can see JSON Key details', async t => {
119119 await t . expect ( keyTTLValue ) . match ( expectedTTL , 'The JSON Key TTL is incorrect' ) ;
120120 await t . expect ( keyBadge ) . contains ( 'JSON' , 'The JSON Key Badge is incorrect' ) ;
121121} ) ;
122- //the test is skipped until redis databases 7.4 is not added to docker
122+
123123test
124124 . before ( async ( ) => {
125- // await databaseHelper.acceptLicenseTermsAndAddDatabaseApi();
125+ await databaseHelper . acceptLicenseTermsAndAddDatabaseApi ( ossStandaloneV7Config ) ;
126126 } )
127127 . after ( async ( ) => {
128128 // Clear and delete database
129- // await apiKeyRequests.deleteKeyByNameApi(keyName, );
130- // await databaseAPIRequests.deleteStandaloneDatabaseApi();
131- } )
132- . skip ( 'Verify that user can set ttl for Hash fields' , async t => {
129+ await apiKeyRequests . deleteKeyByNameApi ( keyName , ossStandaloneV7Config . databaseName ) ;
130+ await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneV7Config ) ;
131+ } ) ( 'Verify that user can set ttl for Hash fields' , async t => {
133132 keyName = Common . generateWord ( 10 ) ;
134133 const keyName2 = Common . generateWord ( 10 ) ;
135134 const field1 = 'Field1WithTtl' ;
@@ -150,6 +149,11 @@ test
150149 ttlFieldValue = await browserPage . getHashTtlFieldInput ( field2 ) . textContent ;
151150 await t . expect ( ttlFieldValue ) . match ( expectedTTL , 'the field ttl is not set' ) ;
152151
152+ //verify that ttl column can be hidden
153+ await t . click ( browserPage . showTtlCheckbox ) ;
154+ await t . expect ( await browserPage . getHashTtlFieldInput ( field2 ) . exists ) . notOk ( 'the ttl column is not hidden' ) ;
155+ await t . click ( browserPage . showTtlCheckbox ) ;
156+
153157 //verify that field is removed after ttl field is expired
154158 await browserPage . editHashFieldTtlValue ( field1 , '1' ) ;
155159 await t . wait ( 1000 ) ;
160164 //verify that the key is removed if key has 1 field and ttl field is expired
161165 await browserPage . addHashKey ( keyName2 , ' ' , field1 ) ;
162166 await browserPage . editHashFieldTtlValue ( field1 , '1' ) ;
167+ await t . wait ( 1000 ) ;
163168 await t . click ( browserPage . refreshKeysButton ) ;
164169
165170 await t . expect ( browserPage . getKeySelectorByName ( keyName2 ) . exists ) . notOk ( 'key is not removed when the field ttl is expired' ) ;
0 commit comments