Skip to content

Commit 21c327b

Browse files
committed
e2e/feature/RI-5763_open_tutorials_from_other_tutorials
1 parent 2b58f49 commit 21c327b

File tree

22 files changed

+116
-40
lines changed

22 files changed

+116
-40
lines changed

tests/e2e/helpers/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export enum ResourcePath {
7777
}
7878

7979
export enum ExploreTabs {
80-
Explore = 'Explore',
80+
Tutorials = 'Tutorials',
8181
Tips = 'Tips',
8282
}
8383

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class ExploreTab {
3838
uploadDataBulkBtn = Selector('[data-testid=upload-data-bulk-btn]');
3939
uploadDataBulkApplyBtn = Selector('[data-testid=upload-data-bulk-apply-btn]');
4040
downloadFileBtn = Selector('[data-testid=download-redis-upload-file]');
41+
tutorialLink = Selector('[data-testid=redisinsight-link]');
4142

4243
//CSS
4344
cssTutorialDeleteIcon = '[data-testid^=delete-tutorial-icon-]';

tests/e2e/pageObjects/components/insights-panel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ export class InsightsPanel {
3737
* Click on Panel tab
3838
* @param type of the tab
3939
*/
40-
async setActiveTab(type: ExploreTabs.Explore): Promise<ExploreTab>
40+
async setActiveTab(type: ExploreTabs.Tutorials): Promise<ExploreTab>
4141
async setActiveTab(type: ExploreTabs.Tips): Promise<RecommendationsTab>
4242
async setActiveTab(type: ExploreTabs): Promise<ExploreTab | RecommendationsTab> {
4343
const activeTabName = await this.getActiveTabName();
44-
if(type === ExploreTabs.Explore) {
44+
if(type === ExploreTabs.Tutorials) {
4545
if(type !== activeTabName) {
4646
await t.click(this.exploreTab);
4747
}

tests/e2e/pageObjects/memory-efficiency-page.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export class MemoryEfficiencyPage extends InstancePage {
2121
selectedReport = Selector('[data-testid=select-report]');
2222
sortByLength = Selector('[data-testid=btn-change-table-keys]');
2323
recommendationsTab = Selector('[data-testid=Recommendations-tab]');
24+
veryUsefulVoteBtn = Selector('[data-testid=very-useful-vote-btn]').nth(0);
25+
usefulVoteBtn = Selector('[data-testid=useful-vote-btn]').nth(0);
26+
notUsefulVoteBtn = Selector('[data-testid=not-useful-vote-btn]').nth(0);
27+
recommendationsFeedbackBtn = Selector('[data-testid=recommendation-feedback-btn]');
2428
// ICONS
2529
reportTooltipIcon = Selector('[data-testid=db-new-reports-icon]');
2630
// TEXT ELEMENTS
@@ -56,10 +60,7 @@ export class MemoryEfficiencyPage extends InstancePage {
5660
readMoreLink = Selector('[data-testid=read-more-link]');
5761
workbenchLink = Selector('[data-test-subj=workbench-page-btn]');
5862
// CONTAINERS
59-
veryUsefulVoteBtn = Selector('[data-testid=very-useful-vote-btn]').nth(0);
60-
usefulVoteBtn = Selector('[data-testid=useful-vote-btn]').nth(0);
61-
notUsefulVoteBtn = Selector('[data-testid=not-useful-vote-btn]').nth(0);
62-
recommendationsFeedbackBtn = Selector('[data-testid=recommendation-feedback-btn]');
63+
analysisPage = Selector('[data-testid=database-analysis-page]');
6364

6465
/**
6566
* Get recommendation selector by name
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
In very broad terms probabilistic data structures (PDS) allow us to get to a "close enough" result in a much shorter time and by using significantly less memory.
1+
In very broad terms probabilistic data structures (PDS) allow us to get to a "close enough" result in a much shorter time and by using significantly less memory.
2+
3+
[linkTheSamePage](redisinsight:_?tutorialId=ds-json-create)
4+
5+
[link2AnalyticsPageWithTutorial](redisinsight:analytics/database-analysis?tutorialId=ds-json-intro)
6+
7+
[link3InvalidPage](redisinsight:invalidPage?tutorialId=ds-json-intro)
8+
9+
[link4InvalidTutorial](redisinsight:invalidPage?tutorialId=invalid-tutorial)
10+
11+
[link5JustAnalyticsPage](redisinsight:analytics/database-analysis)
12+
13+
[link6JustTheSamePage](redisinsight:_)

tests/e2e/tests/electron/critical-path/files-auto-update/enablement-area-autoupdate.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if (fs.existsSync(workingDirectory)) {
5050

5151
// Check Enablement area and validate that removed file is existed in Guides
5252
await workbenchPage.InsightsPanel.togglePanel(true);
53-
const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
53+
const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
5454
await t.click(tab.guidesGraphAccordion);
5555
await t.click(tab.guidesIntroductionGraphLink.nth(1));
5656
await t.expect(tab.enablementAreaEmptyContent.visible).notOk('Guides folder is not updated');

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fixture `Redis Stack command in Workbench`
2929
test.skip('Verify that user can switches between Graph and Text for GRAPH command and see results corresponding to their views', async t => {
3030
// Send Graph command
3131
await workbenchPage.InsightsPanel.togglePanel(true);
32-
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
32+
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
3333
await t.click(tutorials.redisStackTutorialsButton);
3434
await t.click(tutorials.tutorialsWorkingWithGraphLink);
3535
await tutorials.runBlockCode('Create a bike node');
@@ -46,7 +46,7 @@ test.skip('Verify that user can switches between Graph and Text for GRAPH comman
4646
test.skip('Verify that user can see "No data to visualize" message for Graph command', async t => {
4747
// Send Graph command
4848
await workbenchPage.InsightsPanel.togglePanel(true);
49-
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
49+
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
5050
await t.click(tutorials.redisStackTutorialsButton);
5151
await tutorials.runBlockCode('Show all sales per region');
5252
await t.click(workbenchPage.submitCommandButton);

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
@@ -76,7 +76,7 @@ test
7676
}
7777
//Run Create hash index command to load network and memory
7878
await clusterDetailsPage.InsightsPanel.togglePanel(true);
79-
const tutorials = await clusterDetailsPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
79+
const tutorials = await clusterDetailsPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
8080

8181
await t.click(tutorials.dataStructureAccordionTutorialButton);
8282
await t.click(tutorials.internalLinkWorkingWithHashes);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ test
158158
await t.expect(browserPage.OverviewPanel.overviewCpu.exists).ok('CPU (%) is dispalyed in the Overview');
159159
//Run Create hash index command
160160
await browserPage.InsightsPanel.togglePanel(true);
161-
const tutorials = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
161+
const tutorials = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
162162
await t.click(tutorials.dataStructureAccordionTutorialButton);
163163
await t.click(tutorials.internalLinkWorkingWithHashes);
164164
await tutorials.runBlockCode('Create a hash');

tests/e2e/tests/web/critical-path/memory-efficiency/recommendations.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ test.skip
190190
// Verify that tutorial opened
191191
await t.click(memoryEfficiencyPage.getToTutorialBtnByRecomName(searchJsonRecommendation));
192192
await workbenchPage.InsightsPanel.togglePanel(true);
193-
await t.expect(await workbenchPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Explore);
194-
const tutorial = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
193+
await t.expect(await workbenchPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Tutorials);
194+
const tutorial = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
195195
await t.expect(tutorial.preselectArea.visible).ok('Workbench Enablement area not opened');
196196
// Verify that REDIS FOR TIME SERIES tutorial expanded
197197
await t.expect(tutorial.getTutorialByName('INTRODUCTION').visible).ok('INTRODUCTION tutorial is not expanded');

0 commit comments

Comments
 (0)