Skip to content

Commit

Permalink
fix: imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dauriamarco committed Apr 18, 2024
1 parent 9af676d commit 024bd87
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
5 changes: 2 additions & 3 deletions src/components/stepper/step-label/step-label.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
@use '../../core/styles' as sbb;

// Default component properties, defined for :host. Properties which can not
// travel the shadow boundary are defined through this mixin
@include sbb.host-component-properties;
// Box-sizing rules contained in typography are not traversing Shadow DOM boundaries. We need to include box-sizing mixin in every component.
@include sbb.box-sizing;

:host {
--sbb-step-label-color: var(--sbb-color-iron);
Expand Down
2 changes: 1 addition & 1 deletion src/components/stepper/step-label/step-label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { SbbConnectedAbortController } from '../../core/controllers.js';
import { hostAttributes } from '../../core/decorators.js';
import { SbbDisabledTabIndexActionMixin } from '../../core/mixins.js';
import { SbbIconNameMixin } from '../../icon.js';
import type { SbbStepElement } from '../step/step.js';
import type { SbbStepElement } from '../step.js';
import type { SbbStepperElement } from '../stepper.js';

import style from './step-label.scss?lit&inline';
Expand Down
11 changes: 9 additions & 2 deletions src/components/stepper/step/__snapshots__/step.spec.snap.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
/* @web/test-runner snapshot v1 */
export const snapshots = {};

snapshots["sbb-step renders"] =
snapshots["sbb-step renders - Dom"] =
`<sbb-step id="sbb-step-0" role="tabpanel" slot="step">
Step content
</sbb-step>
`;
/* end snapshot sbb-step renders - Dom */

snapshots["sbb-step renders - ShadowDom"] =
`<div class="sbb-step--wrapper">
<div class="sbb-step">
<slot>
</slot>
</div>
</div>
`;
/* end snapshot sbb-step renders collapsed */
/* end snapshot sbb-step renders - ShadowDom */

snapshots["sbb-step A11y tree Chrome"] =
`<p>
Expand Down
5 changes: 2 additions & 3 deletions src/components/stepper/step/step.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
@use '../../core/styles' as sbb;

// Default component properties, defined for :host. Properties which can not
// travel the shadow boundary are defined through this mixin
@include sbb.host-component-properties;
// Box-sizing rules contained in typography are not traversing Shadow DOM boundaries. We need to include box-sizing mixin in every component.
@include sbb.box-sizing;

:host {
--sbb-step-position: initial;
Expand Down
19 changes: 12 additions & 7 deletions src/components/stepper/step/step.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ import { html } from 'lit/static-html.js';

import { fixture, testA11yTreeSnapshot } from '../../core/testing/private.js';

import type { SbbStepElement } from './step.js';
import './step.js';

describe('sbb-step', () => {
it('renders', async () => {
const root = await fixture(html`<sbb-step>Step content</sbb-step>`);
let element: SbbStepElement;

expect(root).dom.to.be.equal(
`<sbb-step id="sbb-step-0" role="tabpanel" slot="step">Step content</sbb-step>`,
);
beforeEach(async () => {
element = await fixture(html`<sbb-step>Step content</sbb-step>`);
});

it('renders - Dom', async () => {
await expect(element).dom.to.be.equalSnapshot();
});

await expect(root).shadowDom.to.be.equalSnapshot();
it('renders - ShadowDom', async () => {
await expect(element).shadowDom.to.be.equalSnapshot();
});

testA11yTreeSnapshot(html`<sbb-step>Step content</sbb-step>`);
testA11yTreeSnapshot();
});
5 changes: 2 additions & 3 deletions src/components/stepper/stepper/stepper.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
@use '../../core/styles' as sbb;

// Default component properties, defined for :host. Properties which can not
// travel the shadow boundary are defined through this mixin
@include sbb.host-component-properties;
// Box-sizing rules contained in typography are not traversing Shadow DOM boundaries. We need to include box-sizing mixin in every component.
@include sbb.box-sizing;

:host {
--sbb-stepper-orientation: row;
Expand Down
2 changes: 1 addition & 1 deletion src/components/stepper/stepper/stepper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { customElement, property } from 'lit/decorators.js';
import { SbbConnectedAbortController } from '../../core/controllers.js';
import { breakpoints, isBreakpoint } from '../../core/dom.js';
import type { SbbHorizontalFrom, SbbOrientation } from '../../core/interfaces.js';
import type { SbbStepElement, SbbStepValidateEventDetails } from '../step/step.js';
import type { SbbStepElement, SbbStepValidateEventDetails } from '../step.js';

import style from './stepper.scss?lit&inline';

Expand Down

0 comments on commit 024bd87

Please sign in to comment.