@@ -222,13 +222,13 @@ describe('AppearanceProvider element flows', () => {
222222 } ) ;
223223} ) ;
224224
225- describe ( 'AppearanceProvider layout flows' , ( ) => {
226- it ( 'sets the parsedLayout correctly from the globalAppearance prop' , ( ) => {
225+ describe ( 'AppearanceProvider options flows' , ( ) => {
226+ it ( 'sets the parsedOptions correctly from the globalAppearance prop' , ( ) => {
227227 const wrapper = ( { children } ) => (
228228 < AppearanceProvider
229229 appearanceKey = 'signIn'
230230 globalAppearance = { {
231- layout : {
231+ options : {
232232 helpPageUrl : 'https://example.com/help' ,
233233 logoImageUrl : 'https://placehold.co/64x64.png' ,
234234 logoLinkUrl : 'https://example.com/' ,
@@ -246,23 +246,23 @@ describe('AppearanceProvider layout flows', () => {
246246 ) ;
247247
248248 const { result } = renderHook ( ( ) => useAppearance ( ) , { wrapper } ) ;
249- expect ( result . current . parsedLayout . helpPageUrl ) . toBe ( 'https://example.com/help' ) ;
250- expect ( result . current . parsedLayout . logoImageUrl ) . toBe ( 'https://placehold.co/64x64.png' ) ;
251- expect ( result . current . parsedLayout . logoLinkUrl ) . toBe ( 'https://example.com/' ) ;
252- expect ( result . current . parsedLayout . privacyPageUrl ) . toBe ( 'https://example.com/privacy' ) ;
253- expect ( result . current . parsedLayout . termsPageUrl ) . toBe ( 'https://example.com/terms' ) ;
254- expect ( result . current . parsedLayout . logoPlacement ) . toBe ( 'inside' ) ;
255- expect ( result . current . parsedLayout . showOptionalFields ) . toBe ( false ) ;
256- expect ( result . current . parsedLayout . socialButtonsPlacement ) . toBe ( 'bottom' ) ;
257- expect ( result . current . parsedLayout . socialButtonsVariant ) . toBe ( 'iconButton' ) ;
249+ expect ( result . current . parsedOptions . helpPageUrl ) . toBe ( 'https://example.com/help' ) ;
250+ expect ( result . current . parsedOptions . logoImageUrl ) . toBe ( 'https://placehold.co/64x64.png' ) ;
251+ expect ( result . current . parsedOptions . logoLinkUrl ) . toBe ( 'https://example.com/' ) ;
252+ expect ( result . current . parsedOptions . privacyPageUrl ) . toBe ( 'https://example.com/privacy' ) ;
253+ expect ( result . current . parsedOptions . termsPageUrl ) . toBe ( 'https://example.com/terms' ) ;
254+ expect ( result . current . parsedOptions . logoPlacement ) . toBe ( 'inside' ) ;
255+ expect ( result . current . parsedOptions . showOptionalFields ) . toBe ( false ) ;
256+ expect ( result . current . parsedOptions . socialButtonsPlacement ) . toBe ( 'bottom' ) ;
257+ expect ( result . current . parsedOptions . socialButtonsVariant ) . toBe ( 'iconButton' ) ;
258258 } ) ;
259259
260- it ( 'sets the parsedLayout correctly from the appearance prop' , ( ) => {
260+ it ( 'sets the parsedOptions correctly from the appearance prop' , ( ) => {
261261 const wrapper = ( { children } ) => (
262262 < AppearanceProvider
263263 appearanceKey = 'signIn'
264264 appearance = { {
265- layout : {
265+ options : {
266266 helpPageUrl : 'https://example.com/help' ,
267267 logoImageUrl : 'https://placehold.co/64x64.png' ,
268268 logoLinkUrl : 'https://example.com/' ,
@@ -280,23 +280,23 @@ describe('AppearanceProvider layout flows', () => {
280280 ) ;
281281
282282 const { result } = renderHook ( ( ) => useAppearance ( ) , { wrapper } ) ;
283- expect ( result . current . parsedLayout . helpPageUrl ) . toBe ( 'https://example.com/help' ) ;
284- expect ( result . current . parsedLayout . logoImageUrl ) . toBe ( 'https://placehold.co/64x64.png' ) ;
285- expect ( result . current . parsedLayout . logoLinkUrl ) . toBe ( 'https://example.com/' ) ;
286- expect ( result . current . parsedLayout . privacyPageUrl ) . toBe ( 'https://example.com/privacy' ) ;
287- expect ( result . current . parsedLayout . termsPageUrl ) . toBe ( 'https://example.com/terms' ) ;
288- expect ( result . current . parsedLayout . logoPlacement ) . toBe ( 'outside' ) ;
289- expect ( result . current . parsedLayout . showOptionalFields ) . toBe ( true ) ;
290- expect ( result . current . parsedLayout . socialButtonsPlacement ) . toBe ( 'top' ) ;
291- expect ( result . current . parsedLayout . socialButtonsVariant ) . toBe ( 'blockButton' ) ;
283+ expect ( result . current . parsedOptions . helpPageUrl ) . toBe ( 'https://example.com/help' ) ;
284+ expect ( result . current . parsedOptions . logoImageUrl ) . toBe ( 'https://placehold.co/64x64.png' ) ;
285+ expect ( result . current . parsedOptions . logoLinkUrl ) . toBe ( 'https://example.com/' ) ;
286+ expect ( result . current . parsedOptions . privacyPageUrl ) . toBe ( 'https://example.com/privacy' ) ;
287+ expect ( result . current . parsedOptions . termsPageUrl ) . toBe ( 'https://example.com/terms' ) ;
288+ expect ( result . current . parsedOptions . logoPlacement ) . toBe ( 'outside' ) ;
289+ expect ( result . current . parsedOptions . showOptionalFields ) . toBe ( true ) ;
290+ expect ( result . current . parsedOptions . socialButtonsPlacement ) . toBe ( 'top' ) ;
291+ expect ( result . current . parsedOptions . socialButtonsVariant ) . toBe ( 'blockButton' ) ;
292292 } ) ;
293293
294- it ( 'sets the parsedLayout correctly from the globalAppearance and appearance prop' , ( ) => {
294+ it ( 'sets the parsedOptions correctly from the globalAppearance and appearance prop' , ( ) => {
295295 const wrapper = ( { children } ) => (
296296 < AppearanceProvider
297297 appearanceKey = 'signIn'
298298 globalAppearance = { {
299- layout : {
299+ options : {
300300 helpPageUrl : 'https://example.com/help' ,
301301 logoImageUrl : 'https://placehold.co/64x64.png' ,
302302 logoLinkUrl : 'https://example.com/' ,
@@ -309,7 +309,7 @@ describe('AppearanceProvider layout flows', () => {
309309 } ,
310310 } }
311311 appearance = { {
312- layout : {
312+ options : {
313313 helpPageUrl : 'https://second.example.com/help' ,
314314 logoImageUrl : 'https://placehold.co/32x32@2.png' ,
315315 logoLinkUrl : 'https://second.example.com/' ,
@@ -327,15 +327,15 @@ describe('AppearanceProvider layout flows', () => {
327327 ) ;
328328
329329 const { result } = renderHook ( ( ) => useAppearance ( ) , { wrapper } ) ;
330- expect ( result . current . parsedLayout . helpPageUrl ) . toBe ( 'https://second.example.com/help' ) ;
331- expect ( result . current . parsedLayout . logoImageUrl ) . toBe ( 'https://placehold.co/32x32@2.png' ) ;
332- expect ( result . current . parsedLayout . logoLinkUrl ) . toBe ( 'https://second.example.com/' ) ;
333- expect ( result . current . parsedLayout . privacyPageUrl ) . toBe ( 'https://second.example.com/privacy' ) ;
334- expect ( result . current . parsedLayout . termsPageUrl ) . toBe ( 'https://second.example.com/terms' ) ;
335- expect ( result . current . parsedLayout . logoPlacement ) . toBe ( 'outside' ) ;
336- expect ( result . current . parsedLayout . showOptionalFields ) . toBe ( true ) ;
337- expect ( result . current . parsedLayout . socialButtonsPlacement ) . toBe ( 'top' ) ;
338- expect ( result . current . parsedLayout . socialButtonsVariant ) . toBe ( 'blockButton' ) ;
330+ expect ( result . current . parsedOptions . helpPageUrl ) . toBe ( 'https://second.example.com/help' ) ;
331+ expect ( result . current . parsedOptions . logoImageUrl ) . toBe ( 'https://placehold.co/32x32@2.png' ) ;
332+ expect ( result . current . parsedOptions . logoLinkUrl ) . toBe ( 'https://second.example.com/' ) ;
333+ expect ( result . current . parsedOptions . privacyPageUrl ) . toBe ( 'https://second.example.com/privacy' ) ;
334+ expect ( result . current . parsedOptions . termsPageUrl ) . toBe ( 'https://second.example.com/terms' ) ;
335+ expect ( result . current . parsedOptions . logoPlacement ) . toBe ( 'outside' ) ;
336+ expect ( result . current . parsedOptions . showOptionalFields ) . toBe ( true ) ;
337+ expect ( result . current . parsedOptions . socialButtonsPlacement ) . toBe ( 'top' ) ;
338+ expect ( result . current . parsedOptions . socialButtonsVariant ) . toBe ( 'blockButton' ) ;
339339 } ) ;
340340
341341 it ( 'removes the base theme when simpleStyles is passed to globalAppearance' , ( ) => {
@@ -426,7 +426,7 @@ describe('AppearanceProvider captcha', () => {
426426 expect ( result . current . parsedCaptcha . language ) . toBe ( 'el-GR' ) ;
427427 } ) ;
428428
429- it ( 'sets the parsedLayout correctly from the globalAppearance and appearance prop' , ( ) => {
429+ it ( 'sets the parsedOptions correctly from the globalAppearance and appearance prop' , ( ) => {
430430 const wrapper = ( { children } ) => (
431431 < AppearanceProvider
432432 appearanceKey = 'signIn'
0 commit comments