Skip to content

Commit 42f700f

Browse files
authored
fix selector (#1195)
1 parent da3a9b9 commit 42f700f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/e2e/pageObjects/workbench-page.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export class WorkbenchPage {
1212
cssMonacoCommandPaletteLine = '[aria-label="Command Palette"]';
1313
cssQueryTextResult = '[data-testid=query-cli-result]';
1414
cssWorkbenchCommandInHistory = '[data-testid=wb-command]';
15-
cssWorkbenchCommandResultInHistory = '[data-testid=wb-command-result]';
15+
cssWorkbenchCommandSuccessResultInHistory = '[data-testid=cli-output-response-success]';
16+
cssWorkbenchCommandFailedResultInHistory = '[data-testid=data-testid="cli-output-response-fail"]';
1617
cssQueryTableResult = '[data-testid^=query-table-result-]';
1718
cssQueryPluginResult = '[data-testid^=query-table-result-]';
1819
queryGraphContainer = '[data-testid=query-graph-container]';
@@ -102,7 +103,8 @@ export class WorkbenchPage {
102103
loadedCommand = Selector('[class=euiLoadingContent__singleLine]');
103104
runButtonSpinner = Selector('[data-testid=loading-spinner]');
104105
workbenchCommandInHistory = Selector(this.cssWorkbenchCommandInHistory);
105-
workbenchCommandResultInHistory = Selector(this.cssWorkbenchCommandInHistory);
106+
workbenchCommandSuccessResultInHistory = Selector(this.cssWorkbenchCommandSuccessResultInHistory);
107+
workbenchCommandFailedResultInHistory = Selector(this.cssWorkbenchCommandFailedResultInHistory);
106108
//MONACO ELEMENTS
107109
monacoCommandDetails = Selector('div.suggest-details-container');
108110
monacoCloseCommandDetails = Selector('span.codicon-close');

tests/e2e/tests/regression/workbench/group-mode.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test('Verify that user can run the commands from the Editor in the group mode',
3434
await t.expect(workbenchPage.queryCardCommand.textContent).eql(`${counter} Command(s) - ${counter} success, 0 error(s)`, 'Not valid summary');
3535
// Verify that user can see full list of commands with results run in group
3636
await t.expect(workbenchPage.queryTextResult.find(workbenchPage.cssWorkbenchCommandInHistory).withText(`> ${command}`).count).eql(counter, 'Number of commands is not correct');
37-
await t.expect(workbenchPage.queryTextResult.find(workbenchPage.cssWorkbenchCommandResultInHistory).count).eql(counter, 'Number of command result is not correct');
37+
await t.expect(workbenchPage.queryTextResult.find(workbenchPage.cssWorkbenchCommandSuccessResultInHistory).count).eql(counter, 'Number of command result is not correct');
3838
// Verify that if the only one command is executed in group, the result will be displayed as for group mode
3939
await workbenchPage.sendCommandInWorkbench(`${command}`);
4040
await t.expect(workbenchPage.queryCardCommand.textContent).eql('1 Command(s) - 1 success, 0 error(s)', 'Not valid summary for 1 command');
@@ -65,5 +65,5 @@ test('Verify that user can see group results in full mode', async t => {
6565
await t.click(workbenchPage.fullScreenButton);
6666
await t.expect(workbenchPage.queryCardCommand.textContent).eql(`${commandsNumber} Command(s) - ${commandsNumber} success, 0 error(s)`, 'Not valid summary');
6767
await t.expect(workbenchPage.queryTextResult.find(workbenchPage.cssWorkbenchCommandInHistory).withText('> ').count).eql(commandsNumber, 'Number of commands is not correct');
68-
await t.expect(workbenchPage.queryTextResult.find(workbenchPage.cssWorkbenchCommandResultInHistory).count).eql(commandsNumber, 'Number of command result is not correct');
68+
await t.expect(workbenchPage.queryTextResult.find(workbenchPage.cssWorkbenchCommandSuccessResultInHistory).count).eql(commandsNumber, 'Number of command result is not correct');
6969
});

0 commit comments

Comments
 (0)