@@ -3,7 +3,7 @@ import { BrowserPage } from '../../../../pageObjects';
3
3
import {
4
4
commonUrl ,
5
5
ossStandaloneBigConfig ,
6
- ossStandaloneConfig
6
+ ossStandaloneConfigEmpty
7
7
} from '../../../../helpers/conf' ;
8
8
import { keyLength , KeyTypesTexts , rte } from '../../../../helpers/constants' ;
9
9
import { addKeysViaCli , deleteKeysViaCli , keyTypes } from '../../../../helpers/keys' ;
@@ -24,17 +24,17 @@ fixture `Filtering per key name in Browser page`
24
24
. meta ( { type : 'critical_path' , rte : rte . standalone } )
25
25
. page ( commonUrl )
26
26
. beforeEach ( async ( ) => {
27
- await databaseHelper . acceptLicenseTermsAndAddDatabaseApi ( ossStandaloneConfig ) ;
27
+ await databaseHelper . acceptLicenseTermsAndAddDatabaseApi ( ossStandaloneConfigEmpty ) ;
28
28
} )
29
29
. afterEach ( async ( ) => {
30
30
// Delete database
31
- await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneConfig ) ;
31
+ await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneConfigEmpty ) ;
32
32
} ) ;
33
33
test
34
34
. after ( async ( ) => {
35
35
// Clear and delete database
36
- await apiKeyRequests . deleteKeyByNameApi ( keyName , ossStandaloneConfig . databaseName ) ;
37
- await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneConfig ) ;
36
+ await apiKeyRequests . deleteKeyByNameApi ( keyName , ossStandaloneConfigEmpty . databaseName ) ;
37
+ await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneConfigEmpty ) ;
38
38
} ) ( 'Verify that user can search a key with selected data type is filters' , async t => {
39
39
keyName = Common . generateWord ( 10 ) ;
40
40
// Add new key
62
62
. after ( async ( ) => {
63
63
// Clear keys and database
64
64
await deleteKeysViaCli ( keysData ) ;
65
- await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneConfig ) ;
65
+ await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneConfigEmpty ) ;
66
66
} ) ( 'Verify that user can filter keys per data type in Browser page' , async t => {
67
67
keyName = Common . generateWord ( 10 ) ;
68
68
// Create new keys
69
69
await addKeysViaCli ( keysData ) ;
70
70
for ( const { textType, keyName } of keysData ) {
71
71
await browserPage . selectFilterGroupType ( textType ) ;
72
72
await t . expect ( await browserPage . isKeyIsDisplayedInTheList ( keyName ) ) . ok ( `The key of type ${ textType } was found` ) ;
73
+ textType !== KeyTypesTexts . Graph
74
+ ? await t . expect ( browserPage . filteringLabel . textContent ) . contains ( textType , 'Keys not filtered by key type' )
75
+ : await t . expect ( browserPage . filteringLabel . textContent ) . contains ( 'graphdata' , 'Keys not filtered by key type' )
76
+ const regExp = new RegExp ( '[1-9]' ) ;
77
+ await t . expect ( browserPage . keysNumberOfResults . textContent ) . match ( regExp , 'Number of found keys' ) ;
78
+ }
79
+ // Check for tree view
80
+ await t . click ( browserPage . treeViewButton ) ;
81
+ for ( const { textType, keyName } of keysData ) {
82
+ await browserPage . selectFilterGroupType ( textType ) ;
83
+ await t . expect ( await browserPage . isKeyIsDisplayedInTheList ( keyName ) ) . ok ( `The key of type ${ textType } was found` ) ;
84
+ textType !== KeyTypesTexts . Graph
85
+ ? await t . expect ( browserPage . filteringLabel . textContent ) . contains ( textType , 'Keys not filtered by key type' )
86
+ : await t . expect ( browserPage . filteringLabel . textContent ) . contains ( 'graphdata' , 'Keys not filtered by key type' )
73
87
const regExp = new RegExp ( '[1-9]' ) ;
74
88
await t . expect ( browserPage . keysNumberOfResults . textContent ) . match ( regExp , 'Number of found keys' ) ;
75
89
}
0 commit comments