Skip to content

Commit

Permalink
Merge branch 'feat/carbon-for-ibm-dotcom-v2' into feat/tag-link-group
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellalgilmore authored Oct 25, 2023
2 parents 6235642 + bf3361e commit a7e6777
Showing 1 changed file with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@

import { render } from 'lit/html.js';
import '../leadspace-block';
import { Default, WithVideo } from '../__stories__/leadspace-block.stories';
import { Default } from '../__stories__/leadspace-block.stories';

const DefaultTemplate = (props?) =>
Default({
LeadSpaceBlock: props,
});

const WithVideoTemplate = (props?) =>
WithVideo({
LeadSpaceBlock: props,
});

describe('c4d-leadspace-block', function () {
describe('Misc attributes - Default', function () {
it('should render with minimum attributes', async function () {
Expand All @@ -47,31 +42,6 @@ describe('c4d-leadspace-block', function () {
});
});

describe('Misc attributes - WithVideo', function () {
it('should render with minimum attributes', async function () {
render(WithVideoTemplate(), document.body);
await Promise.resolve(); // Update cycle for `<c4d-leadspace-block>`
expect(
document.body.querySelector('c4d-leadspace-block')
).toMatchSnapshot({ mode: 'shadow' });
});

it('should render with various attributes', async function () {
render(
WithVideoTemplate({
title: 'leadspace-block title',
heading: 'leadspace-block heading',
copy: 'leadspace-block copy',
}),
document.body
);
await Promise.resolve(); // Update cycle for `<c4d-leadspace-block>`
expect(
document.body.querySelector('c4d-leadspace-block')
).toMatchSnapshot({ mode: 'shadow' });
});
});

afterEach(async function () {
await render(undefined!, document.body);
});
Expand Down

0 comments on commit a7e6777

Please sign in to comment.