Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
Add more test cases
  • Loading branch information
aleen42 authored and elchininet committed May 21, 2024
commit fdc721a3a612647295fc700ecc42f108fb80aba8

This file was deleted.

174 changes: 174 additions & 0 deletions tests/__snapshots__/process-declaration-plugins/combined/flip.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`[[Mode: combined]] Combined Tests: flip background by default 1`] = `
"[dir="ltr"] .test1 {
background: url("/icons/icon-left.png") 0 100%;
}

[dir="rtl"] .test1 {
background: url("/icons/icon-left.png") 100% 100%;
}

.test2 {
background-image: url("/icons/icon-left.png");
}

[dir="ltr"] .test2 {
background-position: 0 100%;
}

[dir="rtl"] .test2 {
background-position: 100% 100%;
}

.test3 {
background-image: url("/icons/icon-left.png");
background-position-y: 100%;
}

[dir="ltr"] .test3 {
background-position-x: 0;
}

[dir="rtl"] .test3 {
background-position-x: 100%;
}

[dir="ltr"] .test4 {
object-position: 0 100%;
}

[dir="rtl"] .test4 {
object-position: 100% 100%;
}

/* inside a nested rule */
[dir="ltr"] .test1 {
background: url("/icons/icon-left.png") 0 100%;
}

[dir="rtl"] .test1 {
background: url("/icons/icon-left.png") 100% 100%;
}

[dir="ltr"] .test2 {
background-image: url("/icons/icon-left.png");
background-position: 0 100%;
}

[dir="rtl"] .test2 {
background-image: url("/icons/icon-left.png");
background-position: 100% 100%;
}

[dir="ltr"] .test3 {
background-image: url("/icons/icon-left.png");
background-position-x: 0;
background-position-y: 100%;
}

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

[dir="ltr"] .test4 {
object-position: 0 100%;
}

[dir="rtl"] .test4 {
object-position: 100% 100%;
}

/* inside a keyframe animation */
@keyframes flip1 {
from {
background: url("/icons/icon-left.png") 0 100%;
}

to {
background: url("/icons/icon-left.png") 100% 100%;
}
}

@keyframes flip2 {
from {
background-image: url("/icons/icon-left.png");
background-position: 0 100%;
}

to {
background-image: url("/icons/icon-left.png");
background-position: 100% 100%;
}
}

@keyframes flip3 {
from {
background-image: url("/icons/icon-left.png");
background-position-x: 0;
background-position-y: 100%;
}

to {
background-image: url("/icons/icon-left.png");
background-position-x: 100%;
background-position-y: 100%;
}
}

@keyframes flip4 {
from {
object-position: 0 100%;
}

to {
object-position: 100% 100%;
}
}

/* inside a media-query */
@media screen and (max-width: 800px) {
[dir="ltr"] .test1 {
background: url("/icons/icon-left.png") 0 100%;
}

[dir="rtl"] .test1 {
background: url("/icons/icon-left.png") 100% 100%;
}

.test2 {
background-image: url("/icons/icon-left.png");
}

[dir="ltr"] .test2 {
background-position: 0 100%;
}

[dir="rtl"] .test2 {
background-position: 100% 100%;
}

.test3 {
background-image: url("/icons/icon-left.png");
background-position-y: 100%;
}

[dir="ltr"] .test3 {
background-position-x: 0;
}

[dir="rtl"] .test3 {
background-position-x: 100%;
}

[dir="ltr"] .test4 {
object-position: 0 100%;
}

[dir="rtl"] .test4 {
object-position: 100% 100%;
}
}"
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`[[Mode: combined]] Combined Tests: use {processDeclarationPlugins} to avoid flipping background 1`] = `
".test1 {
background: url("/icons/icon-left.png") 0 100%;
}

.test2 {
background-image: url("/icons/icon-left.png");
background-position: 0 100%;
}

.test3 {
background-image: url("/icons/icon-left.png");
background-position-x: 0;
background-position-y: 100%;
}

.test4 {
object-position: 0 100%;
}

/* inside a nested rule */
[dir="ltr"] .test1 {
background: url("/icons/icon-left.png") 0 100%;
}

[dir="rtl"] .test1 {
background: url("/icons/icon-left.png") 100% 100%;
}

[dir="ltr"] .test2 {
background-image: url("/icons/icon-left.png");
background-position: 0 100%;
}

[dir="rtl"] .test2 {
background-image: url("/icons/icon-left.png");
background-position: 100% 100%;
}

[dir="ltr"] .test3 {
background-image: url("/icons/icon-left.png");
background-position-x: 0;
background-position-y: 100%;
}

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

[dir="ltr"] .test4 {
object-position: 0 100%;
}

[dir="rtl"] .test4 {
object-position: 100% 100%;
}

/* inside a keyframe animation */
@keyframes flip1 {
from {
background: url("/icons/icon-left.png") 0 100%;
}

to {
background: url("/icons/icon-left.png") 100% 100%;
}
}

@keyframes flip2 {
from {
background-image: url("/icons/icon-left.png");
background-position: 0 100%;
}

to {
background-image: url("/icons/icon-left.png");
background-position: 100% 100%;
}
}

@keyframes flip3 {
from {
background-image: url("/icons/icon-left.png");
background-position-x: 0;
background-position-y: 100%;
}

to {
background-image: url("/icons/icon-left.png");
background-position-x: 100%;
background-position-y: 100%;
}
}

@keyframes flip4 {
from {
object-position: 0 100%;
}

to {
object-position: 100% 100%;
}
}

/* inside a media-query */
@media screen and (max-width: 800px) {
.test1 {
background: url("/icons/icon-left.png") 0 100%;
}

.test2 {
background-image: url("/icons/icon-left.png");
background-position: 0 100%;
}

.test3 {
background-image: url("/icons/icon-left.png");
background-position-x: 0;
background-position-y: 100%;
}

.test4 {
object-position: 0 100%;
}
}"
`;
37 changes: 37 additions & 0 deletions tests/__snapshots__/process-declaration-plugins/diff/flip.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`[[Mode: diff]] Combined Tests: flip background by default 1`] = `
".test1 {
background: url("/icons/icon-left.png") 100% 100%;
}

.test2 {
background-position: 100% 100%;
}

.test3 {
background-position-x: 100%;
}

.test4 {
object-position: 100% 100%;
}

@media screen and (max-width: 800px) {
.test1 {
background: url("/icons/icon-left.png") 100% 100%;
}

.test2 {
background-position: 100% 100%;
}

.test3 {
background-position-x: 100%;
}

.test4 {
object-position: 100% 100%;
}
}"
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

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