Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 517d892

Browse files
authored
chore: Moved styles inline for components in client package. (#3598)
* Renamed components, hooks, Onboarding only * Reverting changed from yar build * Renamed components, hooks, Onboarding only * Reverting changed from yar build * Fixing lint issues * test import fixes * Have to rename to fix case of file name * Fixing case with another commit. * Renamed components, hooks, Onboarding only * Renamed components, hooks, Onboarding only * Fixing lint issues * test import fixes * Have to rename to fix case of file name * Fixing case with another commit. * Fixing imports * Index file renames Part 2 * Inlined styles in ts * Fixed test mocks
1 parent b7ad1c9 commit 517d892

87 files changed

Lines changed: 1308 additions & 1410 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Composer/packages/client/__tests__/components/CreationFlow/CreateOptions/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as React from 'react';
55
import { fireEvent } from '@bfc/test-utils';
66

77
import { renderWithStore } from '../../../testUtils';
8-
import { CreateOptions } from '../../../../src/components/CreationFlow/CreateOptions/CreateOptions';
8+
import { CreateOptions } from '../../../../src/components/CreationFlow/CreateOptions';
99

1010
describe('<CreateOptions/>', () => {
1111
const handleDismissMock = jest.fn();

Composer/packages/client/__tests__/components/CreationFlow/DefineConversation/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { fireEvent } from '@bfc/test-utils';
66

77
import { renderWithStore } from '../../../testUtils';
88
import { StorageFolder } from '../../../../src/store/types';
9-
import DefineConversation from '../../../../src/components/CreationFlow/DefineConversation/DefineConversation';
9+
import DefineConversation from '../../../../src/components/CreationFlow/DefineConversation';
1010

1111
describe('<DefineConversation/>', () => {
1212
const onCurrentPathUpdateMock = jest.fn();

Composer/packages/client/__tests__/components/CreationFlow/LocationBrowser/FileSelector.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as React from 'react';
55
import { render, fireEvent } from '@bfc/test-utils';
66

77
import { StorageFolder } from '../../../../src/store/types';
8-
import { FileSelector } from '../../../../src/components/CreationFlow/LocationBrowser/FileSelector';
8+
import { FileSelector } from '../../../../src/components/CreationFlow/FileSelector';
99

1010
describe('<FileSelector/>', () => {
1111
const onFileChosen = jest.fn();

Composer/packages/client/__tests__/components/CreationFlow/LocationBrowser/LocationSelectContent.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as React from 'react';
55
import { fireEvent } from '@bfc/test-utils';
66

77
import { StorageFolder } from '../../../../src/store/types';
8-
import { LocationSelectContent } from '../../../../src/components/CreationFlow/LocationBrowser/LocationSelectContent';
8+
import { LocationSelectContent } from '../../../../src/components/CreationFlow/LocationSelectContent';
99
import { renderWithStore } from '../../../testUtils';
1010
import { CreationFlowStatus } from '../../../../src/constants';
1111

Composer/packages/client/__tests__/components/CreationFlow/index.test.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ import { createHistory, createMemorySource, LocationProvider } from '@reach/rout
77

88
import { StoreContext } from '../../../src/store';
99
import CreationFlow from '../../../src/components/CreationFlow/CreationFlow';
10+
import { DialogWrapper } from '../../../src/components/DialogWrapper';
1011
import { CreationFlowStatus } from '../../../src/constants';
1112

12-
jest.mock('../../../src/components/DialogWrapper/DialogWrapper', () => {
13-
return {
14-
DialogWrapper: jest.fn((props) => {
15-
return props.children;
16-
}),
17-
};
18-
});
13+
jest.mock('../../../src/components/DialogWrapper');
1914

2015
describe('<CreationFlow/>', () => {
2116
let storeContext, saveTemplateMock, locationMock, createProjectMock;
@@ -36,6 +31,10 @@ describe('<CreationFlow/>', () => {
3631
}
3732

3833
beforeEach(() => {
34+
(DialogWrapper as jest.Mock).mockImplementation((props) => {
35+
return props.children;
36+
});
37+
3938
saveTemplateMock = jest.fn();
4039
locationMock = {};
4140
storeContext = {

Composer/packages/client/__tests__/components/DialogWrapper/index.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
import React from 'react';
55
import { render } from '@bfc/test-utils';
66

7-
import { DialogWrapper } from '../../../src/components/DialogWrapper/DialogWrapper';
8-
import { DialogTypes } from '../../../src/components/DialogWrapper/styles';
7+
import { DialogWrapper, DialogTypes } from '../../../src/components/DialogWrapper';
98

109
describe('<DialogWrapper />', () => {
1110
const props = {

Composer/packages/client/__tests__/components/appUpdater.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import React from 'react';
55

6-
import { AppUpdater } from '../../src/components/AppUpdater/AppUpdater';
6+
import { AppUpdater } from '../../src/components/AppUpdater';
77
import { AppUpdaterStatus } from '../../src/constants';
88
import { renderWithStore } from '../testUtils';
99

Composer/packages/client/__tests__/components/conversation.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import * as React from 'react';
55
import { render } from '@bfc/test-utils';
66

7-
import '../../src/components/Conversation/Conversation';
7+
import '../../src/components/Conversation';
88

99
describe('<Conversation/>', () => {
1010
it('should render the conversation', async () => {

Composer/packages/client/__tests__/components/errorBoundary.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import * as React from 'react';
55
import { render } from '@bfc/test-utils';
66

7-
import { ErrorBoundary } from '../../src/components/ErrorBoundary/ErrorBoundary';
7+
import { ErrorBoundary } from '../../src/components/ErrorBoundary';
88

99
const Store = React.createContext({
1010
actions: {

Composer/packages/client/__tests__/components/header.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import * as React from 'react';
55
import { render } from '@bfc/test-utils';
66

7-
import { Header } from '../../src/components/Header/Header';
7+
import { Header } from '../../src/components/Header';
88

99
describe('<Header />', () => {
1010
it('should render the header', () => {

0 commit comments

Comments
 (0)