Skip to content

Commit 3d6fcb6

Browse files
committed
Change test cases
1 parent 44ac7f6 commit 3d6fcb6

File tree

8 files changed

+141
-165
lines changed

8 files changed

+141
-165
lines changed

tests/__snapshots__/process-declaration-plugins/combined/flip.snapshot

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`[[Mode: combined]] Combined Tests: flip background by default 1`] = `
3+
exports[`[[Mode: combined]] flip background by default 1`] = `
44
"[dir="ltr"] .test1 {
55
background: url("/icons/icon-left.png") 0 100%;
66
}
@@ -43,42 +43,51 @@ exports[`[[Mode: combined]] Combined Tests: flip background by default 1`] = `
4343
}
4444

4545
/* inside a nested rule */
46-
[dir="ltr"] .test1 {
47-
background: url("/icons/icon-left.png") 0 100%;
48-
}
46+
.test1 {
47+
.test3 {
48+
background-image: url("/icons/icon-left.png");
49+
}
4950

50-
[dir="rtl"] .test1 {
51-
background: url("/icons/icon-left.png") 100% 100%;
51+
> .test4 {
52+
background-image: url("/icons/icon-left.png");
53+
background-position-y: 100%;
54+
}
5255
}
5356

54-
[dir="ltr"] .test2 {
55-
background-image: url("/icons/icon-left.png");
56-
background-position: 0 100%;
57-
}
57+
[dir="ltr"] .test1 {
58+
&.test2 {
59+
background: url("/icons/icon-left.png") 0 100%;
60+
}
5861

59-
[dir="rtl"] .test2 {
60-
background-image: url("/icons/icon-left.png");
61-
background-position: 100% 100%;
62-
}
62+
.test3 {
63+
background-position: 0 100%;
64+
}
6365

64-
[dir="ltr"] .test3 {
65-
background-image: url("/icons/icon-left.png");
66-
background-position-x: 0;
67-
background-position-y: 100%;
68-
}
66+
> .test4 {
67+
background-position-x: 0;
68+
}
6969

70-
[dir="rtl"] .test3 {
71-
background-image: url("/icons/icon-left.png");
72-
background-position-x: 100%;
73-
background-position-y: 100%;
70+
+ .test5 {
71+
object-position: 0 100%;
72+
}
7473
}
7574

76-
[dir="ltr"] .test4 {
77-
object-position: 0 100%;
78-
}
75+
[dir="rtl"] .test1 {
76+
&.test2 {
77+
background: url("/icons/icon-left.png") 100% 100%;
78+
}
7979

80-
[dir="rtl"] .test4 {
81-
object-position: 100% 100%;
80+
.test3 {
81+
background-position: 100% 100%;
82+
}
83+
84+
> .test4 {
85+
background-position-x: 100%;
86+
}
87+
88+
+ .test5 {
89+
object-position: 100% 100%;
90+
}
8291
}
8392

8493
/* inside a keyframe animation */

tests/__snapshots__/process-declaration-plugins/combined/noflip.snapshot

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`[[Mode: combined]] Combined Tests: use {processDeclarationPlugins} to avoid flipping background 1`] = `
3+
exports[`[[Mode: combined]] use {processDeclarationPlugins} to avoid flipping background 1`] = `
44
".test1 {
55
background: url("/icons/icon-left.png") 0 100%;
66
}
@@ -21,42 +21,25 @@ exports[`[[Mode: combined]] Combined Tests: use {processDeclarationPlugins} to
2121
}
2222

2323
/* inside a nested rule */
24-
[dir="ltr"] .test1 {
25-
background: url("/icons/icon-left.png") 0 100%;
26-
}
27-
28-
[dir="rtl"] .test1 {
29-
background: url("/icons/icon-left.png") 100% 100%;
30-
}
31-
32-
[dir="ltr"] .test2 {
33-
background-image: url("/icons/icon-left.png");
34-
background-position: 0 100%;
35-
}
36-
37-
[dir="rtl"] .test2 {
38-
background-image: url("/icons/icon-left.png");
39-
background-position: 100% 100%;
40-
}
41-
42-
[dir="ltr"] .test3 {
43-
background-image: url("/icons/icon-left.png");
44-
background-position-x: 0;
45-
background-position-y: 100%;
46-
}
24+
.test1 {
25+
&.test2 {
26+
background: url("/icons/icon-left.png") 0 100%;
27+
}
4728

48-
[dir="rtl"] .test3 {
49-
background-image: url("/icons/icon-left.png");
50-
background-position-x: 100%;
51-
background-position-y: 100%;
52-
}
29+
.test3 {
30+
background-image: url("/icons/icon-left.png");
31+
background-position: 0 100%;
32+
}
5333

54-
[dir="ltr"] .test4 {
55-
object-position: 0 100%;
56-
}
34+
> .test4 {
35+
background-image: url("/icons/icon-left.png");
36+
background-position-x: 0;
37+
background-position-y: 100%;
38+
}
5739

58-
[dir="rtl"] .test4 {
59-
object-position: 100% 100%;
40+
+ .test5 {
41+
object-position: 0 100%;
42+
}
6043
}
6144

6245
/* inside a keyframe animation */

tests/__snapshots__/process-declaration-plugins/diff/flip.snapshot

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`[[Mode: diff]] Combined Tests: flip background by default 1`] = `
3+
exports[`[[Mode: diff]] flip background by default 1`] = `
44
".test1 {
55
background: url("/icons/icon-left.png") 100% 100%;
66
}
@@ -17,6 +17,24 @@ exports[`[[Mode: diff]] Combined Tests: flip background by default 1`] = `
1717
object-position: 100% 100%;
1818
}
1919

20+
.test1 {
21+
&.test2 {
22+
background: url("/icons/icon-left.png") 100% 100%;
23+
}
24+
25+
.test3 {
26+
background-position: 100% 100%;
27+
}
28+
29+
> .test4 {
30+
background-position-x: 100%;
31+
}
32+
33+
+ .test5 {
34+
object-position: 100% 100%;
35+
}
36+
}
37+
2038
@media screen and (max-width: 800px) {
2139
.test1 {
2240
background: url("/icons/icon-left.png") 100% 100%;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`[[Mode: diff]] Combined Tests: use {processDeclarationPlugins} to avoid flipping background 1`] = `""`;
3+
exports[`[[Mode: diff]] use {processDeclarationPlugins} to avoid flipping background 1`] = `""`;

tests/__snapshots__/process-declaration-plugins/override/flip.snapshot

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`[[Mode: override]] Combined Tests: flip background by default 1`] = `
3+
exports[`[[Mode: override]] flip background by default 1`] = `
44
".test1 {
55
background: url("/icons/icon-left.png") 0 100%;
66
}
@@ -37,42 +37,43 @@ exports[`[[Mode: override]] Combined Tests: flip background by default 1`] = `
3737
}
3838

