1+ import { APP_ID } from '__test__/support/constants' ;
2+ import { ConfigHelper } from '../../../src/shared/helpers/ConfigHelper' ;
13import {
24 AppUserConfig ,
35 ConfigIntegrationKind ,
46} from '../../../src/shared/models/AppConfig' ;
5- import { getRandomUuid } from '../../../src/shared/utils/utils ' ;
7+ import TestContext from '../../support/environment/TestContext ' ;
68import { TestEnvironment } from '../../support/environment/TestEnvironment' ;
79import { getFinalAppConfig } from '../../support/helpers/configHelper' ;
8- import { ConfigHelper } from '../../../src/shared/helpers/ConfigHelper' ;
9- import TestContext from '../../support/environment/TestContext' ;
1010
1111const SERVICE_WORKER_PATH = 'push/onesignal/' ;
1212
@@ -22,7 +22,7 @@ describe('ConfigHelper Tests', () => {
2222
2323 test ( 'promptOptions 1 - autoRegister = true backwards compatibility for custom integration shows native on HTTPS' , async ( ) => {
2424 const fakeUserConfig : AppUserConfig = {
25- appId : getRandomUuid ( ) ,
25+ appId : APP_ID ,
2626 autoRegister : true ,
2727 } ;
2828
@@ -38,7 +38,7 @@ describe('ConfigHelper Tests', () => {
3838
3939 test ( 'promptOptions 3 - autoRegister = false backwards compatibility for custom integration (no enabled prompts)' , async ( ) => {
4040 const fakeUserConfig : AppUserConfig = {
41- appId : getRandomUuid ( ) ,
41+ appId : APP_ID ,
4242 autoRegister : false ,
4343 } ;
4444
@@ -54,7 +54,7 @@ describe('ConfigHelper Tests', () => {
5454
5555 test ( `promptOptions 4 - autoRegister = true backwards compatibility for custom integration (ignores config, shows native on HTTPS)` , async ( ) => {
5656 const fakeUserConfig : AppUserConfig = {
57- appId : getRandomUuid ( ) ,
57+ appId : APP_ID ,
5858 autoRegister : true ,
5959 } ;
6060 ( fakeUserConfig as any ) . promptOptions = {
@@ -75,7 +75,7 @@ describe('ConfigHelper Tests', () => {
7575
7676 test ( `promptOptions 6 - autoRegister = true backwards compatibility for custom integration (ignores config, shows native on HTTPS)` , async ( ) => {
7777 const fakeUserConfig : AppUserConfig = {
78- appId : getRandomUuid ( ) ,
78+ appId : APP_ID ,
7979 autoRegister : true ,
8080 } ;
8181
@@ -98,7 +98,7 @@ describe('ConfigHelper Tests', () => {
9898
9999 test ( `promptOptions 8 - autoRegister = true backwards compatibility for custom integration (ignores config, shows native on HTTPS)` , async ( ) => {
100100 const fakeUserConfig : AppUserConfig = {
101- appId : getRandomUuid ( ) ,
101+ appId : APP_ID ,
102102 autoRegister : true ,
103103 } ;
104104
@@ -125,7 +125,7 @@ describe('ConfigHelper Tests', () => {
125125
126126 test ( `promptOptions 9 - autoRegister = true backwards compatibility for custom integration (ignores config, shows native on HTTPS)` , async ( ) => {
127127 const fakeUserConfig : AppUserConfig = {
128- appId : getRandomUuid ( ) ,
128+ appId : APP_ID ,
129129 autoRegister : true ,
130130 } ;
131131
@@ -152,7 +152,7 @@ describe('ConfigHelper Tests', () => {
152152
153153 test ( 'autoResubscribe - autoRegister backwards compatibility for custom integration 1' , ( ) => {
154154 const fakeUserConfig : AppUserConfig = {
155- appId : getRandomUuid ( ) ,
155+ appId : APP_ID ,
156156 autoRegister : true ,
157157 } ;
158158
@@ -169,7 +169,7 @@ describe('ConfigHelper Tests', () => {
169169
170170 test ( 'autoResubscribe - autoRegister backwards compatibility for custom integration 2' , ( ) => {
171171 const fakeUserConfig : AppUserConfig = {
172- appId : getRandomUuid ( ) ,
172+ appId : APP_ID ,
173173 } ;
174174
175175 const fakeServerConfig = TestContext . getFakeServerAppConfig (
@@ -187,7 +187,7 @@ describe('ConfigHelper Tests', () => {
187187
188188 test ( 'autoResubscribe - autoRegister backwards compatibility for custom integration 3' , ( ) => {
189189 const fakeUserConfig : AppUserConfig = {
190- appId : getRandomUuid ( ) ,
190+ appId : APP_ID ,
191191 autoRegister : false ,
192192 autoResubscribe : true ,
193193 } ;
@@ -205,7 +205,7 @@ describe('ConfigHelper Tests', () => {
205205
206206 test ( 'service worker config override (true) for typical site works' , ( ) => {
207207 const fakeUserConfig : AppUserConfig = {
208- appId : getRandomUuid ( ) ,
208+ appId : APP_ID ,
209209 serviceWorkerParam : { scope : '/' + SERVICE_WORKER_PATH } ,
210210 serviceWorkerPath : SERVICE_WORKER_PATH + 'OneSignalSDKWorker.js' ,
211211 serviceWorkerOverrideForTypical : true ,
@@ -231,7 +231,7 @@ describe('ConfigHelper Tests', () => {
231231
232232 test ( 'service worker config override (false) for typical site works' , ( ) => {
233233 const fakeUserConfig : AppUserConfig = {
234- appId : getRandomUuid ( ) ,
234+ appId : APP_ID ,
235235 serviceWorkerParam : { scope : '/' + SERVICE_WORKER_PATH } ,
236236 serviceWorkerPath : SERVICE_WORKER_PATH + 'OneSignalSDKWorker.js' ,
237237 serviceWorkerOverrideForTypical : false ,
0 commit comments