@@ -29,8 +29,8 @@ describe('GlobalPositonStrategy', () => {
29
29
expect ( elementStyle . marginBottom ) . toBe ( '' ) ;
30
30
expect ( elementStyle . marginRight ) . toBe ( '' ) ;
31
31
32
- expect ( parentStyle . justifyContent ) . toBe ( 'flex-start' ) ;
33
32
expect ( parentStyle . alignItems ) . toBe ( 'flex-start' ) ;
33
+ expect ( parentStyle . justifyContent ) . toBe ( 'flex-start' ) ;
34
34
} ) ;
35
35
36
36
it ( 'should position the element to the (bottom, right) with an offset' , ( ) => {
@@ -44,8 +44,8 @@ describe('GlobalPositonStrategy', () => {
44
44
expect ( elementStyle . marginBottom ) . toBe ( '70px' ) ;
45
45
expect ( elementStyle . marginRight ) . toBe ( '15em' ) ;
46
46
47
- expect ( parentStyle . justifyContent ) . toBe ( 'flex-end' ) ;
48
47
expect ( parentStyle . alignItems ) . toBe ( 'flex-end' ) ;
48
+ expect ( parentStyle . justifyContent ) . toBe ( 'flex-end' ) ;
49
49
} ) ;
50
50
51
51
it ( 'should overwrite previously applied positioning' , ( ) => {
@@ -60,8 +60,8 @@ describe('GlobalPositonStrategy', () => {
60
60
expect ( elementStyle . marginBottom ) . toBe ( '' ) ;
61
61
expect ( elementStyle . marginRight ) . toBe ( '' ) ;
62
62
63
- expect ( parentStyle . justifyContent ) . toBe ( 'flex-start' ) ;
64
63
expect ( parentStyle . alignItems ) . toBe ( 'flex-start' ) ;
64
+ expect ( parentStyle . justifyContent ) . toBe ( 'flex-start' ) ;
65
65
66
66
strategy . bottom ( '70px' ) . right ( '15em' ) . apply ( ) ;
67
67
@@ -70,17 +70,17 @@ describe('GlobalPositonStrategy', () => {
70
70
expect ( element . style . marginBottom ) . toBe ( '70px' ) ;
71
71
expect ( element . style . marginRight ) . toBe ( '15em' ) ;
72
72
73
- expect ( parentStyle . justifyContent ) . toBe ( 'flex-end' ) ;
74
73
expect ( parentStyle . alignItems ) . toBe ( 'flex-end' ) ;
74
+ expect ( parentStyle . justifyContent ) . toBe ( 'flex-end' ) ;
75
75
} ) ;
76
76
77
77
it ( 'should center the element' , ( ) => {
78
78
strategy . centerHorizontally ( ) . centerVertically ( ) . apply ( ) ;
79
79
80
80
let parentStyle = ( element . parentNode as HTMLElement ) . style ;
81
81
82
- expect ( parentStyle . justifyContent ) . toBe ( 'center' ) ;
83
82
expect ( parentStyle . alignItems ) . toBe ( 'center' ) ;
83
+ expect ( parentStyle . justifyContent ) . toBe ( 'center' ) ;
84
84
} ) ;
85
85
86
86
it ( 'should center the element with an offset' , ( ) => {
@@ -92,8 +92,8 @@ describe('GlobalPositonStrategy', () => {
92
92
expect ( elementStyle . marginLeft ) . toBe ( '10px' ) ;
93
93
expect ( elementStyle . marginTop ) . toBe ( '15px' ) ;
94
94
95
- expect ( parentStyle . justifyContent ) . toBe ( 'center' ) ;
96
95
expect ( parentStyle . alignItems ) . toBe ( 'center' ) ;
96
+ expect ( parentStyle . justifyContent ) . toBe ( 'center' ) ;
97
97
} ) ;
98
98
99
99
it ( 'should make the element position: static' , ( ) => {
@@ -137,13 +137,13 @@ describe('GlobalPositonStrategy', () => {
137
137
strategy . centerHorizontally ( ) . width ( '100%' ) . apply ( ) ;
138
138
139
139
expect ( element . style . marginLeft ) . toBe ( '0px' ) ;
140
- expect ( ( element . parentNode as HTMLElement ) . style . justifyContent ) . toBe ( 'flex-start' ) ;
140
+ expect ( ( element . parentNode as HTMLElement ) . style . alignItems ) . toBe ( 'flex-start' ) ;
141
141
} ) ;
142
142
143
143
it ( 'should reset the vertical position and offset when the height is 100%' , ( ) => {
144
144
strategy . centerVertically ( ) . height ( '100%' ) . apply ( ) ;
145
145
146
146
expect ( element . style . marginTop ) . toBe ( '0px' ) ;
147
- expect ( ( element . parentNode as HTMLElement ) . style . alignItems ) . toBe ( 'flex-start' ) ;
147
+ expect ( ( element . parentNode as HTMLElement ) . style . justifyContent ) . toBe ( 'flex-start' ) ;
148
148
} ) ;
149
149
} ) ;
0 commit comments