3939
/* inside a nested rule */
40-
[dir="ltr"] .test1 {
41-
background: url("/icons/icon-left.png") 0 100%;
42-
}
40+
.test1 {
41+
&.test2 {
42+
background: url("/icons/icon-left.png") 0 100%;
43+
}
4344

44-
[dir="rtl"] .test1 {
45-
background: url("/icons/icon-left.png") 100% 100%;
46-
}
45+
.test3 {
46+
background-image: url("/icons/icon-left.png");
47+
background-position: 0 100%;
48+
}
4749

48-
[dir="ltr"] .test2 {
49-
background-image: url("/icons/icon-left.png");
50-
background-position: 0 100%;
51-
}
50+
> .test4 {
51+
background-image: url("/icons/icon-left.png");
52+
background-position-x: 0;
53+
background-position-y: 100%;
54+
}
5255

53-
[dir="rtl"] .test2 {
54-
background-image: url("/icons/icon-left.png");
55-
background-position: 100% 100%;
56+
+ .test5 {
57+
object-position: 0 100%;
58+
}
5659
}
5760

58-
[dir="ltr"] .test3 {
59-
background-image: url("/icons/icon-left.png");
60-
background-position-x: 0;
61-
background-position-y: 100%;
62-
}
61+
[dir="rtl"] .test1 {
62+
&.test2 {
63+
background: url("/icons/icon-left.png") 100% 100%;
64+
}
6365

64-
[dir="rtl"] .test3 {
65-
background-image: url("/icons/icon-left.png");
66-
background-position-x: 100%;
67-
background-position-y: 100%;
68-
}
66+
.test3 {
67+
background-position: 100% 100%;
68+
}
6969

70-
[dir="ltr"] .test4 {
71-
object-position: 0 100%;
72-
}
70+
> .test4 {
71+
background-position-x: 100%;
72+
}
7373

74-
[dir="rtl"] .test4 {
75-
object-position: 100% 100%;
74+
+ .test5 {
75+
object-position: 100% 100%;
76+
}
7677
}
7778

7879
/* inside a keyframe animation */

tests/__snapshots__/process-declaration-plugins/override/noflip.snapshot

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`[[Mode: override]] Combined Tests: use {processDeclarationPlugins} to avoid flipping background 1`] = `
3+
exports[`[[Mode: override]] use {processDeclarationPlugins} to avoid flipping background 1`] = `
44
".test1 {
55
background: url("/icons/icon-left.png") 0 100%;
66
}
@@ -21,42 +21,25 @@ exports[`[[Mode: override]] Combined Tests: use {processDeclarationPlugins} to
2121
}
2222

2323
/* inside a nested rule */
24-
[dir="ltr"] .test1 {
25-
background: url("/icons/icon-left.png") 0 100%;
26-
}
27-
28-
[dir="rtl"] .test1 {
29-
background: url("/icons/icon-left.png") 100% 100%;
30-
}
31-
32-
[dir="ltr"] .test2 {
33-
background-image: url("/icons/icon-left.png");
34-
background-position: 0 100%;
35-
}
36-
37-
[dir="rtl"] .test2 {
38-
background-image: url("/icons/icon-left.png");
39-
background-position: 100% 100%;
40-
}
41-
42-
[dir="ltr"] .test3 {
43-
background-image: url("/icons/icon-left.png");
44-
background-position-x: 0;
45-
background-position-y: 100%;
46-
}
24+
.test1 {
25+
&.test2 {
26+
background: url("/icons/icon-left.png") 0 100%;
27+
}
4728

48-
[dir="rtl"] .test3 {
49-
background-image: url("/icons/icon-left.png");
50-
background-position-x: 100%;
51-
background-position-y: 100%;
52-
}
29+
.test3 {
30+
background-image: url("/icons/icon-left.png");
31+
background-position: 0 100%;
32+
}
5333

54-
[dir="ltr"] .test4 {
55-
object-position: 0 100%;
56-
}
34+
> .test4 {
35+
background-image: url("/icons/icon-left.png");
36+
background-position-x: 0;
37+
background-position-y: 100%;
38+
}
5739

58-
[dir="rtl"] .test4 {
59-
object-position: 100% 100%;
40+
+ .test5 {
41+
object-position: 0 100%;
42+
}
6043
}
6144

6245
/* inside a keyframe animation */

tests/css/input-process-declaration-plugins.css renamed to tests/css/input-process-declaration-plugins.scss

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,24 @@
1818
}
1919

2020
/* inside a nested rule */
21-
[dir="ltr"] .test1 {
22-
background: url("/icons/icon-left.png") 0 100%;
23-
}
24-
25-
[dir="rtl"] .test1 {
26-
background: url("/icons/icon-left.png") 100% 100%;
27-
}
28-
29-
[dir="ltr"] .test2 {
30-
background-image: url("/icons/icon-left.png");
31-
background-position: 0 100%;
32-
}
33-
34-
[dir="rtl"] .test2 {
35-
background-image: url("/icons/icon-left.png");
36-
background-position: 100% 100%;
37-
}
38-
39-
[dir="ltr"] .test3 {
40-
background-image: url("/icons/icon-left.png");
41-
background-position-x: 0;
42-
background-position-y: 100%;
43-
}
44-
45-
[dir="rtl"] .test3 {
46-
background-image: url("/icons/icon-left.png");
47-
background-position-x: 100%;
48-
background-position-y: 100%;
49-
}
50-
51-
[dir="ltr"] .test4 {
52-
object-position: 0 100%;
53-
}
54-
55-
[dir="rtl"] .test4 {
56-
object-position: 100% 100%;
21+
.test1 {
22+
&.test2 {
23+
background: url("/icons/icon-left.png") 0 100%;
24+
}
25+
.test3 {
26+
background-image: url("/icons/icon-left.png");
27+
background-position: 0 100%;
28+
}
29+
30+
> .test4 {
31+
background-image: url("/icons/icon-left.png");
32+
background-position-x: 0;
33+
background-position-y: 100%;
34+
}
35+
36+
+ .test5 {
37+
object-position: 0 100%;
38+
}
5739
}
5840

5941
/* inside a keyframe animation */

0 commit comments

Comments
 (0)