Skip to content
Snippets Groups Projects
Commit fa89af0b authored by Markus Kalijärvi's avatar Markus Kalijärvi
Browse files

Fixed failing tests.

parent b9efcf41
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ export class HyKeyFigureGroup implements ComponentInterface {
}
getBoxClassName(count) {
var className = 'box';
let className = 'box';
if (count % 3 == 0) {
className = 'box-3';
......
import {newSpecPage} from '@stencil/core/testing';
import {HyKeyFigureGroup} from './hy-key-figure-group';
import {HyKeyFigureGroup} from '../hy-key-figure-group';
describe('hy-key-figure-group', () => {
it('renders', async () => {
const page = await newSpecPage({
components: [HyKeyFigureGroup],
html: `<hy-key-figure-group></hy-key-figure-group>`
html: `<hy-key-figure-group data-items='[{"heading":"a","description":"b"}]'></hy-key-figure-group>`
});
expect(page.root).toEqualHtml(`
<hy-key-figure-group>
<hy-key-figure-group data-items="[{&quot;heading&quot;:&quot;a&quot;,&quot;description&quot;:&quot;b&quot;}]">
<mock:shadow-root>
<slot></slot>
<div class="big hy-key-figure-group-container">
<div class="hy-key-figure-group">
<hy-key-figure class="box" description="b" heading="a" variant="big"></hy-key-figure>
</div>
</div>
</mock:shadow-root>
</hy-key-figure-group>
`);
......
import {newSpecPage} from '@stencil/core/testing';
import {HyKeyFigure} from './hy-key-figure';
import {HyKeyFigure} from '../hy-key-figure';
describe('hy-key-figure', () => {
it('renders', async () => {
......@@ -10,7 +10,10 @@ describe('hy-key-figure', () => {
expect(page.root).toEqualHtml(`
<hy-key-figure>
<mock:shadow-root>
<slot></slot>
<div class="big hy-key-figure">
<div class="hy-key-figure__title"></div>
<div class="hy-key-figure__description"></div>
</div>
</mock:shadow-root>
</hy-key-figure>
`);
......
import {newSpecPage} from '@stencil/core/testing';
import {HyKeyHighlightGroup} from './hy-key-highlight-group';
import {HyKeyHighlightGroup} from '../hy-key-highlight-group';
describe('hy-key-highlight-group', () => {
it('renders', async () => {
const page = await newSpecPage({
components: [HyKeyHighlightGroup],
html: `<hy-key-highlight-group></hy-key-highlight-group>`
html: `<hy-key-highlight-group data-items='[{"heading":"a","description":"b"}]'></hy-key-highlight-group>`
});
expect(page.root).toEqualHtml(`
<hy-key-highlight-group>
<hy-key-highlight-group data-items="[{&quot;heading&quot;:&quot;a&quot;,&quot;description&quot;:&quot;b&quot;}]">
<mock:shadow-root>
<slot></slot>
<div class="big hy-key-highlight-group">
<hy-key-highlight class="box" description="b" heading="a" variant="big"></hy-key-highlight>
</div>
</mock:shadow-root>
</hy-key-highlight-group>
`);
......
import {newSpecPage} from '@stencil/core/testing';
import {HyKeyHighlight} from './hy-key-highlight';
import {HyKeyHighlight} from '../hy-key-highlight';
describe('hy-key-highlight', () => {
it('renders', async () => {
......@@ -10,7 +10,15 @@ describe('hy-key-highlight', () => {
expect(page.root).toEqualHtml(`
<hy-key-highlight>
<mock:shadow-root>
<slot></slot>
<div class="big hy-key-highlight">
<div class="hy-key-highlight__title__container">
<div class="hy-key-highlight__title"></div>
<div class="hy-key-highlight__overlay--container">
<div class="hy-key-highlight__overlay"></div>
</div>
</div>
<div class="hy-key-highlight__description"></div>
</div>
</mock:shadow-root>
</hy-key-highlight>
`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment