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
2 changes: 1 addition & 1 deletion tests/e2e/common-actions/onboard-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class OnboardActions {
complete onboarding process
*/
async verifyOnboardingCompleted(): Promise<void> {
await t.expect(onboardingPage.showMeAroundButton.visible).notOk('show me around button still visible');
await t.expect(onboardingPage.showMeAroundButton.exists).notOk('show me around button still visible');
await t.expect(browserPage.patternModeBtn.visible).ok('browser page is not opened');
}
/**
Expand Down
10 changes: 9 additions & 1 deletion tests/e2e/helpers/conf.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Chance } from 'chance';
import * as os from 'os';
import * as fs from 'fs';
import { join as joinPath } from 'path';
import { Chance } from 'chance';
const chance = new Chance();

// Urls for using in the tests
Expand All @@ -19,6 +19,14 @@ export const ossStandaloneConfig = {
databasePassword: process.env.OSS_STANDALONE_PASSWORD
};

export const ossStandaloneConfigEmpty = {
host: process.env.OSS_STANDALONE_HOST || 'oss-standalone-empty',
port: process.env.OSS_STANDALONE_PORT || '6379',
databaseName: `${process.env.OSS_STANDALONE_DATABASE_NAME || 'test_standalone_empty'}-${uniqueId}`,
databaseUsername: process.env.OSS_STANDALONE_USERNAME,
databasePassword: process.env.OSS_STANDALONE_PASSWORD
};

export const ossStandaloneV5Config = {
host: process.env.OSS_STANDALONE_V5_HOST || 'oss-standalone-v5',
port: process.env.OSS_STANDALONE_V5_PORT || '6379',
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/pageObjects/onboarding-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ export class OnboardingPage {
showMeAroundButton = Selector('span').withText('Show me around');
skipTourButton = Selector('[data-testid=skip-tour-btn]');
stepTitle = Selector('[data-testid=step-title]');
wbOnbardingCommand = Selector('[data-testid=wb-onboarding-command]');
copyCodeButton = Selector('[data-testid=copy-code-btn]');
}
12 changes: 12 additions & 0 deletions tests/e2e/rte.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ services:
ports:
- 8100:6379

oss-standalone-empty:
image: redislabs/redismod
command: [
"--loadmodule", "/usr/lib/redis/modules/redisearch.so",
"--loadmodule", "/usr/lib/redis/modules/redisgraph.so",
"--loadmodule", "/usr/lib/redis/modules/redistimeseries.so",
"--loadmodule", "/usr/lib/redis/modules/rejson.so",
"--loadmodule", "/usr/lib/redis/modules/redisbloom.so"
]
ports:
- 8105:6379

# oss standalone v5
oss-standalone-v5:
image: redis:5
Expand Down
30 changes: 25 additions & 5 deletions tests/e2e/tests/regression/browser/onboarding.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,46 @@ import {
acceptTermsAddDatabaseOrConnectToRedisStack, deleteDatabase
} from '../../../helpers/database';
import {
commonUrl, ossStandaloneConfig
commonUrl, ossStandaloneConfigEmpty
} from '../../../helpers/conf';
import { env, rte } from '../../../helpers/constants';
import {Common} from '../../../helpers/common';
import {OnboardActions} from '../../../common-actions/onboard-actions';
import {CliPage, MemoryEfficiencyPage, SlowLogPage, WorkbenchPage, PubSubPage, MonitorPage} from '../../../pageObjects';
import {
CliPage,
MemoryEfficiencyPage,
SlowLogPage,
WorkbenchPage,
PubSubPage,
MonitorPage,
OnboardingPage
} from '../../../pageObjects';

const common = new Common();
const onBoardActions = new OnboardActions();
const onboardingPage = new OnboardingPage();
const cliPage = new CliPage();
const memoryEfficiencyPage = new MemoryEfficiencyPage();
const workBenchPage = new WorkbenchPage();
const slowLogPage = new SlowLogPage();
const pubSubPage = new PubSubPage();
const monitorPage = new MonitorPage();
const setLocalStorageItem = ClientFunction((key: string, value: string) => window.localStorage.setItem(key, value));
const indexName = common.generateWord(10);

fixture `Onboarding new user tests`
.meta({type: 'regression', rte: rte.standalone })
.page(commonUrl)
.beforeEach(async() => {
await acceptTermsAddDatabaseOrConnectToRedisStack(ossStandaloneConfig, ossStandaloneConfig.databaseName);
await acceptTermsAddDatabaseOrConnectToRedisStack(ossStandaloneConfigEmpty, ossStandaloneConfigEmpty.databaseName);
await setLocalStorageItem('onboardingStep', '0');
await common.reloadPage();
})
.afterEach(async() => {
await deleteDatabase(ossStandaloneConfig.databaseName);
await cliPage.sendCommandInCli(`DEL ${indexName}`);
await deleteDatabase(ossStandaloneConfigEmpty.databaseName);
});
// https://redislabs.atlassian.net/browse/RI-4070, https://redislabs.atlassian.net/browse/RI-4067
test
.meta({ env: env.desktop })('Verify onbarding new user steps', async t => {
await onBoardActions.startOnboarding();
Expand All @@ -55,16 +67,23 @@ test
await t.expect(monitorPage.monitorArea.visible).ok('profiler is not expanded');
await onBoardActions.verifyStepVisible('Profiler');
await onBoardActions.clickNextStep();
// Verify that client list command visible when there is not any index created
await t.expect(onboardingPage.wbOnbardingCommand.withText('CLIENT LIST').visible).ok('CLIENT LIST command is not visible');
await t.expect(onboardingPage.copyCodeButton.visible).ok('copy code button is not visible');
// verify workbench page is opened
await t.expect(workBenchPage.mainEditorArea.visible).ok('workbench is not opened');
await onBoardActions.verifyStepVisible('Try Workbench!');
// click back step button
await onBoardActions.clickBackStep();
// create index in order to see in FT.INFO {index} in onboarding step
await cliPage.sendCommandInCli(`FT.CREATE ${indexName} ON HASH PREFIX 1 test SCHEMA "name" TEXT`);
// verify one step before is opened
await t.expect(monitorPage.monitorArea.visible).ok('profiler is not expanded');
await onBoardActions.verifyStepVisible('Profiler');
await onBoardActions.clickNextStep();
// verify workbench page is opened
await t.expect(onboardingPage.wbOnbardingCommand.withText(`FT.INFO ${indexName}`).visible).ok(`FT.INFO ${indexName} command is not visible`);
await t.expect(onboardingPage.copyCodeButton.visible).ok('copy code button is not visible');
await t.expect(workBenchPage.mainEditorArea.visible).ok('workbench is not opened');
await onBoardActions.verifyStepVisible('Try Workbench!');
await onBoardActions.clickNextStep();
Expand All @@ -75,7 +94,7 @@ test
await onBoardActions.verifyStepVisible('Database Analysis');
await onBoardActions.clickNextStep();
// verify slow log is opened
await t.expect(slowLogPage.slowLogTable.visible).ok('slow log is not opened');
await t.expect(slowLogPage.slowLogConfigureButton.visible).ok('slow log is not opened');
await onBoardActions.verifyStepVisible('Slow Log');
await onBoardActions.clickNextStep();
// verify pub/sub page is opened
Expand All @@ -88,6 +107,7 @@ test
// verify onboarding step completed successfully
await onBoardActions.verifyOnboardingCompleted();
});
// https://redislabs.atlassian.net/browse/RI-4067
test
.meta({ env: env.desktop })('verify onboard new user skip tour', async() => {
// start onboarding process
Expand Down