Apply test ids to production builds for usage in e2e tests (#1499)

Our e2e tests get executed against production builds and therefore need access to the test-ids. Prior to this change, test-ids were removed in prod builds.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
This commit is contained in:
Konstantin Schaper
2021-01-25 12:49:19 +01:00
committed by GitHub
parent 01fd83fd6b
commit 36b4a849e2
2 changed files with 3 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Layout of proxy settings ([#1502](https://github.com/scm-manager/scm-manager/pull/1502))
- Apply test ids to production builds for usage in e2e tests ([#1499](https://github.com/scm-manager/scm-manager/pull/1499))
### Fixed
- Add explicit provider setup for bouncy castle ([#1500](https://github.com/scm-manager/scm-manager/pull/1500))

View File

@@ -22,11 +22,12 @@
* SOFTWARE.
*/
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore scmStage is set on the index page
export const isDevBuild = () => (window.scmStage || "").toUpperCase() === "DEVELOPMENT";
export const createAttributesForTesting = (testId?: string) => {
if (!testId || !isDevBuild()) {
if (!testId) {
return undefined;
}
return {