Skip to content

Commit 7664f2e

Browse files
committed
fixes for failed desktop tests
1 parent 0f687b1 commit 7664f2e

File tree

6 files changed

+28
-54
lines changed

6 files changed

+28
-54
lines changed

.circleci/config.yml

Lines changed: 16 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -949,43 +949,12 @@ 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)
965-
- linux:
966-
name: Build app - Linux (stage)
967-
requires:
968-
- Setup build (stage)
969952
- e2e-tests:
970953
name: E2ETest
971954
build: docker
972955
parallelism: 4
973956
requires:
974957
- Build docker image
975-
# e2e desktop tests on AppImage build
976-
- e2e-app-image:
977-
name: E2ETest (AppImage)
978-
parallelism: 2
979-
report: true
980-
requires:
981-
- Build app - Linux (stage)
982-
# e2e desktop tests on exe build
983-
# - e2e-exe:
984-
# name: E2ETest (exe)
985-
# parallelism: 4
986-
# report: true
987-
# requires:
988-
# - Build app - Windows (stage)
989958
# Workflow for feature, bugfix, main branches
990959
feature-main-branch:
991960
jobs:
@@ -1251,16 +1220,16 @@ workflows:
12511220
- docker:
12521221
name: Build docker image
12531222
# build desktop app
1254-
# - setup-sign-certificates:
1255-
# name: Setup sign certificates (stage)
1256-
# - setup-build:
1257-
# name: Setup build (stage)
1258-
# requires:
1259-
# - Setup sign certificates (stage)
1260-
# - linux:
1261-
# name: Build app - Linux (stage)
1262-
# requires:
1263-
# - Setup build (stage)
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)
12641233
# - windows:
12651234
# name: Build app - Windows (stage)
12661235
# requires:
@@ -1285,12 +1254,12 @@ workflows:
12851254
requires:
12861255
- Build docker image
12871256
# e2e desktop tests on AppImage build
1288-
# - e2e-app-image:
1289-
# name: E2ETest (AppImage) - Nightly
1290-
# parallelism: 4
1291-
# report: true
1292-
# requires:
1293-
# - Build app - Linux (stage)
1257+
- e2e-app-image:
1258+
name: E2ETest (AppImage) - Nightly
1259+
parallelism: 2
1260+
report: true
1261+
requires:
1262+
- Build app - Linux (stage)
12941263
# # e2e desktop tests on exe build
12951264
# - e2e-exe:
12961265
# name: E2ETest (exe) - Nightly

tests/e2e/desktop.runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import testcafe from 'testcafe';
1818
.screenshots({
1919
path: 'report/screenshots/',
2020
takeOnFails: true,
21-
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${FILE_INDEX}.png',
21+
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png',
2222
})
2323
.reporter([
2424
'spec',

tests/e2e/desktop.runner.win.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import testcafe from 'testcafe';
1818
.screenshots({
1919
path: 'report/screenshots/',
2020
takeOnFails: true,
21-
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${FILE_INDEX}.png',
21+
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png',
2222
})
2323
.reporter([
2424
'spec',

tests/e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"build:web": "yarn --cwd ../../ build:web",
1414
"redis:last": "docker run --name redis-last-version -p 7777:6379 -d redislabs/redismod",
1515
"start:app": "cross-env SERVER_STATIC_CONTENT=true yarn start:api",
16-
"test:chrome": "testcafe --compiler-options typescript.configPath=tsconfig.testcafe.json --cache --concurrency 1 chrome tests/ -r html:./report/report.html,spec -e -s takeOnFails=true,path=report/screenshots,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png",
16+
"test:chrome": "testcafe --compiler-options typescript.configPath=tsconfig.testcafe.json --cache --concurrency 1 chrome tests/ -r html:./report/report.html,spec -e -s takeOnFails=true,path=report/screenshots/,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png",
1717
"test:chrome:ci": "ts-node ./web.runner.ts",
1818
"test": "yarn test:chrome",
1919
"lint": "eslint . --ext .ts,.js,.tsx,.jsx",
2020
"test:desktop:ci": "ts-node ./desktop.runner.ts",
2121
"test:desktop:ci:win": "ts-node ./desktop.runner.win.ts",
22-
"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"
22+
"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"
2323
},
2424
"keywords": [],
2525
"author": "",

tests/e2e/tests/regression/database/edit-db.e2e.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@ test
4949
.before(async() => {
5050
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfig, ossStandaloneConfig.databaseName);
5151
})
52-
.after(async() => {
52+
.after(async t => {
5353
// Clear and delete database
54+
await t.click(myRedisDatabasePage.NavigationPanel.myRedisDBButton);
55+
await clickOnEditDatabaseByName(ossStandaloneConfig.databaseName);
56+
await t.typeText(myRedisDatabasePage.AddRedisDatabase.portInput, ossStandaloneConfig.port, { replace: true, paste: true });
57+
await t.click(myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
58+
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
5459
await browserPage.deleteKeyByName(keyName);
5560
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
5661
})('Verify that context for previous database not saved after editing port/username/password/certificates/SSH', async t => {

tests/e2e/tests/regression/workbench/redis-stack-commands.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ test
5858
await t.switchToMainWindow();
5959
await workbenchPage.selectViewTypeText();
6060
await t.expect(workbenchPage.queryTextResult.exists).ok('The result in text view is not displayed');
61-
// Verify that when there is nothing to visualize in RedisGraph, user can see: No data to visualize.{results from the text view}
62-
await t.expect(workbenchPage.queryTextResult.textContent).eql(graphModeText, 'Text of command in Graph mode is not the same as in Text mode');
61+
// Verify that when there is nothing to visualize in RedisGraph, user can see just text result
62+
await t.expect(workbenchPage.queryTextResult.textContent).notEql(graphModeText, 'Text of command in Graph mode is the same as in Text mode');
6363
});
6464
test('Verify that user can switches between Chart and Text for TimeSeries command and see results corresponding to their views', async t => {
6565
// Send TimeSeries command

0 commit comments

Comments
 (0)