Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

fix(fxLayoutAlign): Do not apply cross-axis strech styles when not ne… #877

Merged
merged 2 commits into from
Nov 5, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix linting
  • Loading branch information
danmana committed Nov 5, 2018
commit 78c3754e03c39d606e383a399749db9bf2ad9104
20 changes: 10 additions & 10 deletions src/lib/flex/layout-align/layout-align.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,24 +196,24 @@ describe('layout-align directive', () => {
'max-height': '100%'
}, styler);
});
it('should add special styles for cross-axis `stretch` when layout is `column`', () => {
createTestComponent(`<div fxLayout="column" fxLayoutAlign='end stretch'></div>`);
expectNativeEl(fixture)
.toHaveStyle({
'max-width': '100%'
}, styler);
});
it('should not add special styles for cross-axis `stretch` when the cross-axis is not `stretch`', () => {
it('should not add special styles when the cross-axis is not `stretch`', () => {
createTestComponent(`
<div fxLayout
fxLayoutAlign='center center'>
</div>
`);

expectNativeEl(fixture).not.toHaveStyle({
'max-height': '100%'
}, styler);
});
it('should add special styles for cross-axis `stretch` when layout is `column`', () => {
createTestComponent(`<div fxLayout="column" fxLayoutAlign='end stretch'></div>`);
expectNativeEl(fixture)
.toHaveStyle({
'max-width': '100%'
}, styler);
});
});

describe('for dynamic inputs', () => {
Expand Down Expand Up @@ -293,7 +293,7 @@ describe('layout-align directive', () => {
}, styler);
});

it('should undo special cross-axis `stretch` styles when changing cross-axis to something else', () => {
it('should undo special styles when cross-axis changes from `stretch` to anything else', () => {
createTestComponent(`
<div fxLayout
fxLayoutAlign='center stretch'
Expand Down