Skip to content

Commit

Permalink
test: update snapshots and remove duplicate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack committed Sep 16, 2024
1 parent 07a6e9a commit ce6e6b2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 49 deletions.
4 changes: 0 additions & 4 deletions e2e/components/CounterLabel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const stories = [
title: 'Primary Theme',
id: 'components-counterlabel--primary-theme',
},
{
title: 'Primary Theme',
id: 'components-counterlabel--primary-theme',
},
{
title: 'Secondary Theme',
id: 'components-counterlabel--secondary-theme',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`CounterLabel renders with secondary scheme when no "scheme" prop is provided 1`] = `
.c1:not(:focus):not(:active):not(:focus-within) {
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
.c0 {
display: inline-block;
padding: 2px 5px;
font-size: 12px;
font-weight: bold;
line-height: condensedUltra;
line-height: 1;
border-radius: 20px;
background-color: neutral.muted;
border: var(--borderWidth-thin,max(1px,0.0625rem)) solid var(--counter-borderColor,var(--color-counter-border));
color: fg.default;
}
.c0:empty {
display: none;
}
.c1 {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
-webkit-clip: rect(0,0,0,0);
clip: rect(0,0,0,0);
white-space: nowrap;
border-width: 0;
}
<div>
<span
aria-hidden="true"
class="c0"
data-scheme="secondary"
>
1234
</span>
Expand All @@ -48,39 +44,35 @@ exports[`CounterLabel renders with secondary scheme when no "scheme" prop is pro
`;

exports[`CounterLabel respects the primary "scheme" prop 1`] = `
.c1:not(:focus):not(:active):not(:focus-within) {
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
.c0 {
display: inline-block;
padding: 2px 5px;
font-size: 12px;
font-weight: bold;
line-height: condensedUltra;
line-height: 1;
border-radius: 20px;
background-color: neutral.emphasis;
border: var(--borderWidth-thin,max(1px,0.0625rem)) solid var(--counter-borderColor,var(--color-counter-border));
color: fg.onEmphasis;
}
.c0:empty {
display: none;
}
.c1 {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
-webkit-clip: rect(0,0,0,0);
clip: rect(0,0,0,0);
white-space: nowrap;
border-width: 0;
}
<div>
<span
aria-hidden="true"
class="c0"
data-scheme="primary"
>
1234
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,19 +813,6 @@ exports[`TextInputWithTokens renders a truncated set of tokens 1`] = `
flex-grow: 1;
}
.c7 {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
-webkit-clip: rect(0,0,0,0);
clip: rect(0,0,0,0);
white-space: nowrap;
border-width: 0;
}
.c9 {
font-size: 16px;
color: var(--fgColor-muted,var(--color-fg-muted,#656d76));
Expand Down Expand Up @@ -862,6 +849,19 @@ exports[`TextInputWithTokens renders a truncated set of tokens 1`] = `
font-weight: var(--base-text-weight-semibold,600);
}
.c7 {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
-webkit-clip: rect(0,0,0,0);
clip: rect(0,0,0,0);
white-space: nowrap;
border-width: 0;
}
.c0 {
font-size: 14px;
line-height: 20px;
Expand Down

0 comments on commit ce6e6b2

Please sign in to comment.