Skip to content

Commit 19322b7

Browse files
committed
fix: re-enable Jest test for tabs + update snapshot
1 parent 09f9414 commit 19322b7

File tree

3 files changed

+233
-42
lines changed

3 files changed

+233
-42
lines changed

packages/components/bolt-tabs/__tests__/__snapshots__/tabs.js.snap

Lines changed: 176 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ exports[`Bolt Tabs Web Component usage (Light DOM) 2`] = `
499499
<bolt-trigger
500500
aria-controls="tab-panel-12345-1"
501501
aria-selected="true"
502-
class="c-bolt-tabs__label c-bolt-tabs__label--spacing-small"
502+
class="c-bolt-tabs__label c-bolt-tabs__item c-bolt-tabs__label--spacing-small"
503+
display="inline"
503504
id="tab-12345-1"
504505
no-outline=""
505506
role="tab"
@@ -532,7 +533,8 @@ exports[`Bolt Tabs Web Component usage (Light DOM) 2`] = `
532533
<bolt-trigger
533534
aria-controls="tab-panel-12345-2"
534535
aria-selected="false"
535-
class="c-bolt-tabs__label c-bolt-tabs__label--spacing-small"
536+
class="c-bolt-tabs__label c-bolt-tabs__item c-bolt-tabs__label--spacing-small"
537+
display="inline"
536538
id="tab-12345-2"
537539
no-outline=""
538540
role="tab"
@@ -565,7 +567,8 @@ exports[`Bolt Tabs Web Component usage (Light DOM) 2`] = `
565567
<bolt-trigger
566568
aria-controls="tab-panel-12345-3"
567569
aria-selected="false"
568-
class="c-bolt-tabs__label c-bolt-tabs__label--spacing-small"
570+
class="c-bolt-tabs__label c-bolt-tabs__item c-bolt-tabs__label--spacing-small"
571+
display="inline"
569572
id="tab-12345-3"
570573
no-outline=""
571574
role="tab"
@@ -593,6 +596,176 @@ exports[`Bolt Tabs Web Component usage (Light DOM) 2`] = `
593596
594597
595598
<!---->
599+
600+
601+
<div
602+
class="c-bolt-tabs__item c-bolt-tabs__show-more is-invisible"
603+
style=""
604+
>
605+
606+
607+
<button
608+
aria-expanded="false"
609+
aria-haspopup="true"
610+
class="c-bolt-tabs__button c-bolt-tabs__show-button"
611+
style=""
612+
type="button"
613+
>
614+
615+
616+
<span
617+
class="c-bolt-tabs__show-text"
618+
style=""
619+
>
620+
621+
More
622+
623+
</span>
624+
625+
626+
<span
627+
class="c-bolt-tabs__show-icon"
628+
style=""
629+
>
630+
631+
632+
<bolt-icon
633+
name="chevron-down"
634+
style=""
635+
/>
636+
637+
638+
</span>
639+
640+
641+
</button>
642+
643+
644+
<div
645+
class="c-bolt-tabs__dropdown"
646+
style=""
647+
>
648+
649+
650+
<div
651+
class="c-bolt-tabs__dropdown-list"
652+
style=""
653+
>
654+
655+
656+
<!---->
657+
658+
659+
<bolt-trigger
660+
aria-controls="tab-panel-12345-1"
661+
aria-selected="true"
662+
class="c-bolt-tabs__label c-bolt-tabs__item c-bolt-tabs__label--spacing-small c-bolt-tabs__label--is-duplicate c-bolt-tabs__label--vertical-border"
663+
display="block"
664+
id="tab-dropdown-12345-1"
665+
no-outline=""
666+
role="tab"
667+
style=""
668+
tabindex="0"
669+
>
670+
671+
672+
<span
673+
class="c-bolt-tabs__label-inner"
674+
style=""
675+
>
676+
<span
677+
class="c-bolt-tabs__label-text"
678+
style=""
679+
>
680+
<!---->
681+
Tab label 1
682+
<!---->
683+
</span>
684+
</span>
685+
686+
687+
</bolt-trigger>
688+
689+
690+
<!---->
691+
692+
693+
<bolt-trigger
694+
aria-controls="tab-panel-12345-2"
695+
aria-selected="false"
696+
class="c-bolt-tabs__label c-bolt-tabs__item c-bolt-tabs__label--spacing-small c-bolt-tabs__label--is-duplicate c-bolt-tabs__label--vertical-border"
697+
display="block"
698+
id="tab-dropdown-12345-2"
699+
no-outline=""
700+
role="tab"
701+
style=""
702+
tabindex="-1"
703+
>
704+
705+
706+
<span
707+
class="c-bolt-tabs__label-inner"
708+
style=""
709+
>
710+
<span
711+
class="c-bolt-tabs__label-text"
712+
style=""
713+
>
714+
<!---->
715+
Tab label 2
716+
<!---->
717+
</span>
718+
</span>
719+
720+
721+
</bolt-trigger>
722+
723+
724+
<!---->
725+
726+
727+
<bolt-trigger
728+
aria-controls="tab-panel-12345-3"
729+
aria-selected="false"
730+
class="c-bolt-tabs__label c-bolt-tabs__item c-bolt-tabs__label--spacing-small c-bolt-tabs__label--is-duplicate c-bolt-tabs__label--vertical-border"
731+
display="block"
732+
id="tab-dropdown-12345-3"
733+
no-outline=""
734+
role="tab"
735+
style=""
736+
tabindex="-1"
737+
>
738+
739+
740+
<span
741+
class="c-bolt-tabs__label-inner"
742+
style=""
743+
>
744+
<span
745+
class="c-bolt-tabs__label-text"
746+
style=""
747+
>
748+
<!---->
749+
Tab label 3
750+
<!---->
751+
</span>
752+
</span>
753+
754+
755+
</bolt-trigger>
756+
757+
758+
<!---->
759+
760+
761+
</div>
762+
763+
764+
</div>
765+
766+
767+
</div>
768+
596769
597770
598771
</div>

packages/components/bolt-tabs/__tests__/tabs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('Bolt Tabs', () => {
9999
expect(renderedHTML).toMatchSnapshot();
100100
});
101101

102-
test.skip('Web Component usage (Light DOM)', async () => {
102+
test('Web Component usage (Light DOM)', async () => {
103103
const tabsOuter = await page.evaluate(tabsInnerHTML => {
104104
const wrapper = document.createElement('div');
105105
wrapper.innerHTML = tabsInnerHTML;

0 commit comments

Comments
 (0)