Skip to content

Commit 0b5fea0

Browse files
fix part of tests
1 parent 071fe23 commit 0b5fea0

File tree

9 files changed

+32
-55
lines changed

9 files changed

+32
-55
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import { Selector, t } from 'testcafe';
22

33
export class ExploreTab {
44

5-
documentButtonInQuickGuides = Selector('[data-testid=accordion-button-document]');
6-
internalLinkWorkingWithHashes = Selector('[data-testid=internal-link-working-with-hashes]');
5+
dataStructureAccordionTutorialButton = Selector('[data-testid=accordion-button-ds]');
6+
internalLinkWorkingWithHashes = Selector('[data-testid=internal-link-ds-hashes]');
77
redisStackTutorialsButton = Selector('[data-testid=accordion-button-redis_stack]');
8-
timeSeriesLink = Selector('[data-testid=internal-link-redis_for_time_series]');
8+
timeSeriesLink = Selector('[data-testid=accordion-button-ds-ts]');
9+
internalTimeSeriesLink = Selector('[data-testid=internal-link-ds-ts-ret-compact]');
910
scrolledEnablementArea = Selector('[data-testid=enablement-area__page]');
1011
closeEnablementPage = Selector('[data-testid=enablement-area__page-close]');
1112
tutorialLinkField = Selector('[data-testid=tutorial-link-field]');

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
@@ -78,7 +78,7 @@ test
7878
await clusterDetailsPage.InsightsPanel.togglePanel(true);
7979
const tutorials = await clusterDetailsPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
8080

81-
await t.click(tutorials.documentButtonInQuickGuides);
81+
await t.click(tutorials.dataStructureAccordionTutorialButton);
8282
await t.click(tutorials.internalLinkWorkingWithHashes);
8383
await tutorials.runBlockCode('Create');
8484
// Go to Analysis Tools page

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ test
159159
//Run Create hash index command
160160
await browserPage.InsightsPanel.togglePanel(true);
161161
const tutorials = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
162-
await t.click(tutorials.documentButtonInQuickGuides);
162+
await t.click(tutorials.dataStructureAccordionTutorialButton);
163163
await t.click(tutorials.internalLinkWorkingWithHashes);
164-
await tutorials.runBlockCode('Create');
164+
await tutorials.runBlockCode('Create a hash');
165165
//Verify that CPU and commands per second parameters are changed
166166
const commandsSecAfterEdit = await browserPage.OverviewPanel.overviewCommandsSec.textContent;
167167
await browserPage.OverviewPanel.waitForCpuIsCalculated();

tests/e2e/tests/web/critical-path/url-handling/url-handling.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ test
6868
const connectUrlParams = {
6969
redisUrl: `redis://${databaseUsername}:${databasePassword}@${host}:${port}`,
7070
databaseAlias: databaseName,
71-
redirect: 'workbench?guidePath=/quick-guides/document/introduction.md',
71+
redirect: 'workbench?guidePath=/sq/introduction.md',
7272
cloudBdbId: '1232',
7373
subscriptionType: 'fixed',
7474
planMemoryLimit: '30',
@@ -81,7 +81,7 @@ test
8181
await t.expect(workbenchPage.submitCommandButton.exists).ok('Redirection to Workbench is not correct');
8282
const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
8383
await t.expect(tab.preselectArea.textContent).contains('INTRODUCTION', 'the tutorial page is incorrect');
84-
await t.expect(tab.preselectArea.textContent).contains('Document', 'the tutorial is incorrect');
84+
await t.expect(tab.preselectArea.textContent).contains('How To Query Your Data', 'the tutorial is incorrect');
8585

8686
//Verify that the same db is not added
8787
await t.navigateTo(generateLink(connectUrlParams));

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test
5151
// Run automatically added "FT._LIST" and "FT.INFO {index}" scripts
5252
await workbenchPage.InsightsPanel.togglePanel(true);
5353
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
54-
await t.click(tutorials.documentButtonInQuickGuides);
54+
await t.click(tutorials.dataStructureAccordionTutorialButton);
5555
await t.click(tutorials.internalLinkWorkingWithHashes);
5656

5757
// Verify that telemetry event 'WORKBENCH_ENABLEMENT_AREA_GUIDE_OPENED' sent and has all expected properties
@@ -78,7 +78,7 @@ test('Verify that user can edit and run automatically added "Search" script in W
7878
// Run automatically added FT.SEARCH script with edits
7979
await workbenchPage.InsightsPanel.togglePanel(true);
8080
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
81-
await t.click(tutorials.documentButtonInQuickGuides);
81+
await t.click(tutorials.dataStructureAccordionTutorialButton);
8282
await t.click(tutorials.internalLinkWorkingWithHashes);
8383
await tutorials.runBlockCode('Exact text search');
8484

@@ -105,7 +105,7 @@ test('Verify that user can edit and run automatically added "Aggregate" script i
105105
// Run automatically added FT.Aggregate script with edits
106106
await workbenchPage.InsightsPanel.togglePanel(true);
107107
const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
108-
await t.click(tab.documentButtonInQuickGuides);
108+
await t.click(tab.dataStructureAccordionTutorialButton);
109109
await t.click(tab.internalLinkWorkingWithHashes);
110110
await tab.runBlockCode('Group by & sort by aggregation: COUNT');
111111
//await t.click(workbenchPage.preselectGroupBy);

tests/e2e/tests/web/regression/workbench/autoexecute-button.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test.skip('Verify that when user clicks on auto-execute button, command is run',
2828
// Verify that admin can use redis-auto format in .md file for Guides for auto-executed button
2929
await workbenchPage.InsightsPanel.togglePanel(true);
3030
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
31-
await t.click(tutorials.documentButtonInQuickGuides);
31+
await t.click(tutorials.dataStructureAccordionTutorialButton);
3232
await t.click(tutorials.internalLinkWorkingWithHashes);
3333
await tutorials.runBlockCode('Create');
3434
await t.expect(workbenchPage.queryInput.textContent).eql(command, 'Editor is changed');

tests/e2e/tests/web/regression/workbench/default-scripts-area.e2e.ts

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -44,35 +44,35 @@ test('Verify that user can see the [Manual] option in the Enablement area', asyn
4444
test('Verify that user can see saved article in Enablement area when he leaves Workbench page and goes back again', async t => {
4545
await workbenchPage.InsightsPanel.togglePanel(true);
4646
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
47-
await t.click(tutorials.documentButtonInQuickGuides);
48-
await t.expect(tutorials.internalLinkWorkingWithHashes.visible).ok('The working with hachs link is not visible', { timeout: 5000 });
47+
await t.click(tutorials.dataStructureAccordionTutorialButton);
48+
await t.expect(tutorials.internalLinkWorkingWithHashes.visible).ok('The working with hashes link is not visible', { timeout: 5000 });
4949
// Open Working with Hashes section
5050
await t.click(tutorials.internalLinkWorkingWithHashes);
5151
// Check the button from Hash page is visible
52-
await tutorials.runBlockCode('Create');
53-
let selector = await tutorials.getRunSelector('Create');
52+
await tutorials.runBlockCode('Create a hash');
53+
let selector = await tutorials.getRunSelector('Create a hash');
5454
await t.expect(selector.visible).ok('The end of the page is not visible');
5555
// Go to Browser page
5656
await t.click(myRedisDatabasePage.NavigationPanel.browserButton);
5757
// Go back to Workbench page
5858
await t.click(myRedisDatabasePage.NavigationPanel.workbenchButton);
5959
// Verify that the same article is opened in Enablement area
60-
selector = await tutorials.getRunSelector('Create');
60+
selector = await tutorials.getRunSelector('Create a hash');
6161
await t.expect(selector.visible).ok('The end of the page is not visible');
6262
// Go to list of DBs page
6363
await t.click(myRedisDatabasePage.NavigationPanel.myRedisDBButton);
6464
// Go back to active DB again
6565
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
6666
// Check that user is on Workbench page and "Working with Hashes" page is displayed
67-
selector = await tutorials.getRunSelector('Create');
67+
selector = await tutorials.getRunSelector('Create a hash');
6868
await t.expect(selector.visible).ok('The end of the page is not visible');
6969
});
7070
//skipped due the issue RI-2384
7171
test.skip('Verify that user can see saved scroll position in Enablement area when he leaves Workbench page and goes back again', async t => {
7272
// Open Working with Hashes section
7373
await workbenchPage.InsightsPanel.togglePanel(true);
7474
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
75-
await t.click(tutorials.documentButtonInQuickGuides);
75+
await t.click(tutorials.dataStructureAccordionTutorialButton);
7676
await t.click(tutorials.internalLinkWorkingWithHashes);
7777
// Evaluate the last button in Enablement Area
7878
const buttonsQuantity = await workbenchPage.preselectButtons.count;
@@ -96,16 +96,17 @@ test.skip('Verify that user can see saved scroll position in Enablement area whe
9696
});
9797
test('Verify that user can see the siblings menu by clicking on page counter element between Back and Next buttons', async t => {
9898
const popoverButtons = [
99-
'Introduction',
100-
'Working with Hashes',
101-
'Working with JSON',
102-
'Learn More'
99+
'Strings',
100+
'Hashes',
101+
'Lists',
102+
'Sets',
103+
'Sorted sets'
103104
];
104105

105106
// Open Working with Hashes section and click on the on page counter
106107
await workbenchPage.InsightsPanel.togglePanel(true);
107108
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
108-
await t.click(tutorials.documentButtonInQuickGuides);
109+
await t.click(tutorials.dataStructureAccordionTutorialButton);
109110
await t.expect(tutorials.internalLinkWorkingWithHashes.visible).ok('The working with hachs link is not visible', { timeout: 5000 });
110111
await t.click(tutorials.internalLinkWorkingWithHashes);
111112
// Verify that user can see the quick navigation section to navigate between siblings under the scrolling content
@@ -120,29 +121,3 @@ test('Verify that user can see the siblings menu by clicking on page counter ele
120121
await t.expect(popoverButton.textContent).eql(popoverButtons[i], `The siblings menu button ${popoverButtons[i]} is not displayed`);
121122
}
122123
});
123-
test('Verify that the same type of content is supported in the “Tutorials” as in the “Quick Guides”', async t => {
124-
const tutorialsContent = [
125-
'Working with JSON',
126-
'Vector Similarity Search',
127-
'Redis for time series',
128-
'Probabilistic data structures'
129-
];
130-
const command = 'HSET bikes:10000 ';
131-
132-
// Verify the redis stack links
133-
await workbenchPage.InsightsPanel.togglePanel(true);
134-
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
135-
await t.click(tutorials.redisStackTutorialsButton);
136-
const linksCount = await tutorials.redisStackLinks.count;
137-
for (let i = 0; i < linksCount; i++) {
138-
await t.expect(tutorials.redisStackLinks.nth(i).textContent).eql(tutorialsContent[i], `The link ${tutorialsContent[i]} is in the Enablement area`);
139-
}
140-
// Verify the load script to Editor
141-
await t.click(tutorials.vectorSimilitaritySearchButton);
142-
// Verify that user can see the pagination for redis stack pages in Tutorials
143-
await t.expect(tutorials.enablementAreaPagination.visible).ok('The user can not see the pagination for redis stack pages');
144-
await t.expect(tutorials.nextPageButton.visible).ok('The user can not see the next page for redis stack pages');
145-
await t.expect(tutorials.prevPageButton.visible).ok('The user can not see the prev page for redis stack pages');
146-
147-
await t.expect(workbenchPage.queryInputScriptArea.textContent).eql('', 'The editor is not empty');
148-
});

tests/e2e/tests/web/regression/workbench/redis-stack-commands.e2e.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ test('Verify that user can switches between Chart and Text for TimeSeries comman
2929
// Send TimeSeries command
3030
await workbenchPage.InsightsPanel.togglePanel(true);
3131
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
32-
await t.click(tutorials.redisStackTutorialsButton);
32+
await t.click(tutorials.dataStructureAccordionTutorialButton);
3333
await t.click(tutorials.timeSeriesLink);
34-
await tutorials.runBlockCode('Show all sales per region');
34+
await t.click(tutorials.internalTimeSeriesLink);
35+
await tutorials.runBlockCode('Get all samples');
3536
await t.click(workbenchPage.submitCommandButton);
3637
// Check result is in chart view
3738
await t.expect(workbenchPage.chartViewTypeOptionSelected.exists).ok('The chart view option is not selected by default');

tests/e2e/tests/web/regression/workbench/scripting-area.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ test
8585
// Open Working with Hashes page
8686
await workbenchPage.InsightsPanel.togglePanel(true);
8787
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
88-
await t.click(tutorials.documentButtonInQuickGuides);
88+
await t.click(tutorials.dataStructureAccordionTutorialButton);
8989
await t.expect(tutorials.internalLinkWorkingWithHashes.visible).ok('The working with hashes link is not visible', { timeout: 5000 });
9090
await t.click(tutorials.internalLinkWorkingWithHashes);
9191
// Put Create Hash commands into Editing area
92-
const codeText = await tutorials.getBlockCode('Create');
92+
const codeText = await tutorials.getBlockCode('Create a hash');
9393
const regex = new RegExp('HSET', 'g');
9494
const monacoCommandIndicatorCount = codeText.match(regex).length;
95-
await tutorials.runBlockCode('Create');
95+
await tutorials.runBlockCode('Create a hash');
9696
//Get number of commands in scripting area
9797
const numberOfCommands = await workbenchPage.executedCommandTitle.withText('HSET').count;
9898
//Compare number of indicator displayed and expected value

0 commit comments

Comments
 (0)