Skip to content

Commit 0aa4c32

Browse files
authored
Merge pull request #2078 from RedisInsight/e2e/feature/RI_4499-update_circleci-to-run-desktop-tests
E2e/feature/ri 4499 update circleci to run desktop tests
2 parents ca7c195 + d3c5b04 commit 0aa4c32

File tree

8 files changed

+75
-118
lines changed

8 files changed

+75
-118
lines changed

.circleci/config.yml

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -949,31 +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)
965952
- e2e-tests:
966953
name: E2ETest
967954
build: docker
968955
parallelism: 4
969956
requires:
970957
- Build docker image
971-
# - e2e-exe:
972-
# name: E2ETest (exe)
973-
# parallelism: 1
974-
# report: true
975-
# requires:
976-
# - Build app - Windows (stage)
977958
# Workflow for feature, bugfix, main branches
978959
feature-main-branch:
979960
jobs:
@@ -1239,16 +1220,16 @@ workflows:
12391220
- docker:
12401221
name: Build docker image
12411222
# build desktop app
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)
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)
12521233
# - windows:
12531234
# name: Build app - Windows (stage)
12541235
# requires:
@@ -1273,12 +1254,12 @@ workflows:
12731254
requires:
12741255
- Build docker image
12751256
# e2e desktop tests on AppImage build
1276-
# - e2e-app-image:
1277-
# name: E2ETest (AppImage) - Nightly
1278-
# parallelism: 4
1279-
# report: true
1280-
# requires:
1281-
# - 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)
12821263
# # e2e desktop tests on exe build
12831264
# - e2e-exe:
12841265
# 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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "redisinsight",
33
"version": "1.0.0",
44
"description": "End-to-end tests",
5+
"private": true,
56
"main": "index.js",
67
"scripts": {
78
"test:live": "testcafe --live chrome ",
@@ -12,13 +13,13 @@
1213
"build:web": "yarn --cwd ../../ build:web",
1314
"redis:last": "docker run --name redis-last-version -p 7777:6379 -d redislabs/redismod",
1415
"start:app": "cross-env SERVER_STATIC_CONTENT=true yarn start:api",
15-
"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",
1617
"test:chrome:ci": "ts-node ./web.runner.ts",
1718
"test": "yarn test:chrome",
1819
"lint": "eslint . --ext .ts,.js,.tsx,.jsx",
1920
"test:desktop:ci": "ts-node ./desktop.runner.ts",
2021
"test:desktop:ci:win": "ts-node ./desktop.runner.win.ts",
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"
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"
2223
},
2324
"keywords": [],
2425
"author": "",
@@ -52,6 +53,6 @@
5253
"testcafe-reporter-json": "2.2.0",
5354
"testcafe-reporter-spec": "2.1.1",
5455
"ts-node": "^10.5.0",
55-
"typescript": "5.0.4"
56+
"typescript": "4.1.5"
5657
}
5758
}

tests/e2e/tests/critical-path/workbench/index-schema.e2e.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,46 @@ fixture `Index Schema at Workbench`
2525
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
2626
});
2727
test
28-
.meta({ env: env.desktop })('Verify that user can open results in Text and Table views for FT.INFO for Hash in Workbench', async t => {
29-
indexName = Common.generateWord(5);
30-
const commandsForSend = [
31-
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA name TEXT`,
32-
'HMSET product:1 name "Apple Juice"'
33-
];
34-
const searchCommand = `FT.INFO ${indexName}`;
28+
.meta({ env: env.desktop })('Verify that user can open results in Text and Table views for FT.INFO for Hash in Workbench', async t => {
29+
indexName = Common.generateWord(5);
30+
const commandsForSend = [
31+
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA name TEXT`,
32+
'HMSET product:1 name "Apple Juice"'
33+
];
34+
const searchCommand = `FT.INFO ${indexName}`;
3535

36-
// Send commands
37-
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
38-
// Send search command
39-
await workbenchPage.sendCommandInWorkbench(searchCommand);
40-
// Check that result is displayed in Table view
41-
await t.switchToIframe(workbenchPage.iframe);
42-
await t.expect(workbenchPage.queryTableResult.exists).ok('The result is displayed in Table view');
43-
// Select Text view type
44-
await t.switchToMainWindow();
45-
await workbenchPage.selectViewTypeText();
46-
// Check that result is displayed in Text view
47-
await t.expect(workbenchPage.queryTextResult.exists).ok('The result is displayed in Text view');
48-
});
36+
// Send commands
37+
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
38+
// Send search command
39+
await workbenchPage.sendCommandInWorkbench(searchCommand);
40+
// Check that result is displayed in Table view
41+
await t.switchToIframe(workbenchPage.iframe);
42+
await t.expect(workbenchPage.queryTableResult.exists).ok('The result is displayed in Table view');
43+
// Select Text view type
44+
await t.switchToMainWindow();
45+
await workbenchPage.selectViewTypeText();
46+
// Check that result is displayed in Text view
47+
await t.expect(workbenchPage.queryTextResult.exists).ok('The result is displayed in Text view');
48+
});
4949
test
50-
.meta({ env: env.desktop })('Verify that user can open results in Text and Table views for FT.INFO for JSON in Workbench', async t => {
51-
indexName = Common.generateWord(5);
52-
const commandsForSend = [
53-
`FT.CREATE ${indexName} ON JSON SCHEMA $.user.name AS name TEXT $.user.tag AS country TAG`,
54-
'JSON.SET myDoc1 $ \'{"user":{"name":"John Smith","tag":"foo,bar","hp":1000, "dmg":150}}\''
55-
];
56-
const searchCommand = `FT.INFO ${indexName}`;
50+
.meta({ env: env.desktop })('Verify that user can open results in Text and Table views for FT.INFO for JSON in Workbench', async t => {
51+
indexName = Common.generateWord(5);
52+
const commandsForSend = [
53+
`FT.CREATE ${indexName} ON JSON SCHEMA $.user.name AS name TEXT $.user.tag AS country TAG`,
54+
'JSON.SET myDoc1 $ \'{"user":{"name":"John Smith","tag":"foo,bar","hp":1000, "dmg":150}}\''
55+
];
56+
const searchCommand = `FT.INFO ${indexName}`;
5757

58-
// Send commands
59-
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
60-
// Send search command
61-
await workbenchPage.sendCommandInWorkbench(searchCommand);
62-
// Check that result is displayed in Table view
63-
await t.switchToIframe(workbenchPage.iframe);
64-
await t.expect(workbenchPage.queryTableResult.exists).ok('The result is displayed in Table view');
65-
// Select Text view type
66-
await t.switchToMainWindow();
67-
await workbenchPage.selectViewTypeText();
68-
// Check that result is displayed in Text view
69-
await t.expect(workbenchPage.queryTextResult.exists).ok('The result is displayed in Text view');
70-
});
58+
// Send commands
59+
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
60+
// Send search command
61+
await workbenchPage.sendCommandInWorkbench(searchCommand);
62+
// Check that result is displayed in Table view
63+
await t.switchToIframe(workbenchPage.iframe);
64+
await t.expect(workbenchPage.queryTableResult.exists).ok('The result is displayed in Table view');
65+
// Select Text view type
66+
await t.switchToMainWindow();
67+
await workbenchPage.selectViewTypeText();
68+
// Check that result is displayed in Text view
69+
await t.expect(workbenchPage.queryTextResult.exists).ok('The result is displayed in Text view');
70+
});

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

