@@ -49,3 +49,45 @@ 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
+ const command_hint = 'AI.SCRIPTEXECUTE '
60
+ await t . typeText ( workbenchPage . queryInput , command_hint , { replace : true } )
61
+ //Check that hint with arguments are displayed
62
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . ok ( 'Hints with arguments are displayed' )
63
+ } ) ;
64
+ test ( 'Verify that user can close the static list of arguments by pressing “ESC”' , async t => {
65
+ const command = 'TS.DELETERULE '
66
+ await t . typeText ( workbenchPage . queryInput , command , { replace : true } )
67
+ //Check that hint with arguments are displayed
68
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . ok ( 'Hints with arguments are displayed' )
69
+ //Remove hints with arguments
70
+ await t . pressKey ( 'esc' ) ;
71
+ //Check no hints are displayed
72
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . notOk ( 'Hints with arguments are not displayed' )
73
+ } ) ;
74
+ 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 => {
75
+ const command = 'JSON.ARRAPPEND'
76
+ await t . typeText ( workbenchPage . queryInput , command , { replace : true } ) ;
77
+ //Verify that the list with auto-suggestions is displayed
78
+ await t . expect ( await workbenchPage . monacoSuggestion . exists ) . ok ( 'Auto-suggestions are displayed' ) ;
79
+ //Select the command from suggestion list
80
+ await t . pressKey ( 'enter' ) ;
81
+ //Check that the command is displayed in Editing area after selecting
82
+ const script = await workbenchPage . queryInputScriptArea . textContent ;
83
+ await t . expect ( script . replace ( / \s / g, ' ' ) ) . eql ( 'JSON.ARRAPPEND key value ' , 'Result of sent command exists' ) ;
84
+ //Check that hint with arguments are displayed
85
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . ok ( 'Hints with arguments are displayed' )
86
+ //Remove hints with arguments
87
+ await t . pressKey ( 'esc' ) ;
88
+ //Check no hints are displayed
89
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . notOk ( 'Hints with arguments are not displayed' )
90
+ //Check that using shortcut “Ctrl+Shift+Space” hints are displayed
91
+ await t . pressKey ( 'ctrl+shift+space' ) ;
92
+ await t . expect ( workbenchPage . monacoHintWithArguments . visible ) . ok ( 'Hints with arguments are displayed' )
93
+ } ) ;
0 commit comments