1
- import { keyLength , rte } from '../../../helpers/constants' ;
1
+ import { rte } from '../../../helpers/constants' ;
2
2
import { acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database' ;
3
3
import { BrowserPage , CliPage } from '../../../pageObjects' ;
4
- import { commonUrl , ossStandaloneConfig } from '../../../helpers/conf' ;
4
+ import { commonUrl , ossStandaloneBigConfig , ossStandaloneConfig } from '../../../helpers/conf' ;
5
5
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database' ;
6
- import { addKeysViaCli , deleteKeysViaCli , keyTypes } from '../../../helpers/keys' ;
7
6
import { Common } from '../../../helpers/common' ;
8
7
import { BrowserActions } from '../../../common-actions/browser-actions' ;
9
8
@@ -12,10 +11,8 @@ const browserActions = new BrowserActions();
12
11
const common = new Common ( ) ;
13
12
const cliPage = new CliPage ( ) ;
14
13
const jsonKeys = [ [ 'JSON-string' , '"test"' ] , [ 'JSON-number' , '782364' ] , [ 'JSON-boolean' , 'true' ] , [ 'JSON-null' , 'null' ] , [ 'JSON-array' , '[1, 2, 3]' ] ] ;
15
- const keysData = keyTypes . map ( object => ( { ...object } ) ) ;
16
14
let keyNames : string [ ] ;
17
15
let indexName : string ;
18
- keysData . forEach ( key => key . keyName = `${ key . keyName } ` + '-' + `${ common . generateWord ( keyLength ) } ` ) ;
19
16
20
17
fixture `Add keys`
21
18
. meta ( {
@@ -55,23 +52,22 @@ test('Verify that user can create different types(string, number, null, array, b
55
52
} ) ;
56
53
// https://redislabs.atlassian.net/browse/RI-3995
57
54
test
55
+ . only
58
56
. before ( async ( ) => {
59
- await acceptLicenseTermsAndAddDatabaseApi ( ossStandaloneConfig , ossStandaloneConfig . databaseName ) ;
60
- await addKeysViaCli ( keysData ) ;
57
+ await acceptLicenseTermsAndAddDatabaseApi ( ossStandaloneBigConfig , ossStandaloneBigConfig . databaseName ) ;
61
58
} )
62
59
. after ( async ( ) => {
63
60
let commandString = 'DEL' ;
64
61
for ( const key of keyNames ) {
65
62
commandString = commandString . concat ( ` ${ key } ` ) ;
66
63
}
67
64
const commands = [ `FT.DROPINDEX ${ indexName } ` , commandString ] ;
68
- await deleteKeysViaCli ( keysData ) ;
69
65
await cliPage . sendCommandsInCli ( commands ) ;
70
- await deleteStandaloneDatabaseApi ( ossStandaloneConfig ) ;
66
+ await deleteStandaloneDatabaseApi ( ossStandaloneBigConfig ) ;
71
67
} ) ( 'Verify that the new key is displayed at the top of the list' , async t => {
72
68
const keyName = common . generateWord ( 12 ) ;
73
69
const keyName1 = common . generateWord ( 12 ) ;
74
- const keyName2 = common . generateWord ( 36 ) ; // to be sure element will not be displayed be at the top of list
70
+ const keyName2 = common . generateWord ( 36 ) ;
75
71
const keyName3 = common . generateWord ( 10 ) ;
76
72
const keyName4 = `${ common . generateWord ( 10 ) } -test` ;
77
73
const keyName5 = `hash-${ common . generateWord ( 12 ) } ` ;
88
84
89
85
await browserPage . addHashKey ( keyName2 ) ;
90
86
await browserActions . verifyKeyDisplayedTopAndOpened ( keyName2 ) ;
87
+ // Verify that user can see the key removed from the top when refresh List view
88
+ await t . click ( browserPage . refreshKeysButton ) ;
89
+ await browserActions . verifyKeyIsNotDisplayedTop ( keyName1 ) ;
91
90
// Verify that the new key is not displayed at the top when filter per key name applied
92
91
await browserPage . searchByKeyName ( '*test' ) ;
93
92
await browserPage . addHashKey ( keyName4 ) ;
0 commit comments