Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/e2e/pageObjects/browser-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export class BrowserPage extends InstancePage {
internalLinkToWorkbench = Selector('[data-testid=internal-workbench-link]');
userSurveyLink = Selector('[data-testid=user-survey-link]');
redisearchFreeLink = Selector('[data-testid=get-started-link]');
guideLinksBtn = Selector('[data-testid^=guide-button-]');
//OPTION ELEMENTS
stringOption = Selector('#string');
jsonOption = Selector('#ReJSON-RL');
Expand Down Expand Up @@ -963,6 +964,15 @@ export class BrowserPage extends InstancePage {
async clearFilter(): Promise<void> {
await t.click(this.clearFilterButton);
}

/**
* Open Guide link by name
* @param guide The guide name
*/
async clickGuideLinksByName(guide: string): Promise<void> {
const linkGuide = Selector(`[data-testid^="guide-button-"]`).withExactText(guide);
await t.click(linkGuide);
}
}

/**
Expand Down
35 changes: 33 additions & 2 deletions tests/e2e/tests/web/regression/tree-view/tree-view.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import { DatabaseHelper } from '../../../../helpers/database';
import { BrowserPage } from '../../../../pageObjects';
import { BrowserPage, WorkbenchPage } from '../../../../pageObjects';
import {
commonUrl,
ossStandaloneBigConfig,
ossStandaloneConfig,
ossStandaloneConfigEmpty,
ossStandaloneRedisearch, ossStandaloneRedisGears
} from '../../../../helpers/conf';
import { KeyTypesTexts, rte } from '../../../../helpers/constants';
import { ExploreTabs, KeyTypesTexts, rte } from '../../../../helpers/constants';
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
import { APIKeyRequests } from '../../../../helpers/api/api-keys';
import { Common } from '../../../../helpers/common';
import { verifyKeysDisplayingInTheList } from '../../../../helpers/keys';

const browserPage = new BrowserPage();
const workbenchPage = new WorkbenchPage();
const databaseHelper = new DatabaseHelper();
const databaseAPIRequests = new DatabaseAPIRequests();
const apiKeyRequests = new APIKeyRequests();
Expand Down Expand Up @@ -41,6 +42,36 @@ test
const message = 'Let\'sstartworkingLoadsampledata+Addkeymanually';
const actualMessage = await browserPage.keyListMessage.innerText;
const cleanMessage = actualMessage.replace(/[\s\n]+/g, '');
const capabilities = [{
name: 'Search and Query',
tutorial: 'How To Query Your Data'
},
{
name: 'JSON',
tutorial: 'JSON'
},
{
name: 'Triggers and functions',
tutorial: 'Triggers And Functions Explained'
},
{
name: 'Time Series',
tutorial: 'Time Series'
},
{
name: 'Probabilistic',
tutorial: 'Probabilistic'
}];

await t.expect(browserPage.guideLinksBtn.count).gte(5);
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);
await t.expect(tutorials.closeEnablementPage.textContent)
.contains(capability.tutorial, `${capability.tutorial} tutorial not opened from No Keys page`);
await t.click(browserPage.InsightsPanel.closeButton);
}

// Verify the message
await t.click(browserPage.treeViewButton);
Expand Down