@blaze-cms/react-page-builder 0.127.0-project-admin-customisations.3 → 0.128.0-admin-updates.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -8
- package/README.md +13 -0
- package/lib/components/Banner/BannerRender.js +5 -5
- package/lib/components/Banner/BannerRender.js.map +1 -1
- package/lib/components/Banner/helpers.js +2 -2
- package/lib/components/Banner/helpers.js.map +1 -1
- package/lib/components/Card/CardContainer.js +3 -3
- package/lib/components/Card/CardContainer.js.map +1 -1
- package/lib/components/Code/Code.js +7 -4
- package/lib/components/Code/Code.js.map +1 -1
- package/lib/components/Code/helpers/wrap-script-tags.js +7 -3
- package/lib/components/Code/helpers/wrap-script-tags.js.map +1 -1
- package/lib/components/ContentGroupSection/ContentGroupSection.js +7 -3
- package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib/components/Iframe/Iframe.js +51 -0
- package/lib/components/Iframe/Iframe.js.map +1 -0
- package/lib/components/Iframe/constants.js +15 -0
- package/lib/components/Iframe/constants.js.map +1 -0
- package/lib/components/Iframe/index.js +12 -0
- package/lib/components/Iframe/index.js.map +1 -0
- package/lib/components/List/components/Cards/CardsRenderItem.js +1 -1
- package/lib/components/List/components/Cards/CardsRenderItem.js.map +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib-es/components/Banner/BannerRender.js +5 -5
- package/lib-es/components/Banner/BannerRender.js.map +1 -1
- package/lib-es/components/Banner/helpers.js +2 -2
- package/lib-es/components/Banner/helpers.js.map +1 -1
- package/lib-es/components/Card/CardContainer.js +3 -3
- package/lib-es/components/Card/CardContainer.js.map +1 -1
- package/lib-es/components/Code/Code.js +8 -5
- package/lib-es/components/Code/Code.js.map +1 -1
- package/lib-es/components/Code/helpers/wrap-script-tags.js +7 -3
- package/lib-es/components/Code/helpers/wrap-script-tags.js.map +1 -1
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js +11 -6
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib-es/components/Iframe/Iframe.js +42 -0
- package/lib-es/components/Iframe/Iframe.js.map +1 -0
- package/lib-es/components/Iframe/constants.js +7 -0
- package/lib-es/components/Iframe/constants.js.map +1 -0
- package/lib-es/components/Iframe/index.js +3 -0
- package/lib-es/components/Iframe/index.js.map +1 -0
- package/lib-es/components/List/components/Cards/CardsRenderItem.js +1 -1
- package/lib-es/components/List/components/Cards/CardsRenderItem.js.map +1 -1
- package/lib-es/components/List/components/Full/FullRenderItem.js +1 -1
- package/lib-es/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib-es/components/index.js +2 -1
- package/lib-es/components/index.js.map +1 -1
- package/package.json +11 -10
- package/src/components/Banner/BannerRender.js +4 -4
- package/src/components/Banner/helpers.js +3 -3
- package/src/components/Card/CardContainer.js +3 -3
- package/src/components/Code/Code.js +6 -4
- package/src/components/Code/helpers/wrap-script-tags.js +7 -3
- package/src/components/ContentGroupSection/ContentGroupSection.js +3 -5
- package/src/components/Iframe/Iframe.js +36 -0
- package/src/components/Iframe/constants.js +4 -0
- package/src/components/Iframe/index.js +3 -0
- package/src/components/List/components/Cards/CardsRenderItem.js +1 -1
- package/src/components/List/components/Full/FullRenderItem.js +1 -1
- package/src/components/index.js +2 -1
- package/tests/unit/src/HOC/withInfiniteScroll.test.js +3 -0
- package/tests/unit/src/HOC/withTitle.test.js +5 -2
- package/tests/unit/src/Layout/Layout.test.js +4 -2
- package/tests/unit/src/Layout/getMockedProps.js +3 -0
- package/tests/unit/src/Layout/helpers/check-if-row-has-columns.test.js +4 -1
- package/tests/unit/src/Layout/helpers/get-styles-to-update.test.js +1 -1
- package/tests/unit/src/Layout/helpers/has-children.test.js +4 -1
- package/tests/unit/src/components/BackToTop/BackToTop.test.js +3 -0
- package/tests/unit/src/components/Banner/AdSlotRender.test.js +3 -0
- package/tests/unit/src/components/Banner/Banner.test.js +3 -0
- package/tests/unit/src/components/Banner/BannerRender.test.js +4 -1
- package/tests/unit/src/components/BlazeLink.test.js +3 -0
- package/tests/unit/src/components/Breadcrumb/Breadcrumb.test.js +3 -0
- package/tests/unit/src/components/Button.test.js +3 -0
- package/tests/unit/src/components/Card/Card.test.js +3 -0
- package/tests/unit/src/components/Card/CardContainer.test.js +5 -1
- package/tests/unit/src/components/Card/CardRender.test.js +3 -0
- package/tests/unit/src/components/Card/helpers/append-images.test.js +1 -1
- package/tests/unit/src/components/Card/helpers/get-dynamic-grid-classes.test.js +1 -1
- package/tests/unit/src/components/Card/helpers/getPublishedListingUrl.test.js +1 -1
- package/tests/unit/src/components/Card/helpers/useDynamicSizeKey.test.js +1 -1
- package/tests/unit/src/components/Carousel/Carousel.test.js +3 -0
- package/tests/unit/src/components/Carousel/CarouselImage/CarouselImage.test.js +4 -2
- package/tests/unit/src/components/Carousel/CarouselRender/CarouselRender.test.js +3 -0
- package/tests/unit/src/components/CarouselWrapper.test.js +3 -0
- package/tests/unit/src/components/ClickWrapper.test.js +3 -0
- package/tests/unit/src/components/Code/Code.test.js +3 -0
- package/tests/unit/src/components/Code/ScriptTag.test.js +3 -0
- package/tests/unit/src/components/Code/helpers/wrap-script-tags.test.js +1 -1
- package/tests/unit/src/components/Code.test.js +3 -0
- package/tests/unit/src/components/ContentGroup/ContentGroup.test.js +3 -0
- package/tests/unit/src/components/ContentGroup/ContentGroupTabs.test.js +3 -0
- package/tests/unit/src/components/ContentGroupSection/ContentGroupSection.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryFactory.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryRender.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/HeadingLargeSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/ItemDetailsSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/LargeSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/ListSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/TextSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/helpers/build-loop-props-content.test.js +1 -1
- package/tests/unit/src/components/DataSummary/helpers/build-props-to-display-with-content.test.js +1 -1
- package/tests/unit/src/components/DataSummary/helpers/get-data-summary-query.test.js +1 -1
- package/tests/unit/src/components/DataSummary/helpers/get-link-based-on-value.test.js +2 -2
- package/tests/unit/src/components/DataSummary/helpers/get-link-to-published-content.test.js +1 -1
- package/tests/unit/src/components/DataSummary/helpers/parse-boolean-values.test.js +1 -1
- package/tests/unit/src/components/EmailConfirm/EmailConfirm.test.js +3 -0
- package/tests/unit/src/components/Iframe/Iframe.test.js +21 -0
- package/tests/unit/src/components/Iframe/__snapshots__/Iframe.test.js.snap +21 -0
- package/tests/unit/src/components/Image/GlobalLightbox/GlobalLightbox.test.js +5 -1
- package/tests/unit/src/components/Image/GlobalLightbox/NavButton.test.js +3 -0
- package/tests/unit/src/components/Image/Image.test.js +3 -0
- package/tests/unit/src/components/Image/ImageDetails.test.js +3 -0
- package/tests/unit/src/components/Image/ImageFactory.test.js +3 -0
- package/tests/unit/src/components/Image/ImageRender.test.js +3 -0
- package/tests/unit/src/components/Image/Lightbox/Lightbox.test.js +3 -0
- package/tests/unit/src/components/ItemList/ItemListButton.test.js +3 -0
- package/tests/unit/src/components/ItemList/ItemListCounter.test.js +3 -0
- package/tests/unit/src/components/ItemList/ItemListNew.test.js +3 -0
- package/tests/unit/src/components/ItemList/helpers/set-item-list-id.test.js +3 -0
- package/tests/unit/src/components/ItemList/hooks/use-item-list-id.test.js +3 -0
- package/tests/unit/src/components/Layout/Layout.test.js +3 -0
- package/tests/unit/src/components/LazyImage/LazyImage.test.js +3 -0
- package/tests/unit/src/components/List/ListRender.test.js +3 -0
- package/tests/unit/src/components/List/components/Cards/CardsRender.test.js +3 -0
- package/tests/unit/src/components/List/components/Cards/CardsRenderItem.test.js +3 -0
- package/tests/unit/src/components/List/components/Cards/CardsRenderWrapper.test.js +3 -0
- package/tests/unit/src/components/List/components/Cards/helpers/check-if-should-render-gtm.test.js +1 -1
- package/tests/unit/src/components/List/components/Full/FullRender.test.js +3 -0
- package/tests/unit/src/components/List/components/Full/FullRenderItem.test.js +3 -0
- package/tests/unit/src/components/List/components/Header/ListHeader.test.js +3 -0
- package/tests/unit/src/components/List/components/Pagination/Classic.test.js +3 -0
- package/tests/unit/src/components/List/components/Pagination/ListPagination.test.js +3 -0
- package/tests/unit/src/components/List/components/Pagination/LoadMore.test.js +3 -0
- package/tests/unit/src/components/Menu/Menu.test.js +3 -0
- package/tests/unit/src/components/MenuItem/MenuItem.test.js +3 -0
- package/tests/unit/src/components/MenuItem/SubMenu.test.js +3 -0
- package/tests/unit/src/components/Modal/Modal.test.js +3 -0
- package/tests/unit/src/components/SearchContent/SearchContent.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/CloseMobileForm.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/MobileFormToolbar.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/ResetDesktopForm.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/SearchFilter.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilterContainer.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/components/Checkbox.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/components/Range.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/components/Select.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/components/TextSearch.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/helpers/build-new-query.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/build-raw-query-stringified.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/calculate-min-max.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/calculate-step.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/check-if-range-updated.test.js +4 -1
- package/tests/unit/src/components/SearchFilter/helpers/get-display-value.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/get-intersected-prop.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/get-range-value.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/get-select-options.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/is-device-desktop.test.js +4 -2
- package/tests/unit/src/components/SearchFilterSort/SearchFilterSort.test.js +3 -0
- package/tests/unit/src/components/SocialFollow/SFItem.test.js +3 -0
- package/tests/unit/src/components/SocialFollow/SocialFollow.test.js +3 -0
- package/tests/unit/src/components/TextBlock/TextBlock.test.js +3 -0
- package/tests/unit/src/components/Video/Video.test.js +3 -0
- package/tests/unit/src/components/Video/VideoModal.test.js +3 -0
- package/tests/unit/src/components/Video/providers/Default.test.js +3 -0
- package/tests/unit/src/components/Video/providers/JWPlayer/JWPlayerProvider.test.js +3 -0
- package/tests/unit/src/components/Video/providers/Vimeo/Vimeo.test.js +3 -0
- package/tests/unit/src/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.test.js +1 -1
- package/tests/unit/src/components/Video/providers/YouTube/YouTubeProvider.test.js +3 -0
- package/tests/unit/src/components/Wrapper.test.js +3 -0
- package/tests/unit/src/components/__snapshots__/index.test.js.snap +4 -0
- package/tests/unit/src/helpers/build-image-properties.test.js +1 -1
- package/tests/unit/src/helpers/build-inherited-filters.test.js +1 -1
- package/tests/unit/src/helpers/build-link-extra-props.test.js +1 -1
- package/tests/unit/src/helpers/build-props-query.test.js +1 -1
- package/tests/unit/src/helpers/build-query-fields.test.js +1 -1
- package/tests/unit/src/helpers/build-raw-query-base.test.js +1 -1
- package/tests/unit/src/helpers/build-raw-query.test.js +1 -1
- package/tests/unit/src/helpers/build-search-values-checkbox-select.test.js +1 -1
- package/tests/unit/src/helpers/build-search-values-text.test.js +1 -1
- package/tests/unit/src/helpers/build-set-filters.test.js +1 -1
- package/tests/unit/src/helpers/check-for-error.test.js +1 -1
- package/tests/unit/src/helpers/check-props-to-use.test.js +1 -1
- package/tests/unit/src/helpers/get-click-wrapper-options.test.js +1 -1
- package/tests/unit/src/helpers/get-current-offset.test.js +1 -1
- package/tests/unit/src/helpers/get-display-count-data.test.js +1 -1
- package/tests/unit/src/helpers/get-elasticsearch-operator.test.js +1 -1
- package/tests/unit/src/helpers/get-entity-data.test.js +1 -1
- package/tests/unit/src/helpers/get-entity-render-props.test.js +1 -1
- package/tests/unit/src/helpers/get-generic-props.test.js +1 -1
- package/tests/unit/src/helpers/get-generic-render-variables.test.js +1 -1
- package/tests/unit/src/helpers/get-image-ids.test.js +1 -1
- package/tests/unit/src/helpers/get-inherited-filters.test.js +1 -1
- package/tests/unit/src/helpers/get-not-equal-query.test.js +1 -1
- package/tests/unit/src/helpers/get-pagination-index.test.js +1 -1
- package/tests/unit/src/helpers/get-parsed-prop-values.test.js +3 -0
- package/tests/unit/src/helpers/get-parsed-summary-value.test.js +1 -1
- package/tests/unit/src/helpers/get-query-filters.test.js +1 -1
- package/tests/unit/src/helpers/get-query-props.test.js +1 -1
- package/tests/unit/src/helpers/get-required-schemas.test.js +1 -1
- package/tests/unit/src/helpers/get-search-filter-type.test.js +1 -1
- package/tests/unit/src/helpers/get-unpublished-entity-name.test.js +1 -1
- package/tests/unit/src/helpers/get-updated-filter-by.test.js +1 -1
- package/tests/unit/src/helpers/get-wrapped-value-with-link.test.js +1 -1
- package/tests/unit/src/helpers/inject-banner.test.js +3 -0
- package/tests/unit/src/helpers/is-filter-entitys-id.test.js +1 -1
- package/tests/unit/src/helpers/is-object.test.js +1 -1
- package/tests/unit/src/helpers/is-using-relation-image.test.js +1 -1
- package/tests/unit/src/helpers/parse-props-to-display.test.js +1 -1
- package/tests/unit/src/helpers/parse-textBlock.test.js +4 -1
- package/tests/unit/src/helpers/remove-extra-items.test.js +1 -1
- package/tests/unit/src/helpers/remove-unwanted-characters.test.js +1 -1
- package/tests/unit/src/helpers/render-children.test.js +4 -1
- package/tests/unit/src/helpers/should-render-waypoint.test.js +1 -1
- package/tests/unit/src/helpers/should-show-property.test.js +1 -1
- package/tests/unit/src/helpers/sort-response-data.test.js +1 -1
- package/tests/unit/src/helpers/update-childrens-parent.test.js +1 -1
- package/tests/unit/src/hooks/helpers/StoreImages.test.js +1 -1
- package/tests/unit/src/hooks/helpers/getComponent.test.js +3 -0
- package/tests/unit/src/hooks/helpers/inject-textblock-banners.test.js +1 -1
- package/tests/unit/src/hooks/use-check-mobile-screen.test.js +3 -0
- package/tests/unit/src/hooks/use-get-image-id-from-relation.test.js +5 -1
- package/tests/unit/src/hooks/use-get-images.test.js +3 -0
- package/tests/unit/src/hooks/use-get-single-entity-schema.test.js +4 -1
- package/tests/unit/src/hooks/use-page-builder.test.js +3 -0
- package/tests/unit/src/utils/component-map.test.js +3 -0
- package/tests/unit/src/utils/get-image-data.test.js +0 -1
- package/tests/unit/src/utils/get-props-to-display-modifiers.test.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import useDynamicSizeKey from '../../../../../../src/components/Card/helpers/use-dynamic-size-key';
|
|
3
3
|
|
|
4
4
|
describe('useDynamicSizeKey helper function', () => {
|
|
5
5
|
it('should return dynamicSizeKey string based on props passed', () => {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import { getMockedProvider } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
@@ -15,12 +18,11 @@ describe('Carousel image component', () => {
|
|
|
15
18
|
const mockedProps = getMockedProps();
|
|
16
19
|
let component;
|
|
17
20
|
|
|
18
|
-
beforeEach(async
|
|
21
|
+
beforeEach(async () => {
|
|
19
22
|
component = await getMockedProvider(CarouselImage, {
|
|
20
23
|
mocks: MOCK_WITH_DATA,
|
|
21
24
|
props: mockedProps
|
|
22
25
|
});
|
|
23
|
-
done();
|
|
24
26
|
});
|
|
25
27
|
|
|
26
28
|
afterEach(() => component.unmount());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import parseHTML from 'html-react-parser';
|
|
2
|
-
import
|
|
2
|
+
import wrapScriptTags from '../../../../../../src/components/Code/helpers/wrap-script-tags';
|
|
3
3
|
import ScriptTag from '../../../../../../src/components/Code/ScriptTag';
|
|
4
4
|
|
|
5
5
|
describe('wrapScriptTags helper', () => {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import HeadingLargeSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/HeadingLargeSummary';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import ItemDetailsSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/ItemDetailsSummary';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import LargeSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import ListSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary';
|
|
3
6
|
import { propsDataSummary } from '../mockData';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import TextSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary';
|
|
3
6
|
import { propsDataSummary } from '../mockData';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import buildLoopPropsContent from '../../../../../../src/components/DataSummary/helpers/build-loop-props-content';
|
|
3
3
|
import { mockedLoopProps, mockedPropsToDisplay, mockedData, mockedResults } from './mocks';
|
|
4
4
|
|
|
5
5
|
describe('buildLoopPropsContent helper function', () => {
|
package/tests/unit/src/components/DataSummary/helpers/build-props-to-display-with-content.test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import buildPropsToDisplayWithContent from '../../../../../../src/components/DataSummary/helpers/build-props-to-display-with-content';
|
|
3
3
|
|
|
4
4
|
const mockedPropsArray = ['id', 'name', 'tags.name', 'tags.id'];
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getDataSummaryQuery from '../../../../../../src/components/DataSummary/helpers/get-data-summary-query';
|
|
3
3
|
|
|
4
4
|
describe('get data summary query func', () => {
|
|
5
5
|
const data = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @jest-environment node
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import getLinkBasedOnValue from '../../../../../../src/components/DataSummary/helpers/get-link-based-on-value';
|
|
5
5
|
|
|
6
6
|
describe('Get link based on value', () => {
|
|
7
7
|
it('should be a function', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getLinkToPublishedContent from '../../../../../../src/components/DataSummary/helpers/get-link-to-published-content';
|
|
3
3
|
|
|
4
4
|
describe('get link to published content', () => {
|
|
5
5
|
const publishedKey = 'content.published';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import parseBooleanValues from '../../../../../../src/components/DataSummary/helpers/parse-boolean-values';
|
|
3
3
|
|
|
4
4
|
describe('parseBooleanValues helper function', () => {
|
|
5
5
|
it('should return the value if exists and is not a boolean', () => {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
5
|
+
import Iframe from '../../../../../src/components/Iframe/Iframe';
|
|
6
|
+
|
|
7
|
+
describe('Iframe component', () => {
|
|
8
|
+
it('should not render if no src is passed', () => {
|
|
9
|
+
const { asFragment: iFrame } = render(Iframe);
|
|
10
|
+
expect(iFrame()).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should not render otherwise', () => {
|
|
14
|
+
const { asFragment: iFrame } = render(Iframe, {
|
|
15
|
+
src: 'www.someurl.com',
|
|
16
|
+
height: '200',
|
|
17
|
+
width: '100'
|
|
18
|
+
});
|
|
19
|
+
expect(iFrame()).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Iframe component should not render if no src is passed 1`] = `<DocumentFragment />`;
|
|
4
|
+
|
|
5
|
+
exports[`Iframe component should not render otherwise 1`] = `
|
|
6
|
+
<DocumentFragment>
|
|
7
|
+
<div
|
|
8
|
+
class="iframe-container"
|
|
9
|
+
>
|
|
10
|
+
<iframe
|
|
11
|
+
height="200"
|
|
12
|
+
id="iFrameResizer0"
|
|
13
|
+
scrolling="no"
|
|
14
|
+
src="www.someurl.com"
|
|
15
|
+
style="overflow: hidden;"
|
|
16
|
+
title="iframe"
|
|
17
|
+
width="100"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</DocumentFragment>
|
|
21
|
+
`;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
1
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
6
|
import { MockedProvider } from '@apollo/client/testing';
|
|
3
7
|
import { render, act, screen, waitFor } from '@testing-library/react';
|
|
4
|
-
|
|
8
|
+
|
|
5
9
|
import { Router } from 'react-router-dom';
|
|
6
10
|
import { createMemoryHistory } from 'history';
|
|
7
11
|
import GlobalLightbox from '../../../../../../src/components/Image/GlobalLightbox/GlobalLightbox';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
5
|
import setItemListId from '../../../../../../src/components/ItemList/helpers/set-item-list-id';
|
|
3
6
|
import { LIST_ITEM_LOCAL_KEY } from '../../../../../../src/components/ItemList/constants';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { renderHook, act } from '@testing-library/react-hooks';
|
|
2
5
|
import useItemListId from '../../../../../../src/components/ItemList/hooks/use-item-list-id';
|
|
3
6
|
import getItemListId from '../../../../../../src/components/ItemList/helpers/get-item-list-id';
|
package/tests/unit/src/components/List/components/Cards/helpers/check-if-should-render-gtm.test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import checkIfShouldRenderGtm from '../../../../../../../../src/components/List/components/helpers/check-if-should-render-gtm';
|
|
2
2
|
|
|
3
3
|
describe('should render gtm children helper', () => {
|
|
4
4
|
const noItemsPerPage = checkIfShouldRenderGtm(0, 0, 0);
|