Skip to content

Commit 4952ec2

Browse files
committed
Merge branch 'dev' into liam/screenshots
2 parents 3dbb121 + 82f88ea commit 4952ec2

38 files changed

+997
-257
lines changed

CHANGE_LOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,45 @@
33
<h1 align="center">ReacType Change Log</h1>
44
</p>
55

6+
**Version 17.0.0 Changes**
7+
8+
Changes:<br>
9+
10+
- Developer Improvements:
11+
- Testing Coverage:
12+
- Version 17 added testing for the added marketplace related components
13+
- Testing coverage sits at XX%
14+
- Typescript continued and now sits at XX%
15+
- Dev Bug Fixes:
16+
- Additional logic added for edge cases in inputs for state manager (passing in non-Arrays/non-Objects as Array type and Object type).
17+
- Cleaned up hundreds of lines of outdated code and archived multiple unused and duplicate files
18+
- User Features:
19+
- UI updated with a modern style for a better developer experience
20+
- Added many user feedback alerts for better experience including alerts for when projects are published, cloned, deleted, context created, or custom component created.
21+
- Drop down menu now closes only when the user clicks outside of the menu
22+
- Marketplace:
23+
- Implemented a dedicated area for developers to share their projects
24+
- Routing handled by React Router
25+
- Projects can also be cloned to the user's account to be used and edited
26+
- Added search functionality to search by username and project name
27+
- Separate section in the Saved Projects and Delete Projects modal in the Manage Project menu for Downloaded Projects from the Marketplace
28+
- Publish/Unpublish Button:
29+
- Publish feature on the web app allows users to publish their saved project files into the Marketplace from the main app page
30+
- Dynamically switches between publish/unpublish depending on whether the loaded project is in the Marketplace
31+
- Bug Fixes:
32+
-
33+
34+
Recommendations for Future Enhancements:<br>
35+
36+
- Add a comment section and description section for each published project
37+
- Consider maybe a way for users to pull individual components from one project into another
38+
- Use localforage or other methods to store unsaved projects either on logout or accidental closure of browser, so that when the user opens the browser again it is still there.
39+
- Continue expanding testing coverage. Improve testing by adding additional unit tests, expanding end-to-end testing, and introducing integration testing.
40+
- Continue quality Typescript conversion. Continue to fix type errors within component files.
41+
- Modularize appStateSlice file. Further modularization is needed for readability and maintainability.
42+
- Solve residual bugs. Undo & Redo buttons on customization page not functioning as expected. Backend bugs persist as seen in the console when running the dev environment. Resolve electron app functionality to coincide with web app functionality.
43+
- Continue code cleanup. Continue cleanup of outdated and unused code and files
44+
645
**Version 16.0.0 Changes**
746

