Skip to content

Commit

Permalink
fix(tests): fix unit test snapshots and misc fixes (#11203)
Browse files Browse the repository at this point in the history
* chore/wc-fix-style-import

* chore(cwc): add to rollup includePaths to include root node_modules

* chore(style): update all packages

* fix(web-components): updated web-components tests

* chore(jest): update snapshots

* fix(accordion): resolve merge conflict

* fix(footer): styles and add react-icons back

* fix(icons-react): bump down

* fix(filter-panel): accordion

---------

Co-authored-by: Anna Wen <[email protected]>
Co-authored-by: ariellalgilmore <[email protected]>
Co-authored-by: Jeff Chew <[email protected]>
  • Loading branch information
4 people authored Dec 7, 2023
1 parent 9817995 commit 766682c
Show file tree
Hide file tree
Showing 126 changed files with 1,332 additions and 1,022 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/carbon-web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
],
"dependencies": {
"@babel/runtime": "^7.16.3",
"@carbon/styles": "1.44.0",
"@carbon/styles": "^1.44.0",
"flatpickr": "4.6.1",
"lit": "^2.7.6",
"lodash-es": "^4.17.21"
Expand All @@ -92,7 +92,7 @@
"@babel/preset-modules": "^0.1.5",
"@babel/template": "~7.12.0",
"@babel/traverse": "~7.23.0",
"@carbon/icon-helpers": "^10.28.0",
"@carbon/icon-helpers": "^10.45.1",
"@carbon/icons": "^11.31.0",
"@open-wc/semantic-dom-diff": "~0.18.0",
"@percy-io/in-percy": "^0.1.11",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ class CDSAccordionItem extends FocusMixin(LitElement) {
)
);
}
const content = this.shadowRoot!.querySelector(`.${prefix}--accordion__wrapper`) as HTMLElement;

const content = this.shadowRoot!.querySelector(
`.${prefix}--accordion__wrapper`
) as HTMLElement;

if (this.open) {
// accordion opens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ class CDSMultiSelect extends CDSDropdown {
[`${prefix}--multi-select--invalid`]: invalid,
[`${prefix}--multi-select--warn`]: warn,
[`${prefix}--multi-select--inline`]: inline,
[`${prefix}--list-box--inline`]: inline,
[`${prefix}--multi-select--readonly`]: readOnly,
[`${prefix}--multi-select--selected`]: selectedItemsCount > 0,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ $css--plex: true !default;
.#{$prefix}--inline-notification--warning-alt;
}

/* TODO: Remove this once the following issue with icon fill is resolved:
/* TODO: Remove this once the following issue with icon fill is resolved:
** https://github.com/carbon-design-system/carbon/issues/13616
*/
.#{$prefix}--inline-notification__icon path[data-icon-path='inner-path'] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
.#{$prefix}--popover-caret {
background: $border-subtle;
}

.#{$prefix}--slug__button.#{$prefix}--slug__button--mini:focus,
.#{$prefix}--slug__button.#{$prefix}--slug__button--2xs:focus {
box-shadow: inset 0 0 0 1px $focus, inset 0 0 0 2px $focus-inset;
Expand Down
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
111 changes: 79 additions & 32 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>
<div class="cds--snippet__overflow-indicator--right">
</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>
```
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,9 @@
</slot>
</span>
</button>
<<<<<<< HEAD
=======
>>>>>>> 6575f00934 (fix(web-components): updated web-components tests)
```

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
>
</div>
</div>
<slot name="slug">
</slot>
</div>
<div
class="cds--form__helper-text"
Expand Down Expand Up @@ -101,6 +103,8 @@
>
</div>
</div>
<slot name="slug">
</slot>
</div>
<div
class="cds--form__helper-text cds--form__helper-text--disabled"
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
>
</div>
</div>
<slot name="slug">
</slot>
</div>
<div
class="cds--form__helper-text"
Expand Down Expand Up @@ -95,6 +97,8 @@
>
</div>
</div>
<slot name="slug">
</slot>
<div
aria-label=""
class="cds--list-box__menu"
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
Loading

0 comments on commit 766682c

Please sign in to comment.