diff --git a/package.json b/package.json index 04b31e6b..fa909cf8 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "validate-versions": "node validate_versions.cjs" }, "dependencies": { - "@chili-publish/grafx-shared-components": "^0.85.9", + "@chili-publish/grafx-shared-components": "https://stgrafxstudiodevpublic.blob.core.windows.net/grafx-shared-components/dev-shared-components/449/grafx-shared-components.tgz", "@chili-publish/studio-sdk": "^1.16.0-rc.12", "axios": "^1.6.0", "react": "^18.2.0", diff --git a/src/components/shared/Panel.styles.ts b/src/components/shared/Panel.styles.ts index 9a9aa0df..532a3143 100644 --- a/src/components/shared/Panel.styles.ts +++ b/src/components/shared/Panel.styles.ts @@ -2,7 +2,7 @@ import { FontSizes, ITheme } from '@chili-publish/grafx-shared-components'; import styled from 'styled-components'; export const PanelTitle = styled.h2<{ margin?: string; panelTheme: ITheme['panel'] }>` - font-size: ${FontSizes.heading2}; + font-size: ${FontSizes.header}; font-weight: 500; ${(props) => props.margin && `margin: ${props.margin};`}; color: ${(props) => props.panelTheme.color}; diff --git a/src/components/variables/VariablesPanel.styles.ts b/src/components/variables/VariablesPanel.styles.ts index 75328ac3..04dbb8a8 100644 --- a/src/components/variables/VariablesPanel.styles.ts +++ b/src/components/variables/VariablesPanel.styles.ts @@ -12,7 +12,7 @@ export const VariablesContainer = styled.div<{ height?: string }>` height: ${(props) => props.height ?? '100%'}; `; export const TrayPanelTitle = styled.h2<{ margin?: string; panelTheme: ITheme['panel'] }>` - font-size: ${FontSizes.heading2}; + font-size: ${FontSizes.header}; font-weight: 500; ${(props) => props.margin && `margin: ${props.margin};`}; color: ${(props) => props.panelTheme.color}; diff --git a/src/tests/components/variablesComponents/imageVariable/useMediaDetails.test.ts b/src/tests/components/variablesComponents/imageVariable/useMediaDetails.test.ts index 19088340..ef4b2800 100644 --- a/src/tests/components/variablesComponents/imageVariable/useMediaDetails.test.ts +++ b/src/tests/components/variablesComponents/imageVariable/useMediaDetails.test.ts @@ -1,9 +1,9 @@ +import { ConnectorMappingDirection, Variable } from '@chili-publish/studio-sdk'; import { renderHook, waitFor } from '@testing-library/react'; import { act } from 'react-dom/test-utils'; -import { ConnectorMappingDirection, Variable } from '@chili-publish/studio-sdk'; import { useMediaDetails } from '../../../../components/variablesComponents/imageVariable/useMediaDetails'; -import { useVariablePanelContext } from '../../../../contexts/VariablePanelContext'; import { useSubscriberContext } from '../../../../contexts/Subscriber'; +import { useVariablePanelContext } from '../../../../contexts/VariablePanelContext'; import { Subscriber } from '../../../../utils/subscriber'; jest.mock('../../../../contexts/VariablePanelContext', () => ({ @@ -155,7 +155,7 @@ describe('"useMediaDetails" hook', () => { const variableChange = { id: '7377E97A-5FD9-46B1-A8CF-0C7C776C7DC2', value: '1234' } as unknown as Variable; mockSubscriber.emit('onVariableListChanged', [variableChange]); - await act(() => { + await waitFor(() => { expect(window.StudioUISDK.mediaConnector.query).toHaveBeenCalledTimes(1); }); }); @@ -181,7 +181,7 @@ describe('"useMediaDetails" hook', () => { const variableChange = { id: '2', value: '1234' } as unknown as Variable; mockSubscriber.emit('onVariableListChanged', [variableChange]); - await act(() => { + await waitFor(() => { expect(window.StudioUISDK.mediaConnector.query).toHaveBeenCalledTimes(1); }); }); @@ -207,7 +207,7 @@ describe('"useMediaDetails" hook', () => { const variableChange = { id: '8A59BB89-898D-4BAC-9C8F-F40F6C83479E', value: '1234' } as unknown as Variable; mockSubscriber.emit('onVariableListChanged', [variableChange]); - await act(() => { + await waitFor(() => { expect(window.StudioUISDK.mediaConnector.query).not.toHaveBeenCalled(); expect(result.current).toEqual(null); }); @@ -248,7 +248,7 @@ describe('"useMediaDetails" hook', () => { expect(window.StudioUISDK.mediaConnector.query).toHaveBeenCalledTimes(2); - await act(() => { + await waitFor(() => { expect(result.current).toEqual(null); }); }); @@ -288,7 +288,7 @@ describe('"useMediaDetails" hook', () => { expect(window.StudioUISDK.mediaConnector.query).toHaveBeenCalledTimes(2); - await act(() => { + await waitFor(() => { expect(result.current).toEqual({ id: 'media', name: 'name', @@ -320,7 +320,7 @@ describe('"useMediaDetails" hook', () => { expect(window.StudioUISDK.mediaConnector.query).toHaveBeenCalledWith('grafx-media', {}, {}), ); - await act(() => { + await waitFor(() => { expect(result.current).toEqual({ id: 'media', name: 'name', diff --git a/yarn.lock b/yarn.lock index ad02d2af..c7c27233 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1225,10 +1225,9 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@chili-publish/grafx-shared-components@^0.85.9": - version "0.85.9" - resolved "https://npm.pkg.github.com/download/@chili-publish/grafx-shared-components/0.85.9/8ec57b3d25442d546efb950d1fea2006a5cc161f#8ec57b3d25442d546efb950d1fea2006a5cc161f" - integrity sha512-F2TnJnPuBHptGVUmhtsLeAzhUSnserjkVhHtM6g1u4UqfmDVDUcIg4GTojNFNmYwxrq71U4DyXjnFc2salx5zw== +"@chili-publish/grafx-shared-components@https://stgrafxstudiodevpublic.blob.core.windows.net/grafx-shared-components/dev-shared-components/449/grafx-shared-components.tgz": + version "0.85.10" + resolved "https://stgrafxstudiodevpublic.blob.core.windows.net/grafx-shared-components/dev-shared-components/449/grafx-shared-components.tgz#9476e494ccf1f83e87d06277b36524764f5c0080" dependencies: "@fortawesome/fontawesome-svg-core" "^6.4.0" "@fortawesome/pro-light-svg-icons" "^6.4.0"