Skip to content

Commit

Permalink
fix: timeouts of waiting on extensions complete installation Recommen…
Browse files Browse the repository at this point in the history
…dedExtensions test

Signed-off-by: mdolhalo <[email protected]>
  • Loading branch information
mdolhalo committed Sep 19, 2023
1 parent 8a0bacc commit 4596317
Show file tree
Hide file tree
Showing 19 changed files with 4,651 additions and 527 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module.exports = {
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/no-var-requires': 'off',
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/configs/mocharc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import { MOCHA_CONSTANTS } from '../constants/MOCHA_CONSTANTS';

module.exports = {
timeout: MOCHA_CONSTANTS.MOCHA_DEFAULT_TIMEOUT,
reporter: 'dist/utils/CheReporter.js',
reporter: 'mocha-multi-reporters',
reporterOptions: 'configFile=configs/reporters-config.json',
ui: 'tdd',
require: ['dist/specs/MochaHooks.js', 'ts-node/register'],
bail: MOCHA_CONSTANTS.MOCHA_BAIL,
Expand Down
6 changes: 6 additions & 0 deletions tests/e2e/configs/reporters-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"reporterEnabled": "allure-mocha,dist/utils/CheReporter.js",
"allureMochaReporterOptions": {
"resultsDir": ".allure-results"
}
}
5 changes: 4 additions & 1 deletion tests/e2e/constants/PLUGIN_TEST_CONSTANTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
export const PLUGIN_TEST_CONSTANTS: { TS_SAMPLE_LIST: string } = {
/**
* dashboard samples to check in RecommendedExtensions.spec.ts
* full list Node.js MongoDB,Node.js Express,Java 11 with Lombok,Java 11 with Quarkus,Python,.NET,C/C++,Go,PHP,Ansible
*/
TS_SAMPLE_LIST: process.env.TS_SAMPLE_LIST || 'Node.js MongoDB,Node.js Express'
TS_SAMPLE_LIST:
process.env.TS_SAMPLE_LIST ||
'Node.js MongoDB,Node.js Express,Java 11 with Lombok,Java 11 with Quarkus,Python,.NET,C/C++,Go,PHP,Ansible'
};
10 changes: 8 additions & 2 deletions tests/e2e/constants/TIMEOUT_CONSTANTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
export const TIMEOUT_CONSTANTS: {
TS_FIND_EXTENSION_TEST_TIMEOUT: any;
TS_SELENIUM_WORKSPACE_STATUS_POLLING: number;
TS_COMMON_DASHBOARD_WAIT_TIMEOUT: number;
TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT: number;
Expand Down Expand Up @@ -106,7 +107,7 @@ export const TIMEOUT_CONSTANTS: {
// -------------------------------------------- EDITOR --------------------------------------------

/**
* timeout for inetractions with editor tab - wait, click, select, "8 000" by default.
* timeout for interactions with editor tab - wait, click, select, "8 000" by default.
*/
TS_EDITOR_TAB_INTERACTION_TIMEOUT: Number(process.env.TS_OPEN_PROJECT_TREE_TIMEOUT) || 8_000,

Expand All @@ -127,5 +128,10 @@ export const TIMEOUT_CONSTANTS: {
/**
* common timeout for plugins.
*/
TS_COMMON_PLUGIN_TEST_TIMEOUT: Number(process.env.TS_COMMON_PLUGIN_TEST_TIMEOUT) || 30_000
TS_COMMON_PLUGIN_TEST_TIMEOUT: Number(process.env.TS_COMMON_PLUGIN_TEST_TIMEOUT) || 30_000,

/**
* timeout for searching extension in marketplace.
*/
TS_FIND_EXTENSION_TEST_TIMEOUT: Number(process.env.TS_FIND_EXTENSION_TEST_TIMEOUT) || 15_000
};
1 change: 1 addition & 0 deletions tests/e2e/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export * from './constants/API_TEST_CONSTANTS';
export * from './constants/BASE_TEST_CONSTANTS';
export * from './constants/CHROME_DRIVER_CONSTANTS';
export * from './constants/FACTORY_TEST_CONSTANTS';
export * from './constants/MOCHA_CONSTANTS';
export * from './constants/MONACO_CONSTANTS';
export * from './constants/OAUTH_CONSTANTS';
export * from './constants/PLUGIN_TEST_CONSTANTS';
Expand Down
Loading

0 comments on commit 4596317

Please sign in to comment.