diff --git a/src/ec/packages/ec-component-breadcrumb-core/adapter.js b/src/ec/packages/ec-component-breadcrumb-core/adapter.js index 99607405a..ff4a53a0d 100644 --- a/src/ec/packages/ec-component-breadcrumb-core/adapter.js +++ b/src/ec/packages/ec-component-breadcrumb-core/adapter.js @@ -7,6 +7,7 @@ const adapter = initialData => { adaptedData.links = adaptedData.items.map(formatLinkAlt); adaptedData.navigation_text = adaptedData.label; adaptedData.icon_file_path = '/icons.svg'; + adaptedData.ellipsis_label = 'Click to expand'; delete adaptedData.label; delete adaptedData.items; diff --git a/src/ec/packages/ec-component-breadcrumb-core/breadcrumb-core.story.js b/src/ec/packages/ec-component-breadcrumb-core/breadcrumb-core.story.js index 756b6412f..ed7fd0546 100644 --- a/src/ec/packages/ec-component-breadcrumb-core/breadcrumb-core.story.js +++ b/src/ec/packages/ec-component-breadcrumb-core/breadcrumb-core.story.js @@ -19,7 +19,6 @@ storiesOf('Components/Navigation/Breadcrumbs/Breadcrumb Core', module) breadcrumb( merge(dataSimple, { icon_file_path: defaultSprite, - ellipsis_label: 'Click to expand', }) ), { @@ -32,7 +31,6 @@ storiesOf('Components/Navigation/Breadcrumbs/Breadcrumb Core', module) breadcrumb( merge(dataLong, { icon_file_path: defaultSprite, - ellipsis_label: 'Click to expand', }) ), { diff --git a/src/ec/packages/ec-component-breadcrumb-core/breadcrumb-core.test.js b/src/ec/packages/ec-component-breadcrumb-core/breadcrumb-core.test.js index 0bbbff97b..de12f18f2 100644 --- a/src/ec/packages/ec-component-breadcrumb-core/breadcrumb-core.test.js +++ b/src/ec/packages/ec-component-breadcrumb-core/breadcrumb-core.test.js @@ -9,19 +9,16 @@ describe('EC - Breadcrumb Core', () => { const render = params => renderTwigFileAsNode(template, params); describe('Simple', () => { - const data = merge(dataSimple, { - ellipsis_label: 'Click to expand', - }); - test(`renders correctly`, () => { expect.assertions(1); - return expect(render(data)).resolves.toMatchSnapshot(); + + return expect(render(dataSimple)).resolves.toMatchSnapshot(); }); test('renders correctly with extra class names', () => { expect.assertions(1); - const optionsWithExtraClasses = merge(data, { + const optionsWithExtraClasses = merge(dataSimple, { extra_classes: 'custom-class custom-class--test', }); @@ -31,7 +28,7 @@ describe('EC - Breadcrumb Core', () => { test('renders correctly with extra attributes', () => { expect.assertions(1); - const optionsWithExtraClasses = merge(data, { + const optionsWithExtraClasses = merge(dataSimple, { extra_attributes: [ { name: 'data-test', value: 'data-test-value' }, { name: 'data-test-1', value: 'data-test-value-1' }, @@ -43,22 +40,15 @@ describe('EC - Breadcrumb Core', () => { }); describe('Long', () => { - const data = merge(dataLong, { - extra_attributes: [ - { name: 'data-ecl-auto-init', value: 'BreadcrumbCore' }, - ], - ellipsis_label: 'Click to expand', - }); - test(`renders correctly`, () => { expect.assertions(1); - return expect(render(data)).resolves.toMatchSnapshot(); + return expect(render(dataLong)).resolves.toMatchSnapshot(); }); test('renders correctly with extra class names', () => { expect.assertions(1); - const optionsWithExtraClasses = merge(data, { + const optionsWithExtraClasses = merge(dataLong, { extra_classes: 'custom-class custom-class--test', }); @@ -68,7 +58,7 @@ describe('EC - Breadcrumb Core', () => { test('renders correctly with extra attributes', () => { expect.assertions(1); - const optionsWithExtraClasses = merge(data, { + const optionsWithExtraClasses = merge(dataLong, { extra_attributes: [ { name: 'data-test', value: 'data-test-value' }, { name: 'data-test-1', value: 'data-test-value-1' }, diff --git a/src/ec/packages/ec-component-page-header-core/__snapshots__/page-header-core.test.js.snap b/src/ec/packages/ec-component-page-header-core/__snapshots__/page-header-core.test.js.snap index 4d0ae376d..1a6cd3e75 100644 --- a/src/ec/packages/ec-component-page-header-core/__snapshots__/page-header-core.test.js.snap +++ b/src/ec/packages/ec-component-page-header-core/__snapshots__/page-header-core.test.js.snap @@ -42,7 +42,7 @@ exports[`EC - Page Header Core meta-title - renders correctly 1`] = ` data-ecl-breadcrumb-core-ellipsis="" >