tests/e2e/yarn.lock

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5699,36 +5699,6 @@ [email protected]:
56995699
tunnel-agent "0.6.0"
57005700
webauth "^1.1.0"
57015701

5702-
testcafe-hammerhead@>=19.4.0:
5703-
version "31.3.0"
5704-
resolved "https://registry.yarnpkg.com/testcafe-hammerhead/-/testcafe-hammerhead-31.3.0.tgz#6ab36f861b6e90f4c884751623cd4cc95150d0ba"
5705-
integrity sha512-bTy9qL4jtmNr1+ATleWX+I2JC4BA83WV0X6SBXiFovCHg84RkSdqoj2n4LQp6WEzDm5RV3eV+P+kToH/XYywnw==
5706-
dependencies:
5707-
"@electron/asar" "^3.2.3"
5708-
acorn-hammerhead "0.6.1"
5709-
bowser "1.6.0"
5710-
crypto-md5 "^1.0.0"
5711-
css "2.2.3"
5712-
debug "4.3.1"
5713-
esotope-hammerhead "0.6.4"
5714-
http-cache-semantics "^4.1.0"
5715-
httpntlm "^1.8.10"
5716-
iconv-lite "0.5.1"
5717-
lodash "^4.17.20"
5718-
lru-cache "2.6.3"
5719-
match-url-wildcard "0.0.4"
5720-
merge-stream "^1.0.1"
5721-
mime "~1.4.1"
5722-
mustache "^2.1.1"
5723-
nanoid "^3.1.12"
5724-
os-family "^1.0.0"
5725-
parse5 "2.2.3"
5726-
pinkie "2.0.4"
5727-
read-file-relative "^1.2.0"
5728-
semver "5.5.0"
5729-
tough-cookie "4.0.0"
5730-
tunnel-agent "0.6.0"
5731-
57325702
57335703
version "5.0.0"
57345704
resolved "https://registry.yarnpkg.com/testcafe-legacy-api/-/testcafe-legacy-api-5.0.0.tgz#dde9dc2ee9e9490afed58b83df23cf2e01a6c303"
@@ -5747,7 +5717,7 @@ [email protected]:
57475717
pinkie "^2.0.1"
57485718
read-file-relative "^1.2.0"
57495719
strip-bom "^2.0.0"
5750-
testcafe-hammerhead ">=19.4.0"
5720+
testcafe-hammerhead "24.2.1"
57515721

57525722
57535723
version "1.4.6"
@@ -6058,10 +6028,10 @@ typed-array-length@^1.0.4:
60586028
for-each "^0.3.3"
60596029
is-typed-array "^1.1.9"
60606030

6061-
typescript@5.0.4:
6062-
version "5.0.4"
6063-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b"
6064-
integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==
6031+
typescript@4.1.5:
6032+
version "4.1.5"
6033+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
6034+
integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
60656035

60666036
typescript@^3.3.3:
60676037
version "3.9.10"

0 commit comments

Comments
 (0)