@@ -301,12 +301,20 @@ describe('show directive', () => {
301
301
CommonModule ,
302
302
FlexLayoutModule . withConfig ( {
303
303
serverLoaded : true ,
304
- } , {
305
- alias : 'sm-md' ,
306
- suffix : 'SmMd' ,
307
- mediaQuery : 'screen and (min-width: 720px) and (max-width: 839px)' ,
308
- overlapping : false
309
- } ) ,
304
+ } , [
305
+ {
306
+ alias : 'sm-md' ,
307
+ suffix : 'SmMd' ,
308
+ mediaQuery : 'screen and (min-width: 720px) and (max-width: 839px)' ,
309
+ overlapping : false
310
+ } ,
311
+ {
312
+ alias : 'sm.lg' ,
313
+ suffix : 'SmLg' ,
314
+ mediaQuery : 'screen and (min-width: 840px) and (max-width: 1000px)' ,
315
+ overlapping : false
316
+ }
317
+ ] ) ,
310
318
] ,
311
319
declarations : [ FxShowHideDirective ] ,
312
320
providers : [
@@ -317,7 +325,7 @@ describe('show directive', () => {
317
325
318
326
it ( 'should respond to custom breakpoint' , async ( ( ) => {
319
327
createTestComponent ( `
320
- <p fxFlex="100%" fxHide="true" fxShow.sm-md="true"></p>
328
+ <p fxFlex="100%" fxHide="true" fxShow.sm-md="true" fxShow.sm.lg="true" ></p>
321
329
` ) ;
322
330
323
331
expectNativeEl ( fixture ) . toHaveStyle ( { 'display' : 'none' } , styler ) ;
@@ -329,13 +337,17 @@ describe('show directive', () => {
329
337
matchMedia . activate ( 'sm' ) ;
330
338
331
339
expectNativeEl ( fixture ) . toHaveStyle ( { 'display' : 'none' } , styler ) ;
340
+
341
+ matchMedia . activate ( 'sm.lg' ) ;
342
+
343
+ expectNativeEl ( fixture ) . not . toHaveStyle ( { 'display' : 'none' } , styler ) ;
332
344
} ) ) ;
333
345
} ) ;
334
346
335
347
} ) ;
336
348
337
- const inputs = [ 'fxShow.sm-md' , 'fxHide.sm-md' ] ;
338
- const selector = `[fxShow.sm-md], [fxHide.sm-md]` ;
349
+ const inputs = [ 'fxShow.sm-md' , 'fxHide.sm-md' , 'fxShow.sm.lg' , 'fxHide.sm.lg' ] ;
350
+ const selector = `[fxShow.sm-md], [fxHide.sm-md], [fxShow.sm.lg], [fxHide.sm.lg] ` ;
339
351
340
352
// Used to test custom breakpoint functionality
341
353
@Directive ( { inputs, selector} )
0 commit comments