diff --git a/tests/e2e/helpers/constants.ts b/tests/e2e/helpers/constants.ts index bb5349fc52..e74c399e3e 100644 --- a/tests/e2e/helpers/constants.ts +++ b/tests/e2e/helpers/constants.ts @@ -77,7 +77,7 @@ export enum ResourcePath { } export enum ExploreTabs { - Explore = 'Explore', + Tutorials = 'Tutorials', Tips = 'Tips', } diff --git a/tests/e2e/pageObjects/components/explore-tab.ts b/tests/e2e/pageObjects/components/explore-tab.ts index c0b836bbab..ab41b8305c 100644 --- a/tests/e2e/pageObjects/components/explore-tab.ts +++ b/tests/e2e/pageObjects/components/explore-tab.ts @@ -38,6 +38,7 @@ export class ExploreTab { uploadDataBulkBtn = Selector('[data-testid=upload-data-bulk-btn]'); uploadDataBulkApplyBtn = Selector('[data-testid=upload-data-bulk-apply-btn]'); downloadFileBtn = Selector('[data-testid=download-redis-upload-file]'); + tutorialLink = Selector('[data-testid=redisinsight-link]'); //CSS cssTutorialDeleteIcon = '[data-testid^=delete-tutorial-icon-]'; diff --git a/tests/e2e/pageObjects/components/insights-panel.ts b/tests/e2e/pageObjects/components/insights-panel.ts index 59866bdb45..0460d3f8fb 100644 --- a/tests/e2e/pageObjects/components/insights-panel.ts +++ b/tests/e2e/pageObjects/components/insights-panel.ts @@ -37,11 +37,11 @@ export class InsightsPanel { * Click on Panel tab * @param type of the tab */ - async setActiveTab(type: ExploreTabs.Explore): Promise + async setActiveTab(type: ExploreTabs.Tutorials): Promise async setActiveTab(type: ExploreTabs.Tips): Promise async setActiveTab(type: ExploreTabs): Promise { const activeTabName = await this.getActiveTabName(); - if(type === ExploreTabs.Explore) { + if(type === ExploreTabs.Tutorials) { if(type !== activeTabName) { await t.click(this.exploreTab); } diff --git a/tests/e2e/pageObjects/memory-efficiency-page.ts b/tests/e2e/pageObjects/memory-efficiency-page.ts index 322efc8788..08233ecbe2 100644 --- a/tests/e2e/pageObjects/memory-efficiency-page.ts +++ b/tests/e2e/pageObjects/memory-efficiency-page.ts @@ -21,6 +21,10 @@ export class MemoryEfficiencyPage extends InstancePage { selectedReport = Selector('[data-testid=select-report]'); sortByLength = Selector('[data-testid=btn-change-table-keys]'); recommendationsTab = Selector('[data-testid=Recommendations-tab]'); + veryUsefulVoteBtn = Selector('[data-testid=very-useful-vote-btn]').nth(0); + usefulVoteBtn = Selector('[data-testid=useful-vote-btn]').nth(0); + notUsefulVoteBtn = Selector('[data-testid=not-useful-vote-btn]').nth(0); + recommendationsFeedbackBtn = Selector('[data-testid=recommendation-feedback-btn]'); // ICONS reportTooltipIcon = Selector('[data-testid=db-new-reports-icon]'); // TEXT ELEMENTS @@ -56,10 +60,7 @@ export class MemoryEfficiencyPage extends InstancePage { readMoreLink = Selector('[data-testid=read-more-link]'); workbenchLink = Selector('[data-test-subj=workbench-page-btn]'); // CONTAINERS - veryUsefulVoteBtn = Selector('[data-testid=very-useful-vote-btn]').nth(0); - usefulVoteBtn = Selector('[data-testid=useful-vote-btn]').nth(0); - notUsefulVoteBtn = Selector('[data-testid=not-useful-vote-btn]').nth(0); - recommendationsFeedbackBtn = Selector('[data-testid=recommendation-feedback-btn]'); + analysisPage = Selector('[data-testid=database-analysis-page]'); /** * Get recommendation selector by name diff --git a/tests/e2e/test-data/upload-tutorials/customTutorials/folder-2/vector-2.md b/tests/e2e/test-data/upload-tutorials/customTutorials/folder-2/vector-2.md index eb64bd0b91..8ffcb6520e 100644 --- a/tests/e2e/test-data/upload-tutorials/customTutorials/folder-2/vector-2.md +++ b/tests/e2e/test-data/upload-tutorials/customTutorials/folder-2/vector-2.md @@ -1 +1,13 @@ -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. \ No newline at end of file +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. + +[linkTheSamePage](redisinsight:_?tutorialId=ds-json-create) + +[link2AnalyticsPageWithTutorial](redisinsight:analytics/database-analysis?tutorialId=ds-json-intro) + +[link3InvalidPage](redisinsight:invalidPage?tutorialId=ds-json-intro) + +[link4InvalidTutorial](redisinsight:invalidPage?tutorialId=invalid-tutorial) + +[link5JustAnalyticsPage](redisinsight:analytics/database-analysis) + +[link6JustTheSamePage](redisinsight:_) diff --git a/tests/e2e/tests/electron/critical-path/files-auto-update/enablement-area-autoupdate.e2e.ts b/tests/e2e/tests/electron/critical-path/files-auto-update/enablement-area-autoupdate.e2e.ts index ec9b52c846..c12367a191 100644 --- a/tests/e2e/tests/electron/critical-path/files-auto-update/enablement-area-autoupdate.e2e.ts +++ b/tests/e2e/tests/electron/critical-path/files-auto-update/enablement-area-autoupdate.e2e.ts @@ -50,7 +50,7 @@ if (fs.existsSync(workingDirectory)) { // Check Enablement area and validate that removed file is existed in Guides await workbenchPage.InsightsPanel.togglePanel(true); - const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tab.guidesGraphAccordion); await t.click(tab.guidesIntroductionGraphLink.nth(1)); await t.expect(tab.enablementAreaEmptyContent.visible).notOk('Guides folder is not updated'); diff --git a/tests/e2e/tests/electron/regression/workbench/redis-stack-commands.e2e.ts b/tests/e2e/tests/electron/regression/workbench/redis-stack-commands.e2e.ts index 19abe6fce8..3215ef5ce7 100644 --- a/tests/e2e/tests/electron/regression/workbench/redis-stack-commands.e2e.ts +++ b/tests/e2e/tests/electron/regression/workbench/redis-stack-commands.e2e.ts @@ -29,7 +29,7 @@ fixture `Redis Stack command in Workbench` test.skip('Verify that user can switches between Graph and Text for GRAPH command and see results corresponding to their views', async t => { // Send Graph command await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.redisStackTutorialsButton); await t.click(tutorials.tutorialsWorkingWithGraphLink); 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 test.skip('Verify that user can see "No data to visualize" message for Graph command', async t => { // Send Graph command await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.redisStackTutorialsButton); await tutorials.runBlockCode('Show all sales per region'); await t.click(workbenchPage.submitCommandButton); diff --git a/tests/e2e/tests/web/critical-path/cluster-details/cluster-details.e2e.ts b/tests/e2e/tests/web/critical-path/cluster-details/cluster-details.e2e.ts index b368962b35..d5b1d337bb 100644 --- a/tests/e2e/tests/web/critical-path/cluster-details/cluster-details.e2e.ts +++ b/tests/e2e/tests/web/critical-path/cluster-details/cluster-details.e2e.ts @@ -76,7 +76,7 @@ test } //Run Create hash index command to load network and memory await clusterDetailsPage.InsightsPanel.togglePanel(true); - const tutorials = await clusterDetailsPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await clusterDetailsPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.click(tutorials.internalLinkWorkingWithHashes); diff --git a/tests/e2e/tests/web/critical-path/database-overview/database-overview.e2e.ts b/tests/e2e/tests/web/critical-path/database-overview/database-overview.e2e.ts index 1e462bf9dd..83a7e96d00 100644 --- a/tests/e2e/tests/web/critical-path/database-overview/database-overview.e2e.ts +++ b/tests/e2e/tests/web/critical-path/database-overview/database-overview.e2e.ts @@ -158,7 +158,7 @@ test await t.expect(browserPage.OverviewPanel.overviewCpu.exists).ok('CPU (%) is dispalyed in the Overview'); //Run Create hash index command await browserPage.InsightsPanel.togglePanel(true); - const tutorials = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.click(tutorials.internalLinkWorkingWithHashes); await tutorials.runBlockCode('Create a hash'); diff --git a/tests/e2e/tests/web/critical-path/memory-efficiency/recommendations.e2e.ts b/tests/e2e/tests/web/critical-path/memory-efficiency/recommendations.e2e.ts index cbf00b3ad5..8128025dc9 100644 --- a/tests/e2e/tests/web/critical-path/memory-efficiency/recommendations.e2e.ts +++ b/tests/e2e/tests/web/critical-path/memory-efficiency/recommendations.e2e.ts @@ -190,8 +190,8 @@ test.skip // Verify that tutorial opened await t.click(memoryEfficiencyPage.getToTutorialBtnByRecomName(searchJsonRecommendation)); await workbenchPage.InsightsPanel.togglePanel(true); - await t.expect(await workbenchPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Explore); - const tutorial = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + await t.expect(await workbenchPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Tutorials); + const tutorial = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.expect(tutorial.preselectArea.visible).ok('Workbench Enablement area not opened'); // Verify that REDIS FOR TIME SERIES tutorial expanded await t.expect(tutorial.getTutorialByName('INTRODUCTION').visible).ok('INTRODUCTION tutorial is not expanded'); diff --git a/tests/e2e/tests/web/critical-path/url-handling/url-handling.e2e.ts b/tests/e2e/tests/web/critical-path/url-handling/url-handling.e2e.ts index e8670c6a7d..a898f7d876 100644 --- a/tests/e2e/tests/web/critical-path/url-handling/url-handling.e2e.ts +++ b/tests/e2e/tests/web/critical-path/url-handling/url-handling.e2e.ts @@ -80,7 +80,7 @@ test await t.navigateTo(generateLink(connectUrlParams)); await t.wait(10_000); await t.expect(workbenchPage.submitCommandButton.exists).ok('Redirection to Workbench is not correct'); - const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tab = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.expect(tab.preselectArea.textContent).contains('INTRODUCTION', 'the tutorial page is incorrect'); await t.expect(tab.preselectArea.textContent).contains('JSON', 'the tutorial is incorrect'); diff --git a/tests/e2e/tests/web/critical-path/workbench/default-scripts-area.e2e.ts b/tests/e2e/tests/web/critical-path/workbench/default-scripts-area.e2e.ts index dfa16ff7ad..1791ce82c4 100644 --- a/tests/e2e/tests/web/critical-path/workbench/default-scripts-area.e2e.ts +++ b/tests/e2e/tests/web/critical-path/workbench/default-scripts-area.e2e.ts @@ -53,7 +53,7 @@ test await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n')); // Run automatically added "FT._LIST" and "FT.INFO {index}" scripts await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.click(tutorials.internalLinkWorkingWithHashes); diff --git a/tests/e2e/tests/web/regression/insights/import-tutorials.e2e.ts b/tests/e2e/tests/web/regression/insights/import-tutorials.e2e.ts index 9afdc700ab..20fce1a9cd 100644 --- a/tests/e2e/tests/web/regression/insights/import-tutorials.e2e.ts +++ b/tests/e2e/tests/web/regression/insights/import-tutorials.e2e.ts @@ -4,7 +4,7 @@ import { join as joinPath } from 'path'; import { t } from 'testcafe'; import { ExploreTabs, rte } from '../../../../helpers/constants'; import { DatabaseHelper } from '../../../../helpers/database'; -import { BrowserPage, MyRedisDatabasePage, WorkbenchPage } from '../../../../pageObjects'; +import { BrowserPage, MemoryEfficiencyPage, MyRedisDatabasePage, WorkbenchPage } from '../../../../pageObjects'; import { commonUrl, ossStandaloneConfig, ossStandaloneRedisearch, fileDownloadPath } from '../../../../helpers/conf'; import { DatabaseAPIRequests } from '../../../../helpers/api/api-database'; import { Common } from '../../../../helpers/common'; @@ -17,6 +17,7 @@ const browserPage = new BrowserPage(); const databaseHelper = new DatabaseHelper(); const databaseAPIRequests = new DatabaseAPIRequests(); const databasesActions = new DatabasesActions(); +const memoryEfficiencyPage = new MemoryEfficiencyPage(); const zipFolderName = 'customTutorials'; const folderPath = path.join('..', 'test-data', 'upload-tutorials', zipFolderName); @@ -68,7 +69,7 @@ test // Verify that user can see the “MY TUTORIALS” section in the Enablement area. await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.expect(tutorials.customTutorials.visible).ok('custom tutorials sections is not visible'); await t.click(tutorials.tutorialOpenUploadButton); @@ -123,7 +124,7 @@ test test.skip .after(async() => { tutorialName = 'Tutorials with manifest'; - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); if(await tutorials.tutorialAccordionButton.withText(tutorialName).exists) { await tutorials.deleteTutorialByName(tutorialName); } @@ -136,7 +137,7 @@ test.skip const summary = 'Summary for JSON'; await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.tutorialOpenUploadButton); // Verify that user can upload tutorials using a URL await t.typeText(tutorials.tutorialLinkField, link); @@ -180,7 +181,7 @@ test // Clear and delete database await t.click(myRedisDatabasePage.NavigationPanel.workbenchButton); await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await tutorials.deleteTutorialByName(tutorialName); await t.expect(tutorials.tutorialAccordionButton.withText(tutorialName).exists) .notOk(`${tutorialName} tutorial is not deleted`); @@ -195,7 +196,7 @@ test // Upload custom tutorial await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t .click(tutorials.tutorialOpenUploadButton) .setFilesToUpload(tutorials.tutorialImport, [zipFilePath]) @@ -242,4 +243,65 @@ test await browserPage.searchByKeyName('*key1*'); await verifyKeysDisplayingInTheList(keyNames, true); }); +test + .before(async() => { + await databaseHelper.acceptLicenseTerms(); + await databaseAPIRequests.addNewStandaloneDatabaseApi( + ossStandaloneRedisearch + ); + await myRedisDatabasePage.reloadPage(); + tutorialName = `${zipFolderName}${Common.generateWord(5)}`; + zipFilePath = path.join('..', 'test-data', 'upload-tutorials', `${tutorialName}.zip`); + // Create zip file for uploading + await Common.createZipFromFolder(folderPath, zipFilePath); + }) + .after(async() => { + await Common.deleteFileFromFolder(zipFilePath); + // Clear and delete database + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); + await tutorials.deleteTutorialByName(tutorialName); + await t.expect(tutorials.tutorialAccordionButton.withText(tutorialName).exists) + .notOk(`${tutorialName} tutorial is not deleted`); + await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneRedisearch); + })('Verify that user can open tutorial from links in other tutorials', async t => { + // Upload custom tutorial + await workbenchPage.InsightsPanel.togglePanel(true); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); + await t + .click(tutorials.tutorialOpenUploadButton) + .setFilesToUpload(tutorials.tutorialImport, [zipFilePath]) + .click(tutorials.tutorialSubmitButton); + await t.expect(tutorials.tutorialAccordionButton.withText(tutorialName).visible).ok(`${tutorialName} tutorial is not uploaded`); + // Open tutorial + await t + .click(tutorials.tutorialAccordionButton.withText(tutorialName)) + .click(tutorials.getAccordionButtonWithName(folder2)) + .click(tutorials.getInternalLinkWithManifest(internalLinkName2)); + await t.expect(tutorials.scrolledEnablementArea.visible).ok('Enablement area is not visible after clicked'); + + // Verify that user do not see the standard popover when open a tutorial page via the link + await t.click(tutorials.tutorialLink.withText('linkTheSamePage')); + await t.expect(tutorials.getTutorialByName('CREATE DOCUMENTS').exists).ok('Tutorial not opened by link'); + + // Verify that user can see a standard popover to open a database when clicking a link where page is inside of the database which is not opened + await t.click(tutorials.closeEnablementPage); + await t.click(tutorials.getInternalLinkWithManifest(internalLinkName2)); + await t.click(tutorials.tutorialLink.withText('link2AnalyticsPageWithTutorial')); + await t.expect(tutorials.openDatabasePopover.exists).ok('Open a database popover is not displayed'); + // Verify that user not redirected anywhere and do not see an error when clicking on the broken link + await t.click(tutorials.tutorialLink.withText('link3InvalidPage')); + await t.expect(tutorials.getTutorialByName('VECTOR 2').exists).ok('Tutorial page is changed'); + // await t.expect(tutorials.openDatabasePopover.exists).notOk('Open a database popover is still displayed'); + await t.click(tutorials.tutorialLink.withText('link4InvalidTutorial')); + await t.expect(tutorials.getTutorialByName('VECTOR 2').exists).ok('Tutorial page is changed'); + // await t.expect(tutorials.openDatabasePopover.exists).notOk('Open a database popover is still displayed'); + + // Open existing database + await myRedisDatabasePage.clickOnDBByName(ossStandaloneRedisearch.databaseName); + + // Verify that user can use '[link](redisinsight:_?tutorialId={tutorialId})' syntax to cross-reference tutorials + await t.click(tutorials.tutorialLink.withText('link2AnalyticsPageWithTutorial')); + await t.expect(tutorials.getTutorialByName('INTRODUCTION').exists).ok('Tutorial not opened by link'); + await t.expect(memoryEfficiencyPage.analysisPage.visible).ok('Analysis page is not opened by link'); + }); diff --git a/tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts b/tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts index c73f65e503..bc14e55c69 100644 --- a/tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts +++ b/tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts @@ -110,7 +110,7 @@ test // Verify that user can see the live recommendation "Optimize the use of time series" await t.expect(await tab.getRecommendationByName(redisTimeSeriesRecom).visible).ok('Optimize Time Series recommendation not displayed'); await tab.clickOnTutorialLink(redisTimeSeriesRecom); - const tabTutorial = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tabTutorial = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.expect(tabTutorial.preselectArea.textContent).contains('INTRODUCTION', 'the tutorial page is incorrect'); await t.expect(tabTutorial.preselectArea.textContent).contains('Time Series', 'the tutorial is incorrect'); }); diff --git a/tests/e2e/tests/web/regression/insights/open-insights-panel.e2e.ts b/tests/e2e/tests/web/regression/insights/open-insights-panel.e2e.ts index cc2a1e5ceb..4ad4fb02fb 100644 --- a/tests/e2e/tests/web/regression/insights/open-insights-panel.e2e.ts +++ b/tests/e2e/tests/web/regression/insights/open-insights-panel.e2e.ts @@ -43,7 +43,7 @@ test await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName); await t.expect(browserPage.InsightsPanel.sidePanel.exists).ok('Insights panel is not opened'); await t.expect(await browserPage.InsightsPanel.existsCompatibilityPopover.textContent).contains('Search and query capability', 'popover is not displayed'); - const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.expect(tab.preselectArea.textContent).contains('How To Query Your Data', 'the tutorial is incorrect'); await t.click(browserPage.NavigationPanel.myRedisDBButton); @@ -71,8 +71,8 @@ test await t.click(browserPage.NavigationPanel.myRedisDBButton); await myRedisDatabasePage.CompatibilityPromotion.clickOnLinkByName(Compatibility.SearchAndQuery); - await t.expect(await myRedisDatabasePage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Explore); - let tab = await myRedisDatabasePage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + await t.expect(await myRedisDatabasePage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Tutorials); + let tab = await myRedisDatabasePage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.expect(tab.preselectArea.textContent).contains(myRedisTutorial, 'the tutorial is incorrect'); await t.click(tab.nextPageButton); await tab.runBlockCode('Create the bike shop idx:bicycle'); @@ -81,18 +81,18 @@ test await myRedisDatabasePage.deleteAllDatabases(); await welcomePage.CompatibilityPromotion.clickOnLinkByName(Compatibility.Json); - await t.expect(await welcomePage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Explore); - tab = await welcomePage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + await t.expect(await welcomePage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Tutorials); + tab = await welcomePage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.expect(tab.preselectArea.textContent).contains(welcomeTutorial, 'the tutorial is incorrect'); }); test('Verify that user can open Explore tab into Insights panel by clicking on Explore Redis button', async t => { await t.click(browserPage.NavigationPanel.myRedisDBButton); await t.click(browserPage.exploreRedisBtn); await t.expect(browserPage.InsightsPanel.sidePanel.exists).ok('Insights panel is not opened'); - await t.expect(await browserPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Explore); + await t.expect(await browserPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Tutorials); await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips); await browserPage.InsightsPanel.togglePanel(false); await t.click(browserPage.exploreRedisBtn); await t.expect(browserPage.InsightsPanel.sidePanel.exists).ok('Insights panel is not opened'); - await t.expect(await browserPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Explore); + await t.expect(await browserPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Tutorials); }); diff --git a/tests/e2e/tests/web/regression/tree-view/tree-view.e2e.ts b/tests/e2e/tests/web/regression/tree-view/tree-view.e2e.ts index 111d5b36ff..767a69ca66 100644 --- a/tests/e2e/tests/web/regression/tree-view/tree-view.e2e.ts +++ b/tests/e2e/tests/web/regression/tree-view/tree-view.e2e.ts @@ -66,7 +66,7 @@ test for (const capability of capabilities) { await browserPage.clickGuideLinksByName(capability.name); await t.expect(browserPage.InsightsPanel.sidePanel.exists).ok('Insights panel not opened'); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.expect(tutorials.closeEnablementPage.textContent) .contains(capability.tutorial, `${capability.tutorial} tutorial not opened from No Keys page`); await t.click(browserPage.InsightsPanel.closeButton); diff --git a/tests/e2e/tests/web/regression/workbench/autoexecute-button.e2e.ts b/tests/e2e/tests/web/regression/workbench/autoexecute-button.e2e.ts index 7ebc75d4c2..5eb4caf0f2 100644 --- a/tests/e2e/tests/web/regression/workbench/autoexecute-button.e2e.ts +++ b/tests/e2e/tests/web/regression/workbench/autoexecute-button.e2e.ts @@ -27,7 +27,7 @@ test.skip('Verify that when user clicks on auto-execute button, command is run', await t.typeText(workbenchPage.queryInput, command, { replace: true, paste: true }); // Verify that admin can use redis-auto format in .md file for Guides for auto-executed button await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.click(tutorials.internalLinkWorkingWithHashes); await tutorials.runBlockCode('Create'); diff --git a/tests/e2e/tests/web/regression/workbench/context.e2e.ts b/tests/e2e/tests/web/regression/workbench/context.e2e.ts index cb9f55d18c..1cd55c5188 100644 --- a/tests/e2e/tests/web/regression/workbench/context.e2e.ts +++ b/tests/e2e/tests/web/regression/workbench/context.e2e.ts @@ -66,7 +66,7 @@ test('Verify that user can see all the information removed when reloads the page test('Verify that user can see saved state of the Enablement area when navigates back to the Workbench from other page', async t => { // Collapse the Enablement area and open Settings await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await workbenchPage.InsightsPanel.togglePanel(false); await t.expect(tutorials.preselectArea.exists).notOk('the panel is not closed'); await workbenchPage.InsightsPanel.togglePanel(true); diff --git a/tests/e2e/tests/web/regression/workbench/default-scripts-area.e2e.ts b/tests/e2e/tests/web/regression/workbench/default-scripts-area.e2e.ts index 591c6207b9..e50b21b09a 100644 --- a/tests/e2e/tests/web/regression/workbench/default-scripts-area.e2e.ts +++ b/tests/e2e/tests/web/regression/workbench/default-scripts-area.e2e.ts @@ -45,7 +45,7 @@ test('Verify that user can see the [Manual] option in the Enablement area', asyn test('Verify that user can see saved article in Enablement area when he leaves Workbench page and goes back again', async t => { const tooltipText = 'Open Workbench in the left menu to see the command results.'; await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.expect(tutorials.internalLinkWorkingWithHashes.visible).ok('The working with hashes link is not visible', { timeout: 5000 }); // Open Working with Hashes section @@ -86,7 +86,7 @@ test('Verify that user can see saved article in Enablement area when he leaves W test.skip('Verify that user can see saved scroll position in Enablement area when he leaves Workbench page and goes back again', async t => { // Open Working with Hashes section await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.click(tutorials.internalLinkWorkingWithHashes); // Evaluate the last button in Enablement Area @@ -120,7 +120,7 @@ test('Verify that user can see the siblings menu by clicking on page counter ele // Open Working with Hashes section and click on the on page counter await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.expect(tutorials.internalLinkWorkingWithHashes.visible).ok('The working with hachs link is not visible', { timeout: 5000 }); await t.click(tutorials.internalLinkWorkingWithHashes); diff --git a/tests/e2e/tests/web/regression/workbench/redis-stack-commands.e2e.ts b/tests/e2e/tests/web/regression/workbench/redis-stack-commands.e2e.ts index d0e9e390bc..218411f615 100644 --- a/tests/e2e/tests/web/regression/workbench/redis-stack-commands.e2e.ts +++ b/tests/e2e/tests/web/regression/workbench/redis-stack-commands.e2e.ts @@ -28,7 +28,7 @@ fixture `Redis Stack command in Workbench` test('Verify that user can switches between Chart and Text for TimeSeries command and see results corresponding to their views', async t => { // Send TimeSeries command await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.click(tutorials.timeSeriesLink); await t.click(tutorials.internalTimeSeriesLink); diff --git a/tests/e2e/tests/web/regression/workbench/redisearch-module-not-available.e2e.ts b/tests/e2e/tests/web/regression/workbench/redisearch-module-not-available.e2e.ts index 6d0bb1514f..bc169dceb0 100644 --- a/tests/e2e/tests/web/regression/workbench/redisearch-module-not-available.e2e.ts +++ b/tests/e2e/tests/web/regression/workbench/redisearch-module-not-available.e2e.ts @@ -51,7 +51,7 @@ test('Verify that user can see options on what can be done to work with capabili // Verify change screens when capability not available - 'Search' await t.expect(await workbenchPage.commandExecutionResult.withText('RediSearch is not available').visible) .ok('Missing RedisSearch title is not visible'); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.triggersFunctionsAccordionTutorialButton); await t.click(tutorials.internalTriggersAndFunctionsLink); await tutorials.runBlockCode('Upload library'); diff --git a/tests/e2e/tests/web/regression/workbench/scripting-area.e2e.ts b/tests/e2e/tests/web/regression/workbench/scripting-area.e2e.ts index ed5967db24..424924e36f 100644 --- a/tests/e2e/tests/web/regression/workbench/scripting-area.e2e.ts +++ b/tests/e2e/tests/web/regression/workbench/scripting-area.e2e.ts @@ -84,7 +84,7 @@ test })('Verify that user can see an indication (green triangle) of commands from the left side of the line numbers', async t => { // Open Working with Hashes page await workbenchPage.InsightsPanel.togglePanel(true); - const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore); + const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials); await t.click(tutorials.dataStructureAccordionTutorialButton); await t.expect(tutorials.internalLinkWorkingWithHashes.visible).ok('The working with hashes link is not visible', { timeout: 5000 }); await t.click(tutorials.internalLinkWorkingWithHashes);