diff --git a/src/lib/flex/layout-align/layout-align.spec.ts b/src/lib/flex/layout-align/layout-align.spec.ts
index 2216769d3..5a20d98b3 100644
--- a/src/lib/flex/layout-align/layout-align.spec.ts
+++ b/src/lib/flex/layout-align/layout-align.spec.ts
@@ -196,6 +196,17 @@ describe('layout-align directive', () => {
'max-height': '100%'
}, styler);
});
+ it('should not add special styles when the cross-axis is not `stretch`', () => {
+ createTestComponent(`
+
+
+ `);
+
+ expectNativeEl(fixture).not.toHaveStyle({
+ 'max-height': '100%'
+ }, styler);
+ });
it('should add special styles for cross-axis `stretch` when layout is `column`', () => {
createTestComponent(``);
expectNativeEl(fixture)
@@ -282,6 +293,25 @@ describe('layout-align directive', () => {
}, styler);
});
+ it('should undo special styles when cross-axis changes from `stretch` to anything else', () => {
+ createTestComponent(`
+
+
+ `);
+
+ expectNativeEl(fixture).toHaveStyle({
+ 'max-height': '100%'
+ }, styler);
+
+ matchMedia.activate('md');
+
+ expectNativeEl(fixture).not.toHaveStyle({
+ 'max-height': '100%'
+ }, styler);
+ });
+
it('should fallback to default styles when the active mediaQuery change is not configured', () => { // tslint:disable-line:max-line-length
createTestComponent(`