@@ -27,6 +27,7 @@ export class CliPage {
27
27
commandHelperBadge = Selector ( '[data-testid=expand-command-helper] span' ) ;
28
28
cliResizeButton = Selector ( '[data-test-subj=resize-btn-browser-cli]' ) ;
29
29
workbenchLink = Selector ( '[data-test-subj=cli-workbench-page-btn]' ) ;
30
+ returnToList = Selector ( '[data-testid=cli-helper-back-to-list-btn]' ) ;
30
31
//TEXT INPUTS (also referred to as 'Text fields')
31
32
cliCommandInput = Selector ( '[data-testid=cli-command]' ) ;
32
33
cliArea = Selector ( '[data-testid=cli' ) ;
@@ -58,7 +59,7 @@ export class CliPage {
58
59
* Select filter group type
59
60
* @param groupName The group name
60
61
*/
61
- async selectFilterGroupType ( groupName : string ) : Promise < void > {
62
+ async selectFilterGroupType ( groupName : string ) : Promise < void > {
62
63
await t . click ( this . filterGroupTypeButton ) ;
63
64
await t . click ( this . filterOptionGroupType . withExactText ( groupName ) ) ;
64
65
}
@@ -69,7 +70,7 @@ export class CliPage {
69
70
* @param amount The amount of the keys
70
71
* @param keyName The name of the keys. The default value is keyName
71
72
*/
72
- async addKeysFromCli ( keyCommand : string , amount : number , keyName = 'keyName' ) : Promise < void > {
73
+ async addKeysFromCli ( keyCommand : string , amount : number , keyName = 'keyName' ) : Promise < void > {
73
74
//Open CLI
74
75
await t . click ( this . cliExpandButton ) ;
75
76
//Add keys
@@ -83,7 +84,7 @@ export class CliPage {
83
84
* Send command in Cli
84
85
* @param command The command to send
85
86
*/
86
- async sendCommandInCli ( command : string ) : Promise < void > {
87
+ async sendCommandInCli ( command : string ) : Promise < void > {
87
88
//Open CLI
88
89
await t . click ( this . cliExpandButton ) ;
89
90
await t . typeText ( this . cliCommandInput , command , { paste : true } ) ;
@@ -95,7 +96,7 @@ export class CliPage {
95
96
* Get command result execution
96
97
* @param command The command for send in CLI
97
98
*/
98
- async getSuccessCommandResultFromCli ( command : string ) : Promise < string > {
99
+ async getSuccessCommandResultFromCli ( command : string ) : Promise < string > {
99
100
//Open CLI
100
101
await t . click ( this . cliExpandButton ) ;
101
102
//Add keys
@@ -127,18 +128,4 @@ export class CliPage {
127
128
await t . click ( this . readMoreButton ) ;
128
129
await t . expect ( getPageUrl ( ) ) . eql ( url , 'The opened page' ) ;
129
130
}
130
-
131
- /**
132
- * Check URL of command opened from command helper
133
- * @param searchedCommand Searched command in Command Helper
134
- * @param listToCompare The list with commands to compare with opened in Command Helper
135
- */
136
- async checkSearchedCommandInCommandHelper ( searchedCommand : string , listToCompare : string [ ] ) : Promise < void > {
137
- await t . typeText ( this . cliHelperSearch , searchedCommand , { speed : 0.5 } ) ;
138
- //Verify results in the output
139
- const commandsCount = await this . cliHelperOutputTitles . count ;
140
- for ( let i = 0 ; i < commandsCount ; i ++ ) {
141
- await t . expect ( this . cliHelperOutputTitles . nth ( i ) . textContent ) . eql ( listToCompare [ i ] , 'Results in the output contains searched value' ) ;
142
- }
143
- }
144
131
}
0 commit comments