@@ -5,7 +5,11 @@ import {
5
5
TriggersAndFunctionsFunctionsPage ,
6
6
TriggersAndFunctionsLibrariesPage
7
7
} from '../../../pageObjects' ;
8
- import { commonUrl , ossStandaloneRedisGears } from '../../../helpers/conf' ;
8
+ import {
9
+ commonUrl ,
10
+ ossClusterRedisGears ,
11
+ ossStandaloneRedisGears
12
+ } from '../../../helpers/conf' ;
9
13
import { rte } from '../../../helpers/constants' ;
10
14
import { DatabaseAPIRequests } from '../../../helpers/api/api-database' ;
11
15
import { Common } from '../../../helpers/common' ;
@@ -55,3 +59,28 @@ test('Verify that function can be invoked', async t => {
55
59
await t . expect ( await triggersAndFunctionsFunctionsPage . Cli . getExecutedCommandTextByIndex ( ) ) . eql ( expectedCommand ) ;
56
60
await t . click ( triggersAndFunctionsFunctionsPage . Cli . cliCollapseButton ) ;
57
61
} ) ;
62
+ test . before ( async ( ) => {
63
+ await databaseHelper . acceptLicenseTermsAndAddOSSClusterDatabase ( ossClusterRedisGears ) ;
64
+ } ) . after ( async ( ) => {
65
+ await databaseAPIRequests . deleteOSSClusterDatabaseApi ( ossClusterRedisGears ) ;
66
+ } ) ( 'Verify that function can be invoked in cluster' , async t => {
67
+ const functionNameFromFile = 'function' ;
68
+ const libNameFromFile = 'lib' ;
69
+ const keyName = [ 'Hello' ] ;
70
+ const argumentsName = [ 'world' , '!!!' ] ;
71
+ const expectedCommand = `TFCALL "${ libNameFromFile } .${ functionNameFromFile } " "${ keyName . length } " "${ keyName } " "${ argumentsName . join ( '" "' ) } "` ;
72
+
73
+ await t . click ( browserPage . NavigationPanel . triggeredFunctionsButton ) ;
74
+ await t . click ( triggersAndFunctionsFunctionsPage . librariesLink ) ;
75
+ await t . click ( triggersAndFunctionsLibrariesPage . addLibraryButton ) ;
76
+ await t . setFilesToUpload ( triggersAndFunctionsLibrariesPage . uploadInput , [ filePathes . invoke ] ) ;
77
+ await t . click ( triggersAndFunctionsLibrariesPage . addLibrarySubmitButton ) ;
78
+ await t . click ( triggersAndFunctionsLibrariesPage . functionsLink ) ;
79
+ await t . click ( triggersAndFunctionsFunctionsPage . getFunctionsNameSelector ( functionNameFromFile ) ) ;
80
+ await t . click ( triggersAndFunctionsFunctionsPage . invokeButton ) ;
81
+ await triggersAndFunctionsFunctionsPage . enterFunctionArguments ( argumentsName ) ;
82
+ await triggersAndFunctionsFunctionsPage . enterFunctionKeyName ( keyName ) ;
83
+ await t . click ( triggersAndFunctionsFunctionsPage . runInCliButton ) ;
84
+ await t . expect ( await triggersAndFunctionsFunctionsPage . Cli . getExecutedCommandTextByIndex ( ) ) . eql ( expectedCommand ) ;
85
+ await t . click ( triggersAndFunctionsFunctionsPage . Cli . cliCollapseButton ) ;
86
+ } ) ;
0 commit comments