Skip to content

Commit

Permalink
merge with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
musienko-maxim committed Sep 11, 2023
2 parents c59d9cb + 5dedd33 commit 6ea1ad6
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ body:
label: Che version
description: if workspace is running, version can be obtained with help/about menu
options:
- "7.73@latest"
- "7.74@latest"
- "next (development version)"
- "7.73"
- "7.72"
- "7.71"
- "7.70"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.74.0-SNAPSHOT
7.75.0-SNAPSHOT
24 changes: 14 additions & 10 deletions tests/e2e/configs/mocharc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,29 @@

'use strict';

import { TIMEOUT_CONSTANTS } from '../constants/TIMEOUT_CONSTANTS';
import { MOCHA_CONSTANTS } from '../constants/MOCHA_CONSTANTS';

/**
* full available options list https://mochajs.org/api/mocha
*/

module.exports = {
timeout: 1200000,
timeout: MOCHA_CONSTANTS.MOCHA_DEFAULT_TIMEOUT,
reporter: 'dist/utils/CheReporter.js',
ui: 'tdd',
require: ['dist/specs/MochaHooks.js', 'ts-node/register'],
bail: true,
bail: MOCHA_CONSTANTS.MOCHA_BAIL,
'full-trace': true,
spec:
// variable MOCHA_DIRECTORY uses in command "test-all-devfiles" and sets up automatically.
// you can set it up to run files from specific directory with export environmental variable.
process.env.MOCHA_DIRECTORY
MOCHA_CONSTANTS.MOCHA_DIRECTORY
? // to run one file (name without extension). uses in "test", "test-all-devfiles".
process.env.USERSTORY
? `dist/specs/${process.env.MOCHA_DIRECTORY}/${process.env.USERSTORY}.spec.js`
: `dist/specs/${process.env.MOCHA_DIRECTORY}/**.spec.js`
: process.env.USERSTORY
? [`dist/specs/**/${process.env.USERSTORY}.spec.js`, `dist/specs/${process.env.USERSTORY}.spec.js`]
MOCHA_CONSTANTS.MOCHA_USERSTORY
? `dist/specs/${MOCHA_CONSTANTS.MOCHA_DIRECTORY}/${MOCHA_CONSTANTS.MOCHA_USERSTORY}.spec.js`
: `dist/specs/${MOCHA_CONSTANTS.MOCHA_DIRECTORY}/**.spec.js`
: MOCHA_CONSTANTS.MOCHA_USERSTORY
? [`dist/specs/**/${MOCHA_CONSTANTS.MOCHA_USERSTORY}.spec.js`, `dist/specs/${MOCHA_CONSTANTS.MOCHA_USERSTORY}.spec.js`]
: ['dist/specs/**/**.spec.js', 'dist/specs/**.spec.js'],
retries: TIMEOUT_CONSTANTS.TS_SELENIUM_DEFAULT_ATTEMPTS
retries: MOCHA_CONSTANTS.MOCHA_RETRIES
};
27 changes: 27 additions & 0 deletions tests/e2e/constants/MOCHA_CONSTANTS.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/** *******************************************************************
* copyright (c) 2020-2023 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/

export const MOCHA_CONSTANTS: {
MOCHA_DEFAULT_TIMEOUT: string | number;
MOCHA_DIRECTORY: string | undefined;
MOCHA_USERSTORY: undefined | string;
MOCHA_RETRIES: string | number;
MOCHA_BAIL: boolean;
} = {
MOCHA_DIRECTORY: process.env.MOCHA_DIRECTORY || undefined,

MOCHA_USERSTORY: process.env.USERSTORY || undefined,

MOCHA_BAIL: process.env.MOCHA_BAIL !== 'false',

MOCHA_DEFAULT_TIMEOUT: process.env.MOCHA_DEFAULT_TIMEOUT || 1200000,

MOCHA_RETRIES: process.env.MOCHA_RETRIES || 3
};
4 changes: 2 additions & 2 deletions tests/e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6ea1ad6

Please sign in to comment.