@@ -49,3 +49,44 @@ test('Verify that user can open the "read more" about the command by clicking on
49
49
await t . pressKey ( 'ctrl+space' ) ;
50
50
await t . expect ( await workbenchPage . monacoCommandDetails . exists ) . notOk ( 'The "read more" about the command is closed' ) ;
51
51
} ) ;
52
+ test ( 'Verify that user can see static list of arguments is displayed when he enters the command in Editor in Workbench' , async t => {
53
+ const command = 'AI.SCRIPTEXECUTE'
54
+ //Type the command in Editing area
55
+ await t . typeText ( workbenchPage . queryInput , command , { replace : true } ) ;
56
+ //Check that no hints are displayed
57
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . notOk ( 'Hints with arguments are not displayed yet' )
58
+ //Add space after the printed command
59
+ await t . typeText ( workbenchPage . queryInput , `${ command } ` , { replace : true } )
60
+ //Check that hint with arguments are displayed
61
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . ok ( 'Hints with arguments are displayed' )
62
+ } ) ;
63
+ test ( 'Verify that user can close the static list of arguments by pressing “ESC”' , async t => {
64
+ const command = 'TS.DELETERULE '
65
+ await t . typeText ( workbenchPage . queryInput , command , { replace : true } )
66
+ //Check that hint with arguments are displayed
67
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . ok ( 'Hints with arguments are displayed' )
68
+ //Remove hints with arguments
69
+ await t . pressKey ( 'esc' ) ;
70
+ //Check no hints are displayed
71
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . notOk ( 'Hints with arguments are not displayed' )
72
+ } ) ;
73
+ test ( 'Verify that user can see the static list of arguments when he uses “Ctrl+Shift+Space” combination for already entered command for Windows' , async t => {
74
+ const command = 'JSON.ARRAPPEND'
75
+ await t . typeText ( workbenchPage . queryInput , command , { replace : true } ) ;
76
+ //Verify that the list with auto-suggestions is displayed
77
+ await t . expect ( await workbenchPage . monacoSuggestion . exists ) . ok ( 'Auto-suggestions are displayed' ) ;
78
+ //Select the command from suggestion list
79
+ await t . pressKey ( 'enter' ) ;
80
+ //Check that the command is displayed in Editing area after selecting
81
+ const script = await workbenchPage . queryInputScriptArea . textContent ;
82
+ await t . expect ( script . replace ( / \s / g, ' ' ) ) . eql ( 'JSON.ARRAPPEND key value ' , 'Result of sent command exists' ) ;
83
+ //Check that hint with arguments are displayed
84
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . ok ( 'Hints with arguments are displayed' )
85
+ //Remove hints with arguments
86
+ await t . pressKey ( 'esc' ) ;
87
+ //Check no hints are displayed
88
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . notOk ( 'Hints with arguments are not displayed' )
89
+ //Check that using shortcut “Ctrl+Shift+Space” hints are displayed
90
+ await t . pressKey ( 'ctrl+shift+space' ) ;
91
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . ok ( 'Hints with arguments are displayed' )
92
+ } ) ;
0 commit comments