Skip to content

Commit

Permalink
fix(carbon-web-components): multiple test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffchew committed Dec 4, 2023
1 parent 12029eb commit 322b62d
Show file tree
Hide file tree
Showing 37 changed files with 261 additions and 319 deletions.
10 changes: 5 additions & 5 deletions packages/carbon-web-components/tests/snapshots/cds-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

```
<button
class="cds--btn cds--btn--lg cds--btn--primary"
class="cds--btn cds--btn--lg cds--btn--primary cds--layout--size-lg"
id="button"
part="button"
type="button"
Expand All @@ -23,7 +23,7 @@

```
<button
class="cds--btn cds--btn--lg cds--btn--primary"
class="cds--btn cds--btn--lg cds--btn--primary cds--layout--size-lg"
id="button"
part="button"
type="button"
Expand All @@ -40,7 +40,7 @@

```
<button
class="cds--btn cds--btn--lg cds--btn--primary"
class="cds--btn cds--btn--lg cds--btn--primary cds--layout--size-lg"
id="button"
part="button"
type="button"
Expand All @@ -57,7 +57,7 @@

```
<button
class="cds--btn cds--btn--lg cds--btn--primary"
class="cds--btn cds--btn--lg cds--btn--primary cds--layout--size-lg"
id="button"
part="button"
type="button"
Expand All @@ -74,7 +74,7 @@

```
<button
class="cds--btn cds--btn--lg cds--btn--primary"
class="cds--btn cds--btn--lg cds--btn--primary cds--layout--size-lg"
id="button"
part="button"
type="button"
Expand Down
109 changes: 76 additions & 33 deletions packages/carbon-web-components/tests/snapshots/cds-code-snippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,28 @@
```
<div
aria-label="code-snippet"
aria-multiline=""
aria-readonly="true"
class="cds--snippet-container"
role="textbox"
style=""
tabindex="0"
>
<code>
<pre>
<pre>
<code>
<slot>
</slot>
</pre>
</code>
</code>
</pre>
</div>
<div class="cds--snippet__overflow-indicator--right">
</div>
<cds-copy-button feedback="Copied!">
Copy to clipboard
<cds-copy-button
button-class-name=""
feedback="Copied!"
feedback-timeout="2000"
>
Copy to Clipboard
</cds-copy-button>
```
Expand All @@ -29,50 +38,72 @@
```
<div
aria-label="code-snippet"
aria-multiline="true"
aria-readonly="true"
class="cds--snippet-container"
role="textbox"
style="max-height:240px;min-height:48px;"
tabindex="0"
>
<code>
<pre>
<pre>
<code>
<slot>
</slot>
</pre>
</code>
</code>
</pre>
</div>
<cds-copy-button feedback="Copied!">
Copy to clipboard
<cds-copy-button
button-class-name=""
feedback="Copied!"
feedback-timeout="2000"
>
Copy to Clipboard
</cds-copy-button>
```

#### `Should render with minimum attributes for inline mode`

```
<cds-copy-button feedback="Copied!">
Copy to clipboard
</cds-copy-button>
<cds-copy button-class-name="cds--snippet cds--snippet--inline">
<code slot="icon">
<slot>
</slot>
</code>
<span slot="tooltip-content">
Copy to Clipboard
</span>
</cds-copy>
```

#### `Should render with various attributes for single line mode`

```
<div
aria-label="code-assistive-text-foo"
aria-label="code-snippet"
aria-multiline=""
aria-readonly="true"
class="cds--snippet-container"
role="textbox"
style=""
tabindex="0"
>
<code>
<pre>
<pre>
<code>
<slot>
</slot>
</pre>
</code>
</code>
</pre>
</div>
<cds-copy-button feedback="copy-button-feedback-text-foo">
copy-button-assistive-text-foo
<div class="cds--snippet__overflow-indicator--right">
</div>
<cds-copy-button
button-class-name=""
feedback="Copied!"
feedback-timeout="2000"
>
Copy to Clipboard
</cds-copy-button>
```
Expand All @@ -81,30 +112,43 @@

```
<div
aria-label="code-assistive-text-foo"
aria-label="code-snippet"
aria-multiline="true"
aria-readonly="true"
class="cds--snippet-container"
role="textbox"
style="max-height:240px;min-height:48px;"
tabindex="0"
>
<code>
<pre>
<pre>
<code>
<slot>
</slot>
</pre>
</code>
</code>
</pre>
</div>
<cds-copy-button feedback="copy-button-feedback-text-foo">
copy-button-assistive-text-foo
<cds-copy-button
button-class-name=""
feedback="Copied!"
feedback-timeout="2000"
>
Copy to Clipboard
</cds-copy-button>
```

#### `Should render with various attributes for inline mode`

```
<cds-copy-button feedback="copy-button-feedback-text-foo">
copy-button-assistive-text-foo
</cds-copy-button>
<cds-copy button-class-name="cds--snippet cds--snippet--inline">
<code slot="icon">
<slot>
</slot>
</code>
<span slot="tooltip-content">
Copy to Clipboard
</span>
</cds-copy>
```

Expand All @@ -126,6 +170,5 @@
</slot>
</span>
</button>
```

Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@

