@@ -2342,7 +2342,7 @@ wrong = "property"
23422342 await expect ( loadTestingApp ( ) ) . rejects . toThrow ( )
23432343 } )
23442344
2345- test ( 'preserves values from the previous app when reloading' , async ( ) => {
2345+ test ( 'regenerates devApplicationURLs when reloading' , async ( ) => {
23462346 // Given
23472347 const appConfiguration = `
23482348 name = "my-app"
@@ -2355,6 +2355,11 @@ wrong = "property"
23552355
23562356 [auth]
23572357 redirect_urls = ["https://example.com/auth"]
2358+
2359+ [app_proxy]
2360+ url = "https://example.com"
2361+ subpath = "updated"
2362+ prefix = "new"
23582363 `
23592364 await writeConfig ( appConfiguration )
23602365
@@ -2381,11 +2386,16 @@ wrong = "property"
23812386 userProvidedConfigName : undefined ,
23822387 } ) ) as AppLinkedInterface
23832388
2384- // Set some values that should be preserved
2389+ // Set some values that should be regenerated
23852390 const customDevUUID = 'custom-dev-uuid'
23862391 const customAppURLs = {
23872392 applicationUrl : 'http://custom.dev' ,
23882393 redirectUrlWhitelist : [ 'http://custom.dev/auth' ] ,
2394+ appProxy : {
2395+ proxyUrl : 'https://example.com' ,
2396+ proxySubPath : 'initial' ,
2397+ proxySubPathPrefix : 'old' ,
2398+ } ,
23892399 }
23902400 app . allExtensions [ 0 ] ! . devUUID = customDevUUID
23912401 app . setDevApplicationURLs ( customAppURLs )
@@ -2395,7 +2405,19 @@ wrong = "property"
23952405
23962406 // Then
23972407 expect ( reloadedApp . allExtensions [ 0 ] ?. devUUID ) . toBe ( customDevUUID )
2398- expect ( reloadedApp . devApplicationURLs ) . toEqual ( customAppURLs )
2408+ expect ( reloadedApp . devApplicationURLs ) . toEqual ( {
2409+ applicationUrl : 'http://custom.dev' ,
2410+ redirectUrlWhitelist : [
2411+ 'http://custom.dev/auth/callback' ,
2412+ 'http://custom.dev/auth/shopify/callback' ,
2413+ 'http://custom.dev/api/auth/callback' ,
2414+ ] ,
2415+ appProxy : {
2416+ proxyUrl : 'https://custom.dev' ,
2417+ proxySubPath : 'updated' ,
2418+ proxySubPathPrefix : 'new' ,
2419+ } ,
2420+ } )
23992421 expect ( reloadedApp . name ) . toBe ( app . name )
24002422 expect ( reloadedApp . packageManager ) . toBe ( app . packageManager )
24012423 expect ( reloadedApp . nodeDependencies ) . toEqual ( app . nodeDependencies )
0 commit comments