From 36b4a849e2e14af83dab87ce958a83c202c8eaad Mon Sep 17 00:00:00 2001 From: Konstantin Schaper Date: Mon, 25 Jan 2021 12:49:19 +0100 Subject: [PATCH] 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 --- CHANGELOG.md | 1 + scm-ui/ui-components/src/devBuild.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b376eae1e..5f9dc7f461 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/scm-ui/ui-components/src/devBuild.ts b/scm-ui/ui-components/src/devBuild.ts index 4425f695ab..b5fcd5d3b1 100644 --- a/scm-ui/ui-components/src/devBuild.ts +++ b/scm-ui/ui-components/src/devBuild.ts @@ -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 {