```
<cds-copy
button-class-name="cds--copy-btn"
feedback="Copied!"
feedback-timeout="2000"
>
<span slot="tooltip-content">
<slot>
</slot>
</span>
<slot slot="tooltip-content">
</slot>
</cds-copy>
```
Expand All @@ -21,13 +20,12 @@

```
<cds-copy
button-class-name="cds--copy-btn"
feedback="feedback-text-foo"
feedback-timeout="16"
>
<span slot="tooltip-content">
<slot>
</slot>
</span>
<slot slot="tooltip-content">
</slot>
</cds-copy>
```
Expand Down
6 changes: 3 additions & 3 deletions packages/carbon-web-components/tests/snapshots/cds-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

```
<a
class="cds--link cds--link--md"
class="cds--link"
href="about:blank"
id="link"
part="link"
Expand All @@ -29,7 +29,7 @@

```
<a
class="cds--link cds--link--md"
class="cds--link"
download="file-name-foo"
href="about:blank"
hreflang="en"
Expand Down Expand Up @@ -59,7 +59,7 @@

```
<p
class="cds--link cds--link--disabled cds--link--md"
class="cds--link cds--link--disabled"
id="link"
part="link"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<div class="cds--number__input-wrapper">
<input
aria-atomic="true"
autocomplete=""
id="input"
max="200"
min="-100"
Expand Down
72 changes: 41 additions & 31 deletions packages/carbon-web-components/tests/snapshots/cds-progress-step.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,53 @@
#### `Should render with minimum attributes`

```
<slot>
<p
aria-describedby="label-tooltip"
class="cds--progress-label"
role="button"
tabindex="0"
>
First step
</p>
</slot>
<slot name="secondary-label-text">
</slot>
<span class="cds--progress-line">
</span>
<div
class="cds--progress-step-button"
tabindex="0"
>
<slot>
<p
aria-describedby="label-tooltip"
class="cds--progress-label"
role="button"
title="First step"
>
First step
</p>
</slot>
<slot name="secondary-label-text">
</slot>
<span class="cds--progress-line">
</span>
</div>
```

#### `Should render with various attributes`

```
<slot>
<p
aria-describedby="label-tooltip"
class="cds--progress-label"
role="button"
tabindex="0"
>
First step
</p>
</slot>
<slot name="secondary-label-text">
<p class="cds--progress-optional">
secondary-label-text-foo
</p>
</slot>
<span class="cds--progress-line">
</span>
<div
class="cds--progress-step-button"
tabindex="0"
>
<slot>
<p
aria-describedby="label-tooltip"
class="cds--progress-label"
role="button"
title="First step"
>
First step
</p>
</slot>
<slot name="secondary-label-text">
<p class="cds--progress-optional">
secondary-label-text-foo
</p>
</slot>
<span class="cds--progress-line">
</span>
</div>
```

Loading

0 comments on commit 322b62d

Please sign in to comment.