Skip to content

Commit b23a968

Browse files
fix part#2 of tests
1 parent 0b5fea0 commit b23a968

File tree

7 files changed

+22
-28
lines changed

7 files changed

+22
-28
lines changed

tests/e2e/pageObjects/components/explore-tab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { Selector, t } from 'testcafe';
33
export class ExploreTab {
44

55
dataStructureAccordionTutorialButton = Selector('[data-testid=accordion-button-ds]');
6+
triggersFunctionsAccordionTutorialButton = Selector('[data-testid=accordion-button-tf]');
67
internalLinkWorkingWithHashes = Selector('[data-testid=internal-link-ds-hashes]');
8+
internalTriggersAndFunctionsLink = Selector('[data-testid=internal-link-tf-load]');
79
redisStackTutorialsButton = Selector('[data-testid=accordion-button-redis_stack]');
810
timeSeriesLink = Selector('[data-testid=accordion-button-ds-ts]');
911
internalTimeSeriesLink = Selector('[data-testid=internal-link-ds-ts-ret-compact]');
@@ -16,8 +18,6 @@ export class ExploreTab {
1618
enablementAreaPagination = Selector('[data-testid=enablement-area__pagination-popover-btn]');
1719
paginationPopoverButtons = Selector('[data-testid=enablement-area__pagination-popover] button');
1820
enablementAreaPaginationPopover = Selector('[data-testid=enablement-area__pagination-popover]');
19-
redisStackLinks = Selector('[data-testid=accordion-redis_stack] [data-testid^=internal-link]');
20-
vectorSimilitaritySearchButton = Selector('[data-testid=internal-link-vector_similarity_search]');
2121
nextPageButton = Selector('[data-testid=enablement-area__next-page-btn]');
2222
prevPageButton = Selector('[data-testid=enablement-area__prev-page-btn]');
2323
guidesGraphAccordion = Selector('[data-testid=accordion-button-graph]');

tests/e2e/pageObjects/my-redis-databases-page.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export class MyRedisDatabasePage extends BasePage {
7979
failedResultsAccordion = Selector('[data-testid^=failed-results-]');
8080
// CONTAINERS
8181
databaseContainer = Selector('.databaseContainer');
82+
connectionTypeTitle = Selector('[data-test-subj=tableHeaderCell_connectionType_2]');
8283

8384
/**
8485
* Click on the database by name

tests/e2e/tests/web/critical-path/cluster-details/cluster-details.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ test
8080

8181
await t.click(tutorials.dataStructureAccordionTutorialButton);
8282
await t.click(tutorials.internalLinkWorkingWithHashes);
83-
await tutorials.runBlockCode('Create');
83+
await tutorials.runBlockCode('Create a hash');
8484
// Go to Analysis Tools page
8585
await t.click(myRedisDatabasePage.NavigationPanel.analysisPageButton);
8686
// Verify that values in table are dynamic

tests/e2e/tests/web/critical-path/database/modules.e2e.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ test('Verify that user can see DB modules on DB list page for Standalone DB', as
6262
});
6363
test('Verify that user can see full module list in the Edit mode', async t => {
6464
// Verify that module column is displayed
65-
await t.expect(myRedisDatabasePage.moduleColumn.visible).ok('Module column not found');
65+
await t.expect(myRedisDatabasePage.connectionTypeTitle.visible).ok('connection type column not found');
6666
// Open Edit mode
6767
await t.click(myRedisDatabasePage.editDatabaseButton);
68+
await myRedisDatabasePage.InsightsPanel.togglePanel(true);
6869
// Verify that module column is not displayed
69-
await t.expect(myRedisDatabasePage.moduleColumn.exists).notOk('Module column not found');
70+
await t.expect(myRedisDatabasePage.connectionTypeTitle.exists).notOk('connection type column not found');
7071
// Verify modules in Edit mode
7172
await myRedisDatabasePage.checkModulesOnPage(moduleList);
7273
});

tests/e2e/tests/web/critical-path/workbench/default-scripts-area.e2e.ts

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const telemetry = new Telemetry();
1616
let indexName = chance.word({ length: 5 });
1717
let keyName = chance.word({ length: 5 });
1818
const logger = telemetry.createLogger();
19-
const telemetryEvent = 'WORKBENCH_ENABLEMENT_AREA_GUIDE_OPENED';
20-
const telemetryPath = 'static/guides/quick-guides/document/working-with-hashes.md';
19+
const telemetryEvent = 'EXPLORE_PANEL_TUTORIAL_OPENED';
20+
const telemetryPath = 'static/tutorials/ds/hashes.md';
2121
const expectedProperties = [
2222
'databaseId',
2323
'path'
@@ -46,6 +46,9 @@ test
4646
`HMSET product:1 name "${keyName}"`,
4747
`HMSET product:2 name "${keyName}"`
4848
];
49+
const addedScript = `FT._LIST // Return a list of all indices\n' +
50+
'\n' +
51+
'FT.INFO "${indexName}"" // Display information about a particular index`;
4952
// Send commands
5053
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
5154
// Run automatically added "FT._LIST" and "FT.INFO {index}" scripts
@@ -57,7 +60,9 @@ test
5760
// Verify that telemetry event 'WORKBENCH_ENABLEMENT_AREA_GUIDE_OPENED' sent and has all expected properties
5861
await telemetry.verifyEventHasProperties(telemetryEvent, expectedProperties, logger);
5962
await telemetry.verifyEventPropertyValue(telemetryEvent, 'path', telemetryPath, logger);
60-
await tutorials.runBlockCode('Additional index information');
63+
64+
await workbenchPage.sendCommandInWorkbench(addedScript);
65+
6166
// Check the FT._LIST result
6267
await t.expect(workbenchPage.queryTextResult.textContent).contains(indexName, 'The result of the FT._LIST command not found');
6368
// Check the FT.INFO result
@@ -76,13 +81,7 @@ test('Verify that user can edit and run automatically added "Search" script in W
7681
// Send commands
7782
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
7883
// Run automatically added FT.SEARCH script with edits
79-
await workbenchPage.InsightsPanel.togglePanel(true);
80-
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
81-
await t.click(tutorials.dataStructureAccordionTutorialButton);
82-
await t.click(tutorials.internalLinkWorkingWithHashes);
83-
await tutorials.runBlockCode('Exact text search');
8484

85-
await t.pressKey('ctrl+a delete');
8685
await workbenchPage.sendCommandInWorkbench(searchCommand);
8786
// Check the FT.SEARCH result
8887
await t.switchToIframe(workbenchPage.iframe);
@@ -103,13 +102,6 @@ test('Verify that user can edit and run automatically added "Aggregate" script i
103102
// Send commands
104103
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'), 0.5);
105104
// Run automatically added FT.Aggregate script with edits
106-
await workbenchPage.InsightsPanel.togglePanel(true);
107-
const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
108-
await t.click(tab.dataStructureAccordionTutorialButton);
109-
await t.click(tab.internalLinkWorkingWithHashes);
110-
await tab.runBlockCode('Group by & sort by aggregation: COUNT');
111-
//await t.click(workbenchPage.preselectGroupBy);
112-
await t.pressKey('ctrl+a delete');
113105
await workbenchPage.sendCommandInWorkbench(searchCommand);
114106
// Check the FT.Aggregate result
115107
await t.switchToIframe(workbenchPage.iframe);

tests/e2e/tests/web/regression/insights/open-insights-panel.e2e.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ test
5555
await t.click(browserPage.NavigationPanel.myRedisDBButton);
5656
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
5757
await t.expect(browserPage.InsightsPanel.sidePanel.exists).ok('the panel is opened');
58-
await t.expect(await browserPage.InsightsPanel.existsCompatibilityPopover.textContent).contains('Search and Query capability', 'popover is not displayed');
58+
await t.expect(await browserPage.InsightsPanel.existsCompatibilityPopover.textContent).contains('Search and query capability', 'popover is not displayed');
5959
const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
60-
await t.expect(tab.preselectArea.textContent).contains('VECTOR SIMILARITY SEARCH', 'the tutorial is incorrect');
60+
await t.expect(tab.preselectArea.textContent).contains('How To Query Your Data', 'the tutorial is incorrect');
6161

6262
await t.click(browserPage.NavigationPanel.myRedisDBButton);
6363
await myRedisDatabasePage.clickOnDBByName(ossStandaloneV5Config.databaseName);
@@ -67,8 +67,8 @@ test
6767
await t.click(browserPage.NavigationPanel.myRedisDBButton);
6868
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
6969
await t.expect(browserPage.InsightsPanel.sidePanel.exists).ok('the panel is opened');
70-
await t.expect(await browserPage.InsightsPanel.existsCompatibilityPopover.textContent).contains('time series', 'popover is not displayed');
71-
await t.expect(tab.preselectArea.textContent).contains('REDIS FOR TIME SERIES', 'the tutorial is incorrect');
70+
await t.expect(await browserPage.InsightsPanel.existsCompatibilityPopover.textContent).contains('Time series data', 'popover is not displayed');
71+
await t.expect(tab.preselectArea.textContent).contains('Time Series', 'the tutorial is incorrect');
7272
});
7373

7474
test

tests/e2e/tests/web/regression/workbench/redisearch-module-not-available.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ test('Verify that user can see options on what can be done to work with capabili
5252
await t.expect(await workbenchPage.commandExecutionResult.withText('RediSearch is not available').visible)
5353
.ok('Missing RedisSearch title is not visible');
5454
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
55-
await t.click(tutorials.redisStackTutorialsButton);
56-
await t.click(tutorials.vectorSimilitaritySearchButton);
57-
await tutorials.runBlockCode('Create index for VSS');
55+
await t.click(tutorials.triggersFunctionsAccordionTutorialButton);
56+
await t.click(tutorials.internalTriggersAndFunctionsLink);
57+
await tutorials.runBlockCode('Upload library');
5858
await t.expect(tutorials.cloudFreeLinkTooltip.visible).ok('the tooltip, that module is unavailable is not opened');
5959
});

0 commit comments

Comments
 (0)