@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
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
RAW_QUERY_STRINGIFIED,
|
|
4
4
|
RAW_QUERY_STRINGIFIED_WITH_RANGE
|
|
5
5
|
} from '../../../../../helpers/mocks';
|
|
6
|
-
import
|
|
6
|
+
import buildRawQueryStringified from '../../../../../../src/components/SearchFilter/helpers/build-raw-query-stringified';
|
|
7
7
|
|
|
8
8
|
const mockedArgs = {
|
|
9
9
|
checkboxSelectValues: ['tags.name', 'category.name'],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import calculateMinMax from '../../../../../../src/components/SearchFilter/helpers/calculate-min-max';
|
|
3
3
|
|
|
4
4
|
describe('calculate min max', () => {
|
|
5
5
|
const simpleExample = calculateMinMax({ min: 0, max: 10 }, 5);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import calculateStep from '../../../../../../src/components/SearchFilter/helpers/calculate-step';
|
|
3
3
|
|
|
4
4
|
describe('calculate step', () => {
|
|
5
5
|
const step = calculateStep(13, 5);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
5
|
+
import checkIfRangeUpdated from '../../../../../../src/components/SearchFilter/helpers/check-if-range-updated';
|
|
3
6
|
|
|
4
7
|
describe('check if range updated', () => {
|
|
5
8
|
const rangeUpdated = checkIfRangeUpdated({ minValue: 0, maxValue: 15 }, 2, 15);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getDisplayValue from '../../../../../../src/components/SearchFilter/helpers/get-display-value';
|
|
3
3
|
|
|
4
4
|
const PRICE = 'price';
|
|
5
5
|
const ID = { id: { type: 'string' } };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getIntersectedProp from '../../../../../../src/components/SearchFilter/helpers/get-intersected-prop';
|
|
3
3
|
|
|
4
4
|
describe('get intersected prop', () => {
|
|
5
5
|
const intersectedPropNoMatch = getIntersectedProp({}, ['priceUsd']);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getRangeValue from '../../../../../../src/components/SearchFilter/helpers/get-range-value';
|
|
3
3
|
|
|
4
4
|
describe('get range value function', () => {
|
|
5
5
|
const noRawQueryProp = getRangeValue(null, 5, 15, 130);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getSelectOptions from '../../../../../../src/components/SearchFilter/helpers/get-select-options';
|
|
3
3
|
|
|
4
4
|
describe('get select options', () => {
|
|
5
5
|
const propsToDisplay = ['priceUsd', 'priceEur'];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
import isDeviceDesktop from '../../../../../../src/components/SearchFilter/helpers/is-device-desktop';
|
|
3
5
|
import { TABLET_WIDTH } from '../../../../../../src/components/SearchFilter/constants';
|
|
4
6
|
|
|
5
7
|
describe('check device function', () => {
|
package/tests/unit/src/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import addExtraParamsToUrl from '../../../../../../../../src/components/Video/providers/Vimeo/helpers/add-extra-params-to-url';
|
|
3
3
|
|
|
4
4
|
const mockUrl = 'https://www.vimeo.com/12938920';
|
|
5
5
|
|
|
@@ -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 YouTubeProvider from '../../../../../../../src/components/Video/providers/YouTube/YouTubeProvider';
|
|
@@ -50,6 +50,10 @@ Object {
|
|
|
50
50
|
"$$typeof": Symbol(react.forward_ref),
|
|
51
51
|
"render": [Function],
|
|
52
52
|
},
|
|
53
|
+
"iframe": Object {
|
|
54
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
55
|
+
"render": [Function],
|
|
56
|
+
},
|
|
53
57
|
"image": Object {
|
|
54
58
|
"$$typeof": Symbol(react.forward_ref),
|
|
55
59
|
"render": [Function],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
2
|
import BlazeLink from '../../../../src/components/BlazeLink';
|
|
3
|
-
import
|
|
3
|
+
import buildImageProperties from '../../../../src/helpers/build-image-properties';
|
|
4
4
|
|
|
5
5
|
describe('buildImageProperties function', () => {
|
|
6
6
|
let imageProperties = buildImageProperties({});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import buildLinkExtraProps from '../../../../src/helpers/build-link-extra-props';
|
|
3
3
|
import { GTM_DATA_ID_ATTR } from '../../../../src/constants';
|
|
4
4
|
|
|
5
5
|
const mockedProps = [
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
RAW_QUERY_WITH_QUERY_FILTERS
|
|
13
13
|
} from '../../../helpers/mocks';
|
|
14
14
|
import { OR, AND } from '../../../../src/constants';
|
|
15
|
-
import
|
|
15
|
+
import buildRawQueryBase from '../../../../src/helpers/build-raw-query-base';
|
|
16
16
|
|
|
17
17
|
const tagIds = ['id1', 'id2'];
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
RAW_QUERY_WITH_AGGS
|
|
24
24
|
} from '../../../helpers/mocks';
|
|
25
25
|
import { AND, OR } from '../../../../src/constants';
|
|
26
|
-
import
|
|
26
|
+
import buildRawQuery from '../../../../src/helpers/build-raw-query';
|
|
27
27
|
|
|
28
28
|
const searchValuesCheckboxOr = [{ match: { name: 'someName' } }, { match: { name: 'another' } }];
|
|
29
29
|
const filterData = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
2
|
import { AND, OR } from '../../../../src/constants';
|
|
3
|
-
import
|
|
3
|
+
import buildSearchValuesCheckboxSelect from '../../../../src/helpers/build-search-values-checkbox-select';
|
|
4
4
|
|
|
5
5
|
const mockedArgs = {
|
|
6
6
|
query: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import buildSetFilters from '../../../../src/helpers/build-set-filters';
|
|
3
3
|
|
|
4
4
|
const tagFilterByProperty = 'tagIds/tag';
|
|
5
5
|
const getMockedArgs = overrides => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getDisplayCountData from '../../../../src/helpers/get-display-count-data';
|
|
3
3
|
import { IMAGE, IMAGES } from '../../../../src/constants';
|
|
4
4
|
|
|
5
5
|
describe('get display count data', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getElasticsearchOperator from '../../../../src/helpers/get-elasticsearch-operator';
|
|
3
3
|
|
|
4
4
|
describe('get Elasticsearch operator', () => {
|
|
5
5
|
it('should be a function', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getGenericRenderVariables from '../../../../src/helpers/get-generic-render-variables';
|
|
3
3
|
|
|
4
4
|
const IS_TEXT_SEARCH_FILTER_APPLIED_TRUE = true;
|
|
5
5
|
const IS_TEXT_SEARCH_FILTER_APPLIED_FALSE = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getInheritedFilters from '../../../../src/helpers/get-inherited-filters';
|
|
3
3
|
|
|
4
4
|
const filterBy = ['name/some name', 'category.name/category-1'];
|
|
5
5
|
const filterByProperty = ['name/page', 'category.name/category', 'brokers.metaTitle/brokers'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getPaginationIndex from '../../../../src/helpers/get-pagination-index';
|
|
3
3
|
|
|
4
4
|
const mockedArgs = [
|
|
5
5
|
[{ [`pb[list-1][page]`]: 17, someOtherQuery: 'yes' }, 'list-1'],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getParsedSummaryValue from '../../../../src/helpers/get-parsed-summary-value';
|
|
3
3
|
|
|
4
4
|
describe('get parsed summary value func', () => {
|
|
5
5
|
it('should be a function', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MOCKED_SCHEMA_FOR_FILTERS } from '../../../helpers/mocks';
|
|
2
|
-
import
|
|
2
|
+
import getQueryProps from '../../../../src/helpers/get-query-props';
|
|
3
3
|
|
|
4
4
|
const inheritedFilters = ['category.name/category'];
|
|
5
5
|
const inheritedFiltersMoreData = ['authors.firstname/author', 'tags.name/tag'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getUnpublishedEntityName from '../../../../src/helpers/get-unpublished-entity-name';
|
|
3
3
|
|
|
4
4
|
describe('get sanitized entity name', () => {
|
|
5
5
|
const empty = getUnpublishedEntityName('');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MOCKED_INFINITE_SCROLL_PROPS, MOCKED_SCHEMA_FOR_FILTERS } from '../../../helpers/mocks';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import getUpdatedFilterBy from '../../../../src/helpers/get-updated-filter-by';
|
|
4
4
|
|
|
5
5
|
const mockedProps = [
|
|
6
6
|
['category.name/category', 'tags.name/tag', 'metaTitle', 'exhibitorIds/exhibitor'],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getWrappedValueWithLink from '../../../../src/helpers/get-wrapped-value-with-link';
|
|
3
3
|
|
|
4
4
|
describe('get wrapped value with link func', () => {
|
|
5
5
|
const value = 'test-value';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import isUsingRelationImage from '../../../../src/helpers/is-using-relation-image';
|
|
3
3
|
|
|
4
4
|
describe('is using relation image', () => {
|
|
5
5
|
it('should be a function', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import parsePropsToDisplay from '../../../../src/helpers/parse-props-to-display';
|
|
3
3
|
|
|
4
4
|
const mockedPropsToDisplayStringArr = ['name', 'other', 'cat.name', 'tag.name'];
|
|
5
5
|
const mockedPropsToDisplayObjectArr = [
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
2
4
|
import React from 'react';
|
|
5
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
4
7
|
import parseTextBlock from '../../../../src/helpers/parse-TextBlock';
|
|
5
8
|
import BlazeLink from '../../../../src/components/BlazeLink';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import removeExtraItems from '../../../../src/helpers/remove-extra-items';
|
|
3
3
|
|
|
4
4
|
describe('Remove extra items', () => {
|
|
5
5
|
const data = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
|
-
import
|
|
6
|
+
import renderChildren from '../../../../src/helpers/render-children';
|
|
4
7
|
|
|
5
8
|
const mocks = [
|
|
6
9
|
<span className="span-child" modifier="has-modifier">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import shouldShowProperty from '../../../../src/helpers/should-show-property';
|
|
3
3
|
|
|
4
4
|
describe('shouldShowProperty function', () => {
|
|
5
5
|
it('should be a function', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import sortResponseData from '../../../../src/helpers/sort-response-data';
|
|
3
3
|
import { MOCKED_SORT_DATA, MOCKED_SORT_IDS, MOCKED_SORT_RESULTS } from '../../../helpers/mocks';
|
|
4
4
|
|
|
5
5
|
describe('sort response data function', () => {
|