Skip to content

Commit 8c3bad8

Browse files
committed
Merge branch 'main' into feature/RI-4352-bulk_upload_from_tutorials
2 parents 19a4086 + d72afc9 commit 8c3bad8

25 files changed

+161
-121
lines changed

.circleci/config.yml

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -949,12 +949,31 @@ workflows:
949949
name: Build docker image
950950
requires:
951951
- Start E2E Tests
952+
# build desktop app
953+
# - setup-sign-certificates:
954+
# name: Setup sign certificates (stage)
955+
# requires:
956+
# - Start E2E Tests
957+
# - setup-build:
958+
# name: Setup build (stage)
959+
# requires:
960+
# - Setup sign certificates (stage)
961+
# - windows:
962+
# name: Build app - Windows (stage)
963+
# requires:
964+
# - Setup build (stage)
952965
- e2e-tests:
953966
name: E2ETest
954967
build: docker
955968
parallelism: 4
956969
requires:
957970
- Build docker image
971+
# - e2e-exe:
972+
# name: E2ETest (exe)
973+
# parallelism: 1
974+
# report: true
975+
# requires:
976+
# - Build app - Windows (stage)
958977
# Workflow for feature, bugfix, main branches
959978
feature-main-branch:
960979
jobs:
@@ -1220,20 +1239,20 @@ workflows:
12201239
- docker:
12211240
name: Build docker image
12221241
# build desktop app
1223-
- setup-sign-certificates:
1224-
name: Setup sign certificates (stage)
1225-
- setup-build:
1226-
name: Setup build (stage)
1227-
requires:
1228-
- Setup sign certificates (stage)
1229-
- linux:
1230-
name: Build app - Linux (stage)
1231-
requires:
1232-
- Setup build (stage)
1233-
# - windows:
1234-
# name: Build app - Windows (stage)
1235-
# requires:
1236-
# - Setup build (stage)
1242+
# - setup-sign-certificates:
1243+
# name: Setup sign certificates (stage)
1244+
# - setup-build:
1245+
# name: Setup build (stage)
1246+
# requires:
1247+
# - Setup sign certificates (stage)
1248+
# - linux:
1249+
# name: Build app - Linux (stage)
1250+
# requires:
1251+
# - Setup build (stage)
1252+
# - windows:
1253+
# name: Build app - Windows (stage)
1254+
# requires:
1255+
# - Setup build (stage)
12371256
# integration tests on docker image build
12381257
- integration-tests-run:
12391258
matrix:

tests/e2e/desktop.runner.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ import testcafe from 'testcafe';
55
.then(t => {
66
return t
77
.createRunner()
8+
.compilerOptions({
9+
"typescript": {
10+
configPath: 'tsconfig.testcafe.json',
11+
experimentalDecorators: true
12+
}})
813
.src((process.env.TEST_FILES || 'tests/**/*.e2e.ts').split('\n'))
914
.browsers(['electron'])
1015
.filter((_testName, _fixtureName, _fixturePath, testMeta): boolean => {
11-
return testMeta.env !== 'web'
16+
return testMeta.env == 'desktop'
1217
})
1318
.screenshots({
1419
path: 'report/screenshots/',
1520
takeOnFails: true,
16-
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${TEST_INDEX}.png',
21+
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${FILE_INDEX}.png',
1722
})
1823
.reporter([
1924
'spec',
@@ -24,11 +29,17 @@ import testcafe from 'testcafe';
2429
{
2530
name: 'json',
2631
output: './results/e2e.results.json'
32+
},
33+
{
34+
name: 'html',
35+
output: './report/report.html'
2736
}
2837
])
2938
.run({
3039
skipJsErrors: true,
3140
browserInitTimeout: 60000,
41+
selectorTimeout: 5000,
42+
assertionTimeout: 5000,
3243
speed: 1,
3344
});
3445
})

