Skip to content

Commit d220b58

Browse files
authored
Merge pull request #3532 from RedisInsight/e2e/bugfix/remove-rdi-server-mocked
fixes for desktop e2e
2 parents 4ade13d + 75bb850 commit d220b58

File tree

5 files changed

+24
-18
lines changed

5 files changed

+24
-18
lines changed

.circleci/config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,15 @@ jobs:
391391
- attach_workspace:
392392
at: .
393393
- run: sudo apt-get install net-tools
394+
- run:
395+
name: Install WM
396+
command: sudo apt install fluxbox
397+
- run:
398+
name: Run X11
399+
command: |
400+
Xvfb :99 -screen 0 1920x1080x24 &
401+
sleep 3
402+
fluxbox &
394403
# - run:
395404
# name: Clone mocked RDI server
396405
# command: |

tests/e2e/desktop.runner.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ import testcafe from 'testcafe';
1212
} })
1313
.src((process.env.TEST_FILES || 'tests/electron/**/*.e2e.ts').split('\n'))
1414
.browsers(['electron'])
15-
// Skipped because screenshots don't work for electron app on linux
16-
// .screenshots({
17-
// path: './report/screenshots/',
18-
// takeOnFails: true,
19-
// pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png'
20-
// })
15+
.screenshots({
16+
path: './report/screenshots/',
17+
takeOnFails: true,
18+
pathPattern: '${USERAGENT}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png'
19+
})
2120
.reporter([
2221
'spec',
2322
{
@@ -40,6 +39,7 @@ import testcafe from 'testcafe';
4039
assertionTimeout: 5000,
4140
speed: 1,
4241
quarantineMode: { successThreshold: 1, attemptLimit: 3 },
42+
pageRequestTimeout: 8000,
4343
disableMultipleWindows: true
4444
});
4545
})

tests/e2e/helpers/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as path from 'path';
22
import * as fs from 'fs';
33
import { ClientFunction, RequestMock, t } from 'testcafe';
44
import { Chance } from 'chance';
5-
import { apiUrl, commonUrl } from './conf';
5+
import { apiUrl } from './conf';
66
const archiver = require('archiver');
77

88
const chance = new Chance();
@@ -13,7 +13,7 @@ declare global {
1313
}
1414
}
1515

16-
const settingsApiUrl = `${commonUrl}/api/settings`;
16+
const settingsApiUrl = `${apiUrl}/settings`;
1717
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; // lgtm[js/disabling-certificate-validation]
1818
const mockedSettingsResponse = {
1919
agreements: {

tests/e2e/tests/electron/critical-path/a-first-start-form/user-agreements-form.e2e.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { commonUrl, workingDirectory } from '../../../../helpers/conf';
1+
import { commonUrl } from '../../../../helpers/conf';
22
import { MyRedisDatabasePage } from '../../../../pageObjects';
33
import { Common } from '../../../../helpers/common';
44
import { rte } from '../../../../helpers/constants';
@@ -7,16 +7,12 @@ import { UserAgreementDialog } from '../../../../pageObjects/dialogs';
77
const userAgreementDialog = new UserAgreementDialog();
88
const myRedisDatabasePage = new MyRedisDatabasePage();
99

10-
const dbPath = `${workingDirectory}/redisinsight.db`;
11-
12-
fixture `Agreements Verification`
10+
// Skipped due to unworking mocs to refresh eula https://redislabs.atlassian.net/browse/RI-5868
11+
fixture.skip `Agreements Verification`
1312
.meta({ type: 'critical_path', rte: rte.none })
1413
.page(commonUrl)
15-
.requestHooks(Common.mockSettingsResponse());
16-
test
17-
.before(async() => {
18-
await Common.deleteFileFromFolderIfExists(dbPath);
19-
})('Verify that user should accept User Agreements to continue working with the application', async t => {
14+
.requestHooks(Common.mockSettingsResponse())
15+
test('Verify that user should accept User Agreements to continue working with the application', async t => {
2016
await t.expect(userAgreementDialog.userAgreementsPopup.exists).ok('User Agreements Popup is shown');
2117
// Verify that I still has agreements popup & cannot add a database
2218
await t.expect(userAgreementDialog.submitButton.hasAttribute('disabled')).ok('Submit button not disabled by default');

tests/e2e/tests/web/regression/monitor/monitor.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ test
115115
await t.expect(previousTimestamp).notEql(nextTimestamp, 'Monitor results not correct');
116116
}
117117
});
118-
test
118+
// Skipped due to redis issue https://redislabs.atlassian.net/browse/RI-4111
119+
test.skip
119120
.before(async t => {
120121
await databaseHelper.acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfig);
121122
await browserPage.Cli.sendCommandInCli('acl setuser noperm nopass on +@all ~* -monitor -client');

0 commit comments

Comments
 (0)