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

Commit ff8f620

Browse files
fix(srcset): add improved unit tests
1 parent 433ae93 commit ff8f620

13 files changed

+470
-368
lines changed

src/lib/flexbox/api/flex-offset.spec.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('flex directive', () => {
6969

7070

7171
it('should work with percentage values', () => {
72-
expectDOMFrom(`<div fxFlexOffset='17' fxFlex='37'></div>`).toHaveCssStyle({
72+
expectDOMFrom(`<div fxFlexOffset='17' fxFlex='37'></div>`).toHaveStyle({
7373
'flex': '1 1 100%',
7474
'box-sizing': 'border-box',
7575
'margin-left': '17%'
@@ -87,8 +87,8 @@ describe('flex directive', () => {
8787
let element = queryFor(fixture, '[fxFlex]')[0].nativeElement;
8888

8989
// parent flex-direction found with 'column' with child height styles
90-
expect(parent).toHaveCssStyle({'flex-direction': 'column', 'display': 'flex'});
91-
expect(element).toHaveCssStyle({'margin-top': '17px'});
90+
expect(parent).toHaveStyle({'flex-direction': 'column', 'display': 'flex'});
91+
expect(element).toHaveStyle({'margin-top': '17px'});
9292
});
9393

9494
it('should CSS stylesheet and not inject flex-direction on parent', () => {
@@ -106,8 +106,8 @@ describe('flex directive', () => {
106106
let element = queryFor(fixture, '[fxFlex]')[0].nativeElement;
107107

108108
// parent flex-direction found with 'column' with child height styles
109-
expect(parent).toHaveCssStyle({'flex-direction': 'column', 'display': 'flex'});
110-
expect(element).toHaveCssStyle({'margin-top': '41px'});
109+
expect(parent).toHaveStyle({'flex-direction': 'column', 'display': 'flex'});
110+
expect(element).toHaveStyle({'margin-top': '41px'});
111111
});
112112

113113
it('should work with styled-parent flex directions', () => {
@@ -123,16 +123,16 @@ describe('flex directive', () => {
123123
let parent = queryFor(fixture, '.parent')[0].nativeElement;
124124

125125
// parent flex-direction found with 'column'; set child with height styles
126-
expect(element).toHaveCssStyle({'margin-top': '21%'});
127-
expect(parent).toHaveCssStyle({'flex-direction': 'column'});
126+
expect(element).toHaveStyle({'margin-top': '21%'});
127+
expect(parent).toHaveStyle({'flex-direction': 'column'});
128128
});
129129

130130
it('should ignore fxLayout settings on same element', () => {
131131
expectDOMFrom(`
132132
<div fxLayout='column' fxFlex='37%' fxFlexOffset='52px' >
133133
</div>
134134
`)
135-
.not.toHaveCssStyle({
135+
.not.toHaveStyle({
136136
'flex-direction': 'row',
137137
'flex': '1 1 100%',
138138
'margin-left': '52px',

0 commit comments

Comments
 (0)