Skip to content

Commit 886a15a

Browse files
committed
Fix up duplicate edge case tests
1 parent 77b0065 commit 886a15a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

polaris-migrator/src/migrations/replace-sass-motion/tests/replace-sass-duration.input.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,14 @@
161161
.edges {
162162
/* sass calculation */
163163
transition: (legacy-polaris-v8.duration() - 33ms) fill linear 33ms;
164-
/* Using duration as the transition-delay shorthand */
164+
/* Duration comes after easing func */
165165
transition: opacity linear 0.5s;
166+
/* Duration + Delay */
166167
transition: opacity legacy-polaris-v8.duration(slower) linear
167168
legacy-polaris-v8.duration(fast);
168-
/* A shorthand that doesn't specify a duration, only transition-delay. Is this a bug? ¯\_(ツ)_/¯ Dunno. But it exists in the wild, so we have to handle it. */
169-
transition: opacity linear legacy-polaris-v8.duration(slower);
169+
/* Duration + Delay after easing func */
170+
transition: opacity linear legacy-polaris-v8.duration(slower)
171+
legacy-polaris-v8.duration(fast);
170172
/* foobar isn't a valid duration key */
171173
transition-duration: legacy-polaris-v8.duration(foobar);
172174
}

polaris-migrator/src/migrations/replace-sass-motion/tests/replace-sass-duration.output.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,12 @@
186186
/* sass calculation */
187187
/* polaris-migrator: Unable to migrate the following expression. Please upgrade manually. */
188188
transition: (legacy-polaris-v8.duration() - 33ms) fill linear 33ms;
189-
/* Using duration as the transition-delay shorthand */
189+
/* Duration comes after easing func */
190190
transition: opacity linear var(--p-duration-500);
191+
/* Duration + Delay */
191192
transition: opacity var(--p-duration-400) linear var(--p-duration-100);
192-
/* A shorthand that doesn't specify a duration, only transition-delay. Is this a bug? ¯\_(ツ)_/¯ Dunno. But it exists in the wild, so we have to handle it. */
193-
transition: opacity linear var(--p-duration-400);
193+
/* Duration + Delay after easing func */
194+
transition: opacity linear var(--p-duration-400) var(--p-duration-100);
194195
/* foobar isn't a valid duration key */
195196
/* polaris-migrator: Unable to migrate the following expression. Please upgrade manually. Unknown duration key 'foobar'. */
196197
transition-duration: legacy-polaris-v8.duration(foobar);

0 commit comments

Comments
 (0)