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 21, 2023
1 parent b6eb83e commit ce23eaa
Show file tree
Hide file tree
Showing 18 changed files with 528 additions and 432 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
1 change: 1 addition & 0 deletions tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Note: If there is any modifications in package.json, manually execute the `npm i
npm run test
```
Also, environmental variables can be set in files in "constants" folder.
- Local test results can be represented with Allure reporter `npm run open-allure-dasboard`
## Docker launch
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"
}
}
4 changes: 3 additions & 1 deletion tests/e2e/constants/PLUGIN_TEST_CONSTANTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ export const PLUGIN_TEST_CONSTANTS: { TS_SAMPLE_LIST: string } = {
/**
* dashboard samples to check in RecommendedExtensions.spec.ts
*/
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: number;
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
};
Loading

0 comments on commit ce23eaa

Please sign in to comment.