mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 12:05:52 +01:00
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:
committed by
GitHub
parent
01fd83fd6b
commit
36b4a849e2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user