Skip to content

Commit

Permalink
[Fix] Update to newly shared components version (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
psamusev authored Dec 9, 2024
1 parent bef5342 commit 8b5c9b4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@babel/preset-env": "^7.25.3",
"@chili-publish/grafx-shared-components": "^0.88.5",
"@chili-publish/grafx-shared-components": "^0.88.7",
"@chili-publish/studio-sdk": "^1.17.2-rc.1",
"@fortawesome/fontawesome-svg-core": "^6.7.1",
"@fortawesome/pro-light-svg-icons": "^6.7.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/Panel.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/components/variables/VariablesPanel.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
Original file line number Diff line number Diff line change
@@ -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', () => ({
Expand Down Expand Up @@ -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);
});
});
Expand All @@ -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);
});
});
Expand All @@ -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);
});
Expand Down Expand Up @@ -248,7 +248,7 @@ describe('"useMediaDetails" hook', () => {

expect(window.StudioUISDK.mediaConnector.query).toHaveBeenCalledTimes(2);

await act(() => {
await waitFor(() => {
expect(result.current).toEqual(null);
});
});
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1307,10 +1307,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@chili-publish/grafx-shared-components@^0.88.5":
version "0.88.5"
resolved "https://npm.pkg.github.com/download/@chili-publish/grafx-shared-components/0.88.5/aa968330c77f12967edc411be95b22d8e5d8db32#aa968330c77f12967edc411be95b22d8e5d8db32"
integrity sha512-zYxlrDmrG/zRTjjJ6rEy4vyd0b4rK6EilTTokjq7XE2P9xS0lb3GuYSgIwrTEC37ptOaZladwOpo/NNl17F0rw==
"@chili-publish/grafx-shared-components@^0.88.7":
version "0.88.7"
resolved "https://npm.pkg.github.com/download/@chili-publish/grafx-shared-components/0.88.7/45252dbd33710f882c1aaf10261388490fc1d74c#45252dbd33710f882c1aaf10261388490fc1d74c"
integrity sha512-zTI0QC4UevhkkHvKnfpSFjGYpb7fwd3Fd340CmRJ1zCTWqjmpgijgLy/guotXlGqlXMabEwf4dlaqu8Sg+J4Ew==

"@chili-publish/studio-sdk@^1.17.2-rc.1":
version "1.17.2-rc.1"
Expand Down

0 comments on commit 8b5c9b4

Please sign in to comment.