Make stage concept accessible from ui

This commit is contained in:
Sebastian Sdorra
2020-08-25 08:42:16 +02:00
parent 330f7c500e
commit 6c1a9f286f
7 changed files with 53 additions and 23 deletions

View File

@@ -22,7 +22,8 @@
* SOFTWARE.
*/
export const isDevBuild = () => process.env.NODE_ENV === "development";
// @ts-ignore scmStage is set on the index page
export const isDevBuild = () => (window.scmStage || "").toUpperCase() === "DEVELOPMENT";
export const createAttributesForTesting = (testId?: string) => {
if (!testId || !isDevBuild()) {