@@ -17,6 +17,7 @@ const userAgreementPage = new UserAgreementPage();
17
17
const addRedisDatabasePage = new AddRedisDatabasePage ( ) ;
18
18
const COMMAND_GROUP_JSON = 'JSON' ;
19
19
const COMMAND_GROUP_SEARCH = 'Search' ;
20
+ const COMMAND_GROUP_HyperLogLog = 'HyperLogLog' ;
20
21
21
22
fixture `CLI Command helper`
22
23
. meta ( { type : 'regression' } )
@@ -47,7 +48,6 @@ test('Verify that user can see in Command helper and click on new group "JSON",
47
48
//Check that command info is displayed on the page
48
49
await t . expect ( cliPage . cliReadMoreJSONCommandDocumentation ( ) . textContent ) . contains ( 'JSON.SET' ) ;
49
50
} ) ;
50
-
51
51
test ( 'Verify that user can see in Command helper and click on new group "Search", can choose it and see list of commands in the group' , async t => {
52
52
const commandForCheck = 'FT.EXPLAIN' ;
53
53
await myRedisDatabasePage . clickOnDBByName ( ossStandaloneConfig . databaseName ) ;
@@ -65,3 +65,63 @@ test('Verify that user can see in Command helper and click on new group "Search"
65
65
//Check that command info is displayed on the page
66
66
await t . expect ( cliPage . cliReadMoreRediSearchCommandDocumentation ( ) . textContent ) . contains ( 'FT.EXPLAIN' ) ;
67
67
} ) ;
68
+ test ( 'Verify that user can see HyperLogLog title in Command Helper for this command group' , async t => {
69
+ const commandForCheck = 'PFCOUNT' ;
70
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneConfig . databaseName ) ;
71
+ //Open CLI
72
+ await t . click ( cliPage . cliExpandButton ) ;
73
+ //Select one command from the list
74
+ await cliPage . selectFilterGroupType ( COMMAND_GROUP_HyperLogLog ) ;
75
+ await t . click ( cliPage . cliHelperOutputTitles . withExactText ( commandForCheck ) ) ;
76
+ //Verify results of opened command
77
+ await t . expect ( cliPage . cliHelperTitleArgs . textContent ) . eql ( 'PFCOUNT key [key ...]' , 'Selected command title' ) ;
78
+ //Click on Read More link for selected command
79
+ await t . click ( cliPage . readMoreButton ) ;
80
+ //Check new opened window page with the correct URL
81
+ await t . expect ( getPageUrl ( ) ) . contains ( '/pfcount' ) ;
82
+ } ) ;
83
+ test ( 'Verify that user can see all separated groups for AI json file (model, tensor, inference, script)' , async t => {
84
+ const AIGroups = [
85
+ 'Model' ,
86
+ 'Script' ,
87
+ 'Inference' ,
88
+ 'Tensor'
89
+ ] ;
90
+ const commandsForCheck = [
91
+ 'AI.MODELDEL' ,
92
+ 'AI.SCRIPTSTORE' ,
93
+ 'AI.SCRIPTEXECUTE' ,
94
+ 'AI.TENSORSET'
95
+ ] ;
96
+ const commandArgumentsCheck = [
97
+ 'AI.MODELDEL key' ,
98
+ 'AI.SCRIPTSTORE key CPU|GPU [TAG tag] ENTRY_POINTS entry_point_count entry_point [entry_point ...]' ,
99
+ 'AI.SCRIPTEXECUTE key function [KEYS key_count key [key ...]] [INPUTS input_count input [input ...]] [ARGS arg_count arg [arg ...]] [OUTPUTS output_count output [output ...]] [TIMEOUT timeout]' ,
100
+ 'AI.TENSORSET key FLOAT|DOUBLE|INT8|INT16|INT32|INT64|UINT8|UINT16|STRING|BOOL shape [shape ...] [BLOB blob] [VALUES value [VALUES value ...]]'
101
+ ] ;
102
+ const ExternalPage = [
103
+ '/#aimodeldel' ,
104
+ '/#aiscriptstore' ,
105
+ '/#aiscriptexecute' ,
106
+ '/#aitensorset'
107
+ ] ;
108
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneConfig . databaseName ) ;
109
+ //Open CLI
110
+ await t . click ( cliPage . cliExpandButton ) ;
111
+ let i = 0 ;
112
+ while ( i <= 3 ) {
113
+ //Select one group from the list
114
+ await cliPage . selectFilterGroupType ( AIGroups [ i ] ) ;
115
+ //Click on the group
116
+ await t . click ( cliPage . cliHelperOutputTitles . withExactText ( commandsForCheck [ i ] ) ) ;
117
+ //Verify results of opened command
118
+ await t . expect ( cliPage . cliHelperTitleArgs . textContent ) . eql ( commandArgumentsCheck [ i ] , 'Selected command title' ) ;
119
+ //Click on Read More link for selected command
120
+ await t . click ( cliPage . readMoreButton ) ;
121
+ //Check new opened window page with the correct URL
122
+ await t . expect ( getPageUrl ( ) ) . contains ( ExternalPage [ i ] ) ;
123
+ //Close the window with external link to switch to the application window
124
+ await t . closeWindow ( ) ;
125
+ i ++ ;
126
+ }
127
+ } ) ;
0 commit comments