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
3 changes: 3 additions & 0 deletions tests/e2e/pageObjects/components/keys-interaction-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export class KeysInteractionPanel {
* Click on Panel tab
* @param type of the tab
*/
async setActiveTab(type: KeysInteractionTabs.BrowserAndFilter): Promise<BrowserPage>
async setActiveTab(type: KeysInteractionTabs.SearchAndQuery): Promise<SearchAndQueryPage>
async setActiveTab(type: KeysInteractionTabs.Workbench): Promise<WorkbenchPage>
async setActiveTab(type: KeysInteractionTabs): Promise<BrowserPage | WorkbenchPage | SearchAndQueryPage> {
const activeTabName = await this.getActiveTabName();

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/pageObjects/workbench-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class WorkbenchPage extends InstancePage {
copyCommand = Selector('[data-testid=copy-command]');
clearResultsBtn = Selector('[data-testid=clear-history-btn]');
exploreRedisBtn = Selector('[data-testid=no-results-explore-btn]');
basicUseCaseTutorialsButton = Selector('[data-testid=wb-tutorials-link_redis_use_cases_basic]');
//ICONS
noCommandHistoryIcon = Selector('[data-testid=wb_no-results__icon]');
parametersAnchor = Selector('[data-testid=parameters-anchor]');
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/web/critical-path/rdi/navigation.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ test('Verify that Insight and Sign in buttons are displayed ', async() => {
await t.expect(rdiInstancePage.RdiHeader.InsightsPanel.getInsightsPanel().exists).ok('Insight panel is not exist');
await rdiInstancePage.RdiHeader.InsightsPanel.togglePanel(true);
const tab = await rdiInstancePage.RdiHeader.InsightsPanel.getActiveTabName();
await t.expect(tab).eql('Explore');
await t.expect(tab).eql('Tutorials');
await t.expect(rdiInstancePage.RdiHeader.cloudSignInButton.exists).ok('sight in button is not exist');
});

Expand Down
27 changes: 27 additions & 0 deletions tests/e2e/tests/web/regression/workbench/workbench-tab.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ExploreTabs, KeysInteractionTabs, rte } from '../../../../helpers/constants';
import { DatabaseHelper } from '../../../../helpers/database';
import { BrowserPage } from '../../../../pageObjects';
import { commonUrl, ossStandaloneConfig } from '../../../../helpers/conf';
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';

const databaseHelper = new DatabaseHelper();
const databaseAPIRequests = new DatabaseAPIRequests();
const browserPage = new BrowserPage();

fixture `Autocomplete for entered commands`
.meta({ type: 'regression', rte: rte.standalone })
.page(commonUrl)
.beforeEach(async t => {
await databaseHelper.acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfig);
})
.afterEach(async() => {
// Delete database
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneConfig);
});
test('Verify that tutorials can be opened from Workbench', async t => {
const workbench = await browserPage.KeysInteractionPanel.setActiveTab(KeysInteractionTabs.Workbench);
await t.click(workbench.basicUseCaseTutorialsButton);
await t.expect(workbench.InsightsPanel.sidePanel.exists).ok('Insight panel is not opened');
const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
await t.expect(tab.preselectArea.textContent).contains('BASIC REDIS USE CASES', 'the tutorial page is incorrect');
});