tests/e2e/desktop.runner.win.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ import testcafe from 'testcafe';
55
.then(t => {
66
return t
77
.createRunner()
8+
.compilerOptions({
9+
"typescript": {
10+
configPath: 'tsconfig.testcafe.json',
11+
experimentalDecorators: true
12+
}})
813
.src((process.env.TEST_FILES || 'tests/**/*.e2e.ts').split('\n'))
914
.browsers(['electron'])
1015
.filter((_testName, _fixtureName, _fixturePath, testMeta): boolean => {
11-
return testMeta.env !== 'web' && testMeta.rte === 'standalone';
16+
return testMeta.env == 'desktop' && testMeta.rte === 'standalone';
1217
})
1318
.screenshots({
1419
path: 'report/screenshots/',
1520
takeOnFails: true,
16-
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${TEST_INDEX}.png',
21+
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${FILE_INDEX}.png',
1722
})
1823
.reporter([
1924
'spec',
@@ -24,12 +29,18 @@ import testcafe from 'testcafe';
2429
{
2530
name: 'json',
2631
output: './results/e2e.results.json'
32+
},
33+
{
34+
name: 'html',
35+
output: './report/report.html'
2736
}
2837
])
2938
.run({
3039
skipJsErrors: true,
3140
browserInitTimeout: 60000,
32-
speed: 1
41+
selectorTimeout: 5000,
42+
assertionTimeout: 5000,
43+
speed: 1,
3344
});
3445
})
3546
.then((failedCount) => {

tests/e2e/helpers/database.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import {
55
MyRedisDatabasePage,
66
BrowserPage,
77
AutoDiscoverREDatabases,
8-
UserAgreementPage
98
} from '../pageObjects';
9+
import { UserAgreementDialog } from '../pageObjects/dialogs';
1010
import { addNewStandaloneDatabaseApi, discoverSentinelDatabaseApi, getDatabaseIdByName } from './api/api-database';
1111

1212
const myRedisDatabasePage = new MyRedisDatabasePage();
1313
const discoverMasterGroupsPage = new DiscoverMasterGroupsPage();
1414
const autoDiscoverREDatabases = new AutoDiscoverREDatabases();
1515
const browserPage = new BrowserPage();
16-
const userAgreementPage = new UserAgreementPage();
16+
const userAgreementDialog = new UserAgreementDialog();
1717

1818
/**
1919
* Add a new database manually using host and port
@@ -214,7 +214,7 @@ export async function addRECloudDatabase(databaseParameters: AddNewDatabaseParam
214214
// Accept License terms
215215
export async function acceptLicenseTerms(): Promise<void> {
216216
await t.maximizeWindow();
217-
await userAgreementPage.acceptLicenseTerms();
217+
await userAgreementDialog.acceptLicenseTerms();
218218
}
219219

220220
// Accept License terms and connect to the RedisStack database

tests/e2e/helpers/notifications.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join } from 'path';
22
import * as os from 'os';
3-
import { NotificationParameters } from '../pageObjects/components/notification-panel';
3+
import { NotificationParameters } from '../pageObjects/components/navigation/notification-panel';
44

55
const workingDirectory = process.env.APP_FOLDER_ABSOLUTE_PATH
66
|| (join(os.homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-v2'));

tests/e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"lint": "eslint . --ext .ts,.js,.tsx,.jsx",
1919
"test:desktop:ci": "ts-node ./desktop.runner.ts",
2020
"test:desktop:ci:win": "ts-node ./desktop.runner.win.ts",
21-
"test:desktop": "testcafe electron tests/ --browser-init-timeout 180000 -e -r html:./report/desktop-report.html,spec -s takeOnFails=true,path=report/screenshots,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png"
21+
"test:desktop": "testcafe electron tests/ --compiler-options typescript.configPath=tsconfig.testcafe.json --browser-init-timeout 180000 -e -r html:./report/desktop-report.html,spec -s takeOnFails=true,path=report/screenshots,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png"
2222
},
2323
"keywords": [],
2424
"author": "",
@@ -47,7 +47,7 @@
4747
"sqlite3": "5.0.10",
4848
"supertest": "^4.0.2",
4949
"testcafe": "1.14.2",
50-
"testcafe-browser-provider-electron": "0.0.18",
50+
"testcafe-browser-provider-electron": "0.0.19",
5151
"testcafe-reporter-html": "1.4.6",
5252
"testcafe-reporter-json": "2.2.0",
5353
"testcafe-reporter-spec": "2.1.1",

tests/e2e/pageObjects/auto-discover-redis-enterprise-databases.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Selector } from 'testcafe';
2+
import { BasePage } from './base-page';
23

3-
export class AutoDiscoverREDatabases {
4+
export class AutoDiscoverREDatabases extends BasePage {
45
//-------------------------------------------------------------------------------------------
56
//DECLARATION OF SELECTORS
67
//*Declare all elements/components of the relevant page.

tests/e2e/pageObjects/base-page.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { t } from 'testcafe';
22
import { NavigationPanel } from './components/navigation-panel';
33
import { Toast } from './components/toast';
4+
import { ShortcutsPanel } from './components/shortcuts-panel';
45

56
export class BasePage {
67
NavigationPanel = new NavigationPanel();
8+
ShortcutsPanel = new ShortcutsPanel();
79
Toast = new Toast();
810

911
/**

tests/e2e/pageObjects/overview-page.ts renamed to tests/e2e/pageObjects/cluster-details-page.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Selector } from 'testcafe';
2+
import { InstancePage } from './instance-page';
23

3-
export class OverviewPage {
4+
export class ClusterDetailsPage extends InstancePage {
45
//CSS Selectors
56
cssTableRow = 'tr[class=euiTableRow]';
67
//-------------------------------------------------------------------------------------------
@@ -17,10 +18,6 @@ export class OverviewPage {
1718
tableHeaderCell = Selector('[data-test-subj^=tableHeaderCell]');
1819
primaryNodesTable = Selector('[data-testid=primary-nodes-table]');
1920
tableRow = Selector('tr[class=euiTableRow]');
20-
connectedClientsValue = Selector('[data-testid^=connectedClients-value]');
21-
totalKeysValue = Selector('[data-testid^=totalKeys-value]');
22-
networkInputValue = Selector('[data-testid^=networkInKbps-value]');
23-
networkOutputValue = Selector('[data-testid^=networkOutKbps-value]');
2421

2522
/**
2623
* Get Primary nodes count in table

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Selector } from 'testcafe';
22

3-
import NotificationPanel from './notification-panel';
3+
import NotificationPanel from './navigation/notification-panel';
4+
import { HelpCenter } from './navigation/help-center';
45

56
export class NavigationPanel {
67
NotificationPanel = new NotificationPanel();
8+
HelpCenter = new HelpCenter();
79

810
workbenchButton = Selector('[data-testid=workbench-page-btn]');
911
analysisPageButton = Selector('[data-testid=analytics-page-btn]');

0 commit comments

Comments
 (0)