-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: #6963
- Loading branch information
Showing
11 changed files
with
77 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/components/src/components/button-group/test/snapshot.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { KolButtonGroupTag } from '@component-names'; | ||
// import type { ButtonGroupAPI } from '@schema'; | ||
import type { ButtonGroupProps } from '@schema'; | ||
import { executeSnapshotTests } from '@testing'; | ||
|
||
import { KolButtonGroup } from '../shadow'; | ||
import { KolButtonGroupWc } from '../component'; | ||
|
||
executeSnapshotTests(KolButtonGroupTag, [KolButtonGroup, KolButtonGroupWc], [{}]); | ||
executeSnapshotTests<ButtonGroupProps>(KolButtonGroupTag, [KolButtonGroup, KolButtonGroupWc], [{}]); |
22 changes: 0 additions & 22 deletions
22
packages/components/src/components/image/test/html.mock.ts
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
packages/components/src/components/indented-text/test/__snapshots__/snapshot.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`kol-indented-text should render with 1`] = ` | ||
<kol-indented-text class="kol-indented-text"> | ||
<template shadowrootmode="open"> | ||
<kol-indented-text-wc class="kol-indented-text-wc"> | ||
<!----> | ||
<div> | ||
<slot></slot> | ||
</div> | ||
</kol-indented-text-wc> | ||
</template> | ||
</kol-indented-text> | ||
`; |
20 changes: 0 additions & 20 deletions
20
packages/components/src/components/indented-text/test/html.mock.ts
This file was deleted.
Oops, something went wrong.
27 changes: 4 additions & 23 deletions
27
packages/components/src/components/indented-text/test/snapshot.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,8 @@ | ||
import { executeTests } from 'stencil-awesome-test'; | ||
import { KolIndentedTextTag } from '@component-names'; | ||
import type { IndentedTextProps } from '@schema'; | ||
import { executeSnapshotTests } from '@testing'; | ||
|
||
import { h } from '@stencil/core'; | ||
import { newSpecPage } from '@stencil/core/testing'; | ||
|
||
import { getIndentedTextHtml } from './html.mock'; | ||
|
||
import type { SpecPage } from '@stencil/core/testing'; | ||
import type { IndentedTextProps } from '../../../schema'; | ||
import { KolIndentedText } from '../shadow'; | ||
import { KolIndentedTextWc } from '../component'; | ||
|
||
executeTests<IndentedTextProps>( | ||
'Heading', | ||
async (props): Promise<SpecPage> => { | ||
const page = await newSpecPage({ | ||
components: [KolIndentedText, KolIndentedTextWc], | ||
template: () => <kol-indented-text {...props} />, | ||
}); | ||
return page; | ||
}, | ||
{}, | ||
getIndentedTextHtml, | ||
{ | ||
execMode: 'default', // ready | ||
}, | ||
); | ||
executeSnapshotTests<IndentedTextProps>(KolIndentedTextTag, [KolIndentedText, KolIndentedTextWc], [{}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
packages/components/src/components/span/test/__snapshots__/snapshot.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`kol-span-wc should render with _label="Text" _accessKey="v" 1`] = ` | ||
<kol-span-wc class="kol-span-wc"> | ||
<!----> | ||
<span> | ||
<span class="span-label"> | ||
Text | ||
</span> | ||
<span aria-hidden="true" class="span-label" hidden=""></span> | ||
<span aria-hidden="true" class="access-key-hint"> | ||
v | ||
</span> | ||
</span> | ||
</kol-span-wc> | ||
`; | ||
|
||
exports[`kol-span-wc should render with _label="Text" _hideLabel=true 1`] = ` | ||
<kol-span-wc class="hide-label kol-span-wc"> | ||
<!----> | ||
<span> | ||
<span aria-hidden="true" class="span-label" hidden=""></span> | ||
</span> | ||
</kol-span-wc> | ||
`; | ||
|
||
exports[`kol-span-wc should render with _label="Text" _icons="codicon codicon-home" 1`] = ` | ||
<kol-span-wc class="kol-span-wc"> | ||
<!----> | ||
<span> | ||
<kol-icon _icons="codicon codicon-home" _label="" class="icon left"></kol-icon> | ||
<span class="span-label"> | ||
Text | ||
</span> | ||
<span aria-hidden="true" class="span-label" hidden=""></span> | ||
</span> | ||
</kol-span-wc> | ||
`; | ||
|
||
exports[`kol-span-wc should render with _label="Text" 1`] = ` | ||
<kol-span-wc class="kol-span-wc"> | ||
<!----> | ||
<span> | ||
<span class="span-label"> | ||
Text | ||
</span> | ||
<span aria-hidden="true" class="span-label" hidden=""></span> | ||
</span> | ||
</kol-span-wc> | ||
`; |
32 changes: 7 additions & 25 deletions
32
packages/components/src/components/span/test/snapshot.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,11 @@ | ||
import { executeTests } from 'stencil-awesome-test'; | ||
import { KolSpanWcTag } from '@component-names'; | ||
import type { SpanProps } from '@schema'; | ||
import { executeSnapshotTests } from '@testing'; | ||
|
||
import { h } from '@stencil/core'; | ||
import { newSpecPage } from '@stencil/core/testing'; | ||
|
||
import type { SpecPage } from '@stencil/core/testing'; | ||
import type { SpanProps } from '../../../schema'; | ||
import { KolSpanWc } from '../component'; | ||
import { getSpanWcHtml } from './html.mock'; | ||
|
||
executeTests<SpanProps>( | ||
'Span', | ||
async (props): Promise<SpecPage> => { | ||
const page = await newSpecPage({ | ||
components: [KolSpanWc], | ||
template: () => <kol-span-wc {...props} />, | ||
}); | ||
return page; | ||
}, | ||
{ | ||
_icons: ['codicon codicon-home'], | ||
_hideLabel: [true, false], | ||
_label: ['Text', ''], | ||
}, | ||
getSpanWcHtml, | ||
{ | ||
execMode: 'default', // ready | ||
}, | ||
executeSnapshotTests<SpanProps>( | ||
KolSpanWcTag, | ||
[KolSpanWc], | ||
[{ _label: 'Text' }, { _label: 'Text', _accessKey: 'v' }, { _label: 'Text', _hideLabel: true }, { _label: 'Text', _icons: 'codicon codicon-home' }], | ||
); |
47 changes: 0 additions & 47 deletions
47
packages/components/src/components/split-button/test/html.mock.ts
This file was deleted.
Oops, something went wrong.