847
Changes:<br>

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,16 @@ Follow [@ReacType](https://twitter.com/reactype) on Twitter for important announ
5858

5959
### Documentation
6060

61-
If you want to read about using ReacType, the [User Manual](https://reactype-1.herokuapp.com/#/tutorial) is free and available online now.
61+
If you want to read about using ReacType, the [User Manual](https://reactype-1.herokuapp.com/#/tutorial) is free and available online now.
62+
<!-- NEED TO REPLACE THE TUTORIAL LINK -->
63+
64+
## Changes with version 17.0.0
65+
66+
- **Improved Testing Coverage**: Testing coverage now sits at XX%.
67+
- **Typescript Conversion**: Typescript coverage now sits at XX%.
68+
- **UI Overhaul**: Upgraded the UI of the application with a more modern style and better developer experience
69+
- **Marketplace Feature**: Implemented a dedicated area for developers to share their projects
70+
- **And more:** See [change log](https://github.com/open-source-labs/ReacType/blob/master/CHANGE_LOG.md) for more details on what was changed from the previous versions as well as plans for upcoming features!
6271

6372
## Changes with version 16.0.0
6473

__tests__/NavBar.test.tsx

Lines changed: 79 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import React from 'react';
22
import { render, fireEvent, waitFor } from '@testing-library/react';
3+
import '@testing-library/jest-dom/extend-expect';
34
import { MemoryRouter } from 'react-router-dom';
45
import { ThemeProvider, createTheme } from '@mui/material/styles';
56
import NavBar from '../app/src/components/top/NavBar';
7+
import navbarDropDown from '../app/src/components/top/navbarDropDown'
68
import * as projectFunctions from '../app/src/helperFunctions/projectGetSaveDel';
79
import { Provider } from 'react-redux';
810
import { configureStore } from '@reduxjs/toolkit';
@@ -23,14 +25,20 @@ jest.mock('../app/src/helperFunctions/projectGetSaveDel', () => ({
2325
unpublishProject: jest.fn(),
2426
}));
2527

26-
const originalError = console.error;
27-
beforeAll(() => {
28-
console.error = jest.fn();
29-
});
28+
//mock the file saver library
29+
jest.mock('file-saver', () => ({
30+
...jest.requireActual('file-saver'),
31+
saveAs: jest.fn(),
32+
}));
3033

31-
afterAll(() => {
32-
console.error = originalError;
33-
});
34+
// const originalError = console.error;
35+
// beforeAll(() => {
36+
// console.error = jest.fn();
37+
// });
38+
39+
// afterAll(() => {
40+
// console.error = originalError;
41+
// });
3442

3543
// Mocking the render
3644
const renderNavBar = (store) => {
@@ -75,7 +83,7 @@ describe('NavBar Component', () => {
7583
fireEvent.click(publishButton);
7684
});
7785

78-
it('handles publish correctly with new project', async () => {
86+
xit('handles publish correctly with new project', async () => {
7987
const publishProjectMock = jest.spyOn(projectFunctions, 'publishProject');
8088
publishProjectMock.mockResolvedValueOnce({
8189
_id: 'mockedId',
@@ -121,7 +129,7 @@ describe('NavBar Component', () => {
121129
});
122130

123131

124-
it('handles unpublish correctly', async () => {
132+
xit('handles unpublish correctly', async () => {
125133
const unpublishProjectMock = jest.spyOn(projectFunctions, 'unpublishProject');
126134
unpublishProjectMock.mockResolvedValueOnce({
127135
_id: 'mockedId',
@@ -156,4 +164,66 @@ describe('NavBar Component', () => {
156164
fireEvent.click(unpublishButton);
157165
}
158166
});
167+
168+
xit('handles export correctly', async () => {
169+
const store = configureStore({
170+
reducer: rootReducer,
171+
preloadedState: {
172+
appState: {
173+
...appStateInitialState,
174+
isLoggedIn: true,
175+
name: 'Mock Project Name',
176+
},
177+
},
178+
});
179+
180+
console.log('Before rendering NavBar');
181+
182+
const { getByText } = renderNavBar(store);
183+
184+
console.log('After rendering NavBar');
185+
186+
// Find and click the export button
187+
const exportButton = getByText('< > Export');
188+
fireEvent.click(exportButton);
189+
190+
191+
await waitFor(() => {
192+
const exportModal = getByText('Click to download in zip file:');
193+
expect(exportModal).toBeInTheDocument();
194+
});
195+
196+
197+
const exportComponentsOption = getByText('Export components');
198+
fireEvent.click(exportComponentsOption);
199+
200+
});
201+
202+
203+
204+
xit('handles dropdown menu correctly', () => {
205+
const store = configureStore({
206+
reducer: rootReducer,
207+
preloadedState: {
208+
appState: {
209+
...appStateInitialState,
210+
isLoggedIn: true,
211+
name: 'Mock Project Name',
212+
},
213+
},
214+
});
215+
216+
const { getByTestId } = renderNavBar(store);
217+
const moreVertButton = getByTestId('more-vert-button');
218+
219+
220+
expect(moreVertButton).toBeInTheDocument();
221+
222+
223+
fireEvent.click(moreVertButton);
224+
225+
226+
});
227+
228+
159229
});

__tests__/projects.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ describe('Project endpoints tests', () => {
1818
server.listen(done);
1919
});
2020
afterAll((done) => {
21-
Mongoose.disconnect();
22-
server.close(done);
21+
Mongoose.disconnect().then(() => {
22+
// Close the HTTP server
23+
server.close(done);
24+
});
2325
});
2426
// test saveProject endpoint
2527
describe('/saveProject', () => {

0 commit comments

Comments
 (0)