Skip to content

Commit 1531687

Browse files
e2e - table view tests
1 parent e0e5cdc commit 1531687

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/e2e/pageObjects/workbench-page.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export class WorkbenchPage {
77
cssReRunCommandButton: string
88
cssDeleteCommandButton: string
99
cssQueryCardOutputResponceSuccess: string
10+
cssTableViewTypeOption: string
1011
//------------------------------------------------------------------------------------------
1112
//DECLARATION OF TYPES: DOM ELEMENTS and UI COMPONENTS
1213
//*Assign the 'Selector' type to any element/component nested within the constructor.
@@ -49,6 +50,7 @@ export class WorkbenchPage {
4950
this.cssReRunCommandButton = '[data-testid=re-run-command]';
5051
this.cssDeleteCommandButton = '[data-testid=delete-command]';
5152
this.cssQueryCardOutputResponceSuccess = '[data-testid=query-card-output-response-success]';
53+
this.cssTableViewTypeOption = '[data-testid=view-type-selected-Plugin-redisearch__redisearch]';
5254
//-------------------------------------------------------------------------------------------
5355
//DECLARATION OF SELECTORS
5456
//*Declare all elements/components of the relevant page.

tests/e2e/tests/critical-path/workbench/command-results.e2e.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,15 @@ test('Verify that user can delete command with result from table with results in
6464
//Verify that deleted command is not in results
6565
await t.expect(workbenchPage.queryCardCommand.withExactText(commandForSend1).exists).notOk(`Command ${commandForSend1} is deleted from table with results`);
6666
});
67+
test('Verify that user can see the results found in the table view by default for FT.INFO, FT.SEARCH and FT.AGGREGATE', async t => {
68+
const commands = [
69+
'FT.INFO',
70+
'FT.SEARCH',
71+
'FT.AGGREGATE'
72+
];
73+
//Send commands and check table view is default
74+
for(let command of commands) {
75+
await workbenchPage.sendCommandInWorkbench(command);
76+
await t.expect(await workbenchPage.queryCardContainer.nth(0).find(workbenchPage.cssTableViewTypeOption).visible).ok(`The table view is selected by default for command ${command}`);
77+
}
78+
});

0 commit comments

Comments
 (0)