diff --git a/Notes On Spearmintv15.md b/Notes On Spearmintv15.md
index ec99dc92..ac19e57e 100644
--- a/Notes On Spearmintv15.md
+++ b/Notes On Spearmintv15.md
@@ -14,19 +14,29 @@ Existed Since We've Started:
-Some Accessibility Test existed only in name, not in functionality
-Debugging. Error messages point to bundle. Also, unable to get Electrons "devtools" to
run react DevTools
--No Error Handler for Components
+-No Error Handler for Components(Look into Error Boundary and componentDidCatch)
-No Confirmation Dialogue before X'ing out of blocks
+-No way to import a test file and make modifications on it using the UI
+-No way to use the application as a functioning desktop app. Only as a github download
+-Working Backend(MongoDB connection and CRUD functionality) can't be confirmed
+-Mock Data functionality is tied between all testing widgets
+
+-
Changes Implemented:
For Accessibility Tool
-Dependencies updated
-A Accessibility Test
-For React Testing Tool:
+For React(Beta) Testing Tool:
-new State Structure for UI to work with(found in 'updatedTestCaseReducer' file)
-abstracted add, update, delete methods and workflow(Can be traced from the component, to 'RTFsContextsProvider' file, to the
'updatedFrontendFrameworkTestCaseActions' file, to the 'updatedTestCaseReducer' file)
-functions already created for deep copying, adding, changing, and deleting (from)the state object
+-designed components to work with new central state object
+-custom hooks
+-React.memo, useMemo, useCallback
+-MongoDB migration
-Jest Abilities Not Fully Fleshed Out
-Old testing workflow(look into FireEvent, vs Screen for jest testing)
@@ -39,14 +49,21 @@ should look)
Additinoal fixes/considerations needed needed
For the React(Beta)
+-File system structure: maybe grouping all files related to only 1 widget into 1 folder makes more sense then keeping them seperate(e.g., the 'ReactTestCase' and 'Reducer' files should be put inside a folder that contains the other files related to only the React tool widget)
-Decide for yourself which state structure makes the the most sense for you, and lends itself to implementing full jest testing capabilities
-AutoFill for options of Action and Assert Components needs to be updated wot work with
new state structure and re-enabled
+-Steps toward reduced Component rerenders
+-Custom Hooks
+-React.Memo
+React useMemo
+-React useCallback
-debug the Props Component so it will render properly
-Setup Teardowns need to be quanitfied in a way that can be represented
by a form like setup(e.g. user either fills out inputs or uses drags and drops
to create the setups and teardowns)
-add more jest testing capabilities that don't exist yet
+-refactor 'Render' component as aspect of tests to be more flexible. It only allows 1 component selection at a time for any given test file being created. Current setup allows creation of only singularly focused component test files, but not end to end testing.
-Props and Statements are not handled correctly yet by "useGenerateTest.jsx"
-in 'useGenerateTest', use visual Studios 'search' tool to find the code snippets related to 'Updated React'. there should be at least 2, 1 being 'import', the other being 'switch'. There is no need for 2 versions of 'useGenerateTest', but there exists two because of our creating a playground to be safe. the second is called 'updatedUseGenerateTest. decide how u best want to merge them, or if every Tool should have its own 'useGenerateTest' for just its switchcase.
-for the switch case 'updatedReact' found in 'useGenerateTest'(or more specifically 'updatedUseGenerateTest' if you haven't moved),
diff --git a/package-lock.json b/package-lock.json
index 08f75217..d087d471 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -120,7 +120,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
"integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==",
- "dev": true,
"dependencies": {
"@jridgewell/gen-mapping": "^0.1.0",
"@jridgewell/trace-mapping": "^0.3.9"
@@ -764,7 +763,6 @@
"version": "7.20.12",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz",
"integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==",
- "dev": true,
"dependencies": {
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.18.6",
@@ -1118,7 +1116,6 @@
"version": "7.20.13",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.13.tgz",
"integrity": "sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg==",
- "dev": true,
"dependencies": {
"@babel/template": "^7.20.7",
"@babel/traverse": "^7.20.13",
@@ -3236,7 +3233,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.2.tgz",
"integrity": "sha512-eFZVFoRXb3GFGd7Ak7W4+6jBl9wBtiZ4AaYOse97ej6mKj5tkyO0dUnUChs1IhJZtx1BENo4/p4WUTXpi6vT+g==",
- "dev": true,
"dependencies": {
"debug": "^4.1.1",
"env-paths": "^2.2.0",
@@ -3257,7 +3253,6 @@
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
- "dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0",
@@ -3271,7 +3266,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
- "dev": true,
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
@@ -3280,7 +3274,6 @@
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
- "dev": true,
"engines": {
"node": ">= 4.0.0"
}
@@ -4528,7 +4521,6 @@
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz",
"integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==",
- "dev": true,
"dependencies": {
"@jridgewell/set-array": "^1.0.0",
"@jridgewell/sourcemap-codec": "^1.4.10"
@@ -10563,7 +10555,6 @@
"version": "24.8.3",
"resolved": "https://registry.npmjs.org/electron/-/electron-24.8.3.tgz",
"integrity": "sha512-6YTsEOIMIQNnOz0Fj5gAWtwCuDd66iYKkuRJGyc80jKKYI49jBeH+R7ZZry9uiVu4T4bZgBN2FAN24XfCioQZA==",
- "dev": true,
"hasInstallScript": true,
"dependencies": {
"@electron/get": "^2.0.0",
@@ -11952,7 +11943,6 @@
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
- "dev": true,
"optional": true,
"dependencies": {
"iconv-lite": "^0.6.2"
@@ -13637,7 +13627,6 @@
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
- "dev": true,
"engines": {
"node": ">=6.9.0"
}
diff --git a/public/electron.jsx b/public/electron.jsx
index 01c65c97..bc3ab5b9 100644
--- a/public/electron.jsx
+++ b/public/electron.jsx
@@ -74,7 +74,7 @@ function createWindow() {
// });
mainWindow.loadFile(path.join(__dirname, 'index.html')); // unsure why we need the path.join, but index.html not found without it
- //mainWindow.webContents.openDevTools();
+ mainWindow.webContents.openDevTools();
//////////////////////////////////////////////////
//Creates terminal, specifies dimensions based on columns and rows
//////////////////////////////////////////////////
diff --git a/src/components/TestCase/UpdatedReactTestCase.tsx b/src/components/TestCase/UpdatedReactTestCase.tsx
index 9057933a..4fd83755 100644
--- a/src/components/TestCase/UpdatedReactTestCase.tsx
+++ b/src/components/TestCase/UpdatedReactTestCase.tsx
@@ -1,4 +1,4 @@
-import React, { createContext, useContext, useReducer } from 'react';
+import React, { useContext, useMemo } from 'react';
import styles from './TestCase.module.scss';
import { updateRenderComponent } from '../../context/actions/updatedFrontendFrameworkTestCaseActions';
import { GlobalContext } from '../../context/reducers/globalReducer';
@@ -8,94 +8,106 @@ import { createMockData } from '../../context/actions/mockDataActions';
import UpdatedReactTestMenu from '../TestMenu/UpdatedReactTestMenu';
import MockData from '../UpdatedReactTestComponent/MockData/MockData';
import { Button } from '@mui/material';
-import { RTFsContexts } from '../../context/RTFsContextsProvider';
+import { useRTFsContexts } from '../../context/RTFsContextsProvider';
import DescribeBlock from '../UpdatedReactTestComponent/DescribeBlock/DescribeBlock';
-const UpdatedReactTestCase = ({
- filterFileType,
-}: {
- filterFileType: Function;
-}) => {
- const { reactTestFileState, rTFDispatch, handleAddBlock } =
- useContext(RTFsContexts);
- const [{ mockData }, dispatchToMockData] = useContext(MockDataContext);
- const [{ filePathMap, theme }] = useContext(GlobalContext);
+const UpdatedReactTestCase = React.memo(
+ ({ filterFileType }: { filterFileType: Function }) => {
+ const { reactTestFileState, rTFDispatch, handleAddBlock } =
+ // useContext(RTFsContexts);
+ useRTFsContexts();
- const handleAddMockData = () => {
- dispatchToMockData(createMockData());
- };
+ const [{ mockData }, dispatchToMockData] = useContext(MockDataContext);
+ const [{ filePathMap, theme }] = useContext(GlobalContext);
- const reorder = (list: string[], startIndex: number, endIndex: number) => {
- const result = Array.from(list);
- const [removed] = result.splice(startIndex, 1);
- result.splice(endIndex, 0, removed);
- return result;
- };
+ const handleAddMockData = () => {
+ dispatchToMockData(createMockData());
+ };
- const reactTestFileStateChildren = Object.values(
- reactTestFileState.children
- ).map((childObject) => (
-
- ));
+ const reorder = useMemo(
+ () => (list: string[], startIndex: number, endIndex: number) => {
+ const result = Array.from(list);
+ const [removed] = result.splice(startIndex, 1);
+ result.splice(endIndex, 0, removed);
+ return result;
+ },
+ [reactTestFileState]
+ );
- return (
- <>
-