Skip to content

Commit 749c409

Browse files
authored
Merge pull request #140 from oslabs-beta/main
spearmint v13
2 parents e20c357 + eee02c3 commit 749c409

File tree

148 files changed

+19539
-31794
lines changed

Some content is hidden

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

148 files changed

+19539
-31794
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
APP_DEV=true
22
BROWSER=non
33
SKIP_PREFLIGHT_CHECK=true
4-
MONGO_LINK=mongodb://localhost:27017
4+
MONGO_LINK=mongodb+srv://username:spearmint1234@cluster0.nzon2t8.mongodb.net/?retryWrites=true&w=majority

MyLibrary/.gitignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

MyLibrary/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

Lines changed: 0 additions & 8 deletions
This file was deleted.

MyLibrary/Package.swift

Lines changed: 0 additions & 28 deletions
This file was deleted.

MyLibrary/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

MyLibrary/Sources/MyLibrary/MyLibrary.swift

Lines changed: 0 additions & 6 deletions
This file was deleted.

MyLibrary/Tests/MyLibraryTests/MyLibraryTests.swift

Lines changed: 0 additions & 11 deletions
This file was deleted.

README-dev.md

Lines changed: 95 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,133 @@
11
# How to use in development mode
22

3-
**Mac Developers**: Install Xcode command line tools if you don't already have them.
3+
**Mac Developers**: Install Xcode command line tools if you don't already have them.
44

5-
**Windows Developers**: Install Node.js globally, may also have to run Spearmint in admin mode.
5+
**Windows Developers**: Install Node.js globally, may also have to run Spearmint in admin mode.
6+
7+
As of January 2023, spearmint works with node version 19.4.0 electron-devtools-vendor must be at version 1.1 for now due to a bug.
8+
React must be version 17 due to a dependency for mui. Fix-path must be version 3.0.0 due to 4.0.0 only being usable with an import statement, which is not supported in electron.jsx.
69

710
1. Fork and clone this repository.
8-
2. Install node version 16.13: ```nvm install 16.13```
9-
3. Use node version 16.13: ```nvm use 16.13```
10-
4. ```npm install```
11-
5. Create a .env file in the root directory of the project
12-
6. Insert the following lines of code into the .env file
13-
```
14-
APP_DEV=true
15-
BROWSER=non
16-
SKIP_PREFLIGHT_CHECK=true
17-
MONGO_LINK=
18-
```
19-
7. Set MONGO_LINK to your MongoDB URI (ex: mongodb://localhost:27017)
20-
8. Make sure your MongoDB is running if it's hosted locally.
21-
9. ```npm run rebuild``` (different from `npm rebuild` so please pay attention to that)
22-
10. ```npm run dev```
11+
12+
2. `npm install`
13+
14+
3. Create a .env file in the root directory of the project
15+
16+
4. Insert the following lines of code into the .env file
17+
18+
```
19+
APP_DEV=true
20+
BROWSER=non
21+
SKIP_PREFLIGHT_CHECK=true
22+
MONGO_LINK=mongodb+srv://username:spearmint1234@cluster0.nzon2t8.mongodb.net/?retryWrites=true&w=majority
23+
```
24+
25+
5. Set MONGO_LINK to your MongoDB URI or use the URI we provided (ex: mongodb://localhost:27017)
26+
27+
6. Make sure your MongoDB is running if it's hosted locally.
28+
29+
7. `npm run rebuild` (different from `npm rebuild` so please pay attention to that)
30+
31+
8. `npm run dev`
2332

2433
# Tips for development mode
2534

26-
- To enable hot-module reloading, uncomment line 24 in the Electron.js file.
27-
```// require('electron-reloader')(module);```
28-
- To enable dev tools, uncomment line 72 in the Electron.js file:
29-
```// mainWindow.webContents.openDevTools();```
35+
- To enable hot-module reloading, uncomment line 23 in the electron.jsx file.
3036

37+
// require('electron-reloader')(module);
3138

32-
# Suggestions if you would like contriubute:
33-
1. Exporting test files in TypeScript: the tests currently export in JS.
34-
2. Convert codebase to TypeScript: currently, there are some files in TS, and others in JS. It would be great to convert all to TS.
35-
3. Dry refactoring of codebase: A lot of the folders and files for the frontend frameworks testing are the same, and the codebase would GREATLY benefit from refactoring and modularizing those.
36-
4. Persist user data: there is currently sign up and login functionality, including OAuth. However, V0.12.0 commented it out because there is currently no user data being persisted. A great feature would be to save tests to work on them later, or create templates for each user.
37-
5. A known issue/bug is some erratic behavior with the terminal. A more detailed issue will be opened for this.
38-
6. Add more customization to the tests themseleves such as chaining expects, add the ability to use siblings and children, etc., or having the ability to test more than one component in one test file.
39-
7. Try to fix the dependencies issues. Currently we have to run on node version 16.13 for the app to work. But if the packages incompatiblites are fixed that would be wonderful!
39+
- To enable Chrome Dev Tools, uncomment line 71 in the electron.jsx file:
40+
41+
// mainWindow.webContents.openDevTools();
42+
43+
- To enable React Dev Tools, uncomment lines 285 to 289 in the electron.jsx file:
4044

41-
Or please feel free to add any other features or fixes that you would like or are interested in.
45+
// .then(() => {
46+
// session.defaultSession.loadExtension(REACT_DEVELOPER_TOOLS, { allowFileAccess: true })
47+
// .then((name) => console.log(`Added Extension: ${name}`))
48+
// .catch((err) => console.log(`An error occurred adding an extension: ${err}`));
49+
// })
4250

51+
# Suggestions if you would like contriubute:
4352

53+
1. Exporting test files in TypeScript: the tests currently export in JS.
54+
55+
2. Convert codebase to TypeScript: currently, there are some files in TS, and others in JS. It would be great to convert all to TS.
56+
57+
3. Dry refactoring of codebase: A lot of the folders and files for the frontend frameworks testing are the same, and the codebase would GREATLY benefit from refactoring and modularizing those.
58+
59+
4. Persist user data: there is currently sign up and login functionality. V0.13.0 commented out the login functionality because there is currently no user data being persisted. A great feature would be to save tests to work on them later, or create templates for each user.
60+
61+
5. GitHub OAuth is functional, but Google OAuth is currently broken. If you are planning to persist user data, this is an excellent feature to resolve.
62+
63+
6. Add more customization to the tests themseleves such as chaining expects, add the ability to use siblings and children, etc., or having the ability to test more than one component in one test file.
64+
65+
7. Some of test cases needs improvement on UI as they do not have any styling or optimal user experience
66+
67+
**_Please feel free to add any other features or fixes that you would like or are interested in._**
4468

4569
# Build and Run image on Docker
4670

47-
## Pre-requisites
48-
- Mongo: Mongodb is used for authentication functionality. If you didn't use locally hosted mongodb URI in .env file, you may skip to the X server section.
71+
## Pre-requisites
72+
73+
- Mongo: Mongodb is used for authentication functionality. If you didn't use locally hosted mongodb URI in .env file, you may skip to the X server section.
4974

50-
1. Add `172.17.0.1` and `0.0.0.0` to the network interfaces of mongo config file.
75+
1. Add `172.17.0.1` and `0.0.0.0` to the network interfaces of mongo config file.
5176

52-
a. Open `mongod.cfg` (Usually located in C:\Program Files\MongoDB\Server\4.4\bin)
77+
a. Open `mongod.cfg` (Usually located in C:\Program Files\MongoDB\Server\4.4\bin)
5378

54-
# network interfaces
55-
net:
56-
port: 27017
57-
bindIp: 127.0.0.1, 172.17.0.1, 0.0.0.0
79+
# network interfaces
80+
net:
81+
port: 27017
82+
bindIp: 127.0.0.1, 172.17.0.1, 0.0.0.0
5883

59-
2. Run mongo on port 27017
84+
2. Run mongo on port 27017
6085

6186
- X server
6287

63-
1. Download and run either [X410](https://x410.dev/) or [VcXsrv](https://sourceforge.net/projects/vcxsrv/)
88+
1. Download and run either [X410](https://x410.dev/) or [VcXsrv](https://sourceforge.net/projects/vcxsrv/)
6489

65-
* For X410, use the following configuration
90+
- For X410, use the following configuration
6691

67-
![x410 with display = 0](/public/x410.png)
92+
![x410 with display = 0](/public/x410.png)
6893

69-
* For VcXsrv: change the display number to 0, for other settings, use default.
94+
- For VcXsrv: change the display number to 0, for other settings, use default.
7095

71-
![VcXsrv with display = 0](/public/VcXsrv.png)
96+
![VcXsrv with display = 0](/public/VcXsrv.png)
7297

98+
## Running the image
7399

74-
## Running the image
75-
After running the mongo on port 27017 and running the x server with display number of 0, follow the steps below.
100+
After running the mongo on port 27017 and running the x server with display number of 0, follow the steps below.
76101

77-
1. Build the docker image by running the following command
102+
1. Build the docker image by running the following command
78103

79104
`docker build -t [image name] .`
80105

81-
2. Run the docker image by using the following command:
106+
2. Run the docker image by using the following command:
107+
108+
`docker run -e DISPLAY='host.docker.internal:0.0' -it -v [directory of project to be tested]:/[directory to create volume] [image name]`
109+
110+
- `-e DISPLAY='host.docker.internal:0.0'`: Set environment variable ‘display’ to host.docker.internal:0.0
111+
112+
- `-it`: Run container as interactive
82113

83-
`docker run -e DISPLAY='host.docker.internal:0.0' -it -v [directory of project to be tested]:/[directory to create volume] [image name]`
114+
- `-v`: Creates a volume and mounts the testing application into the container. (ex: `-v [testing files]:[created volume]`)
84115

85-
- `-e DISPLAY='host.docker.internal:0.0'`: Set environment variable ‘display’ to host.docker.internal:0.0
116+
*Please note that once the spearmint container is running, you can only access the folders that you mounted here.`
86117

87-
- `-it`: Run container as interactive
118+
**_Please note that the image uses root user, as shown in the Dockerfile._**
88119

89-
- `-v`: Creates a volume and mounts the testing application into the container. (ex: `-v [testing files]:[created volume]`)
120+
# Resources for onboarding developers
90121

91-
*Please note that once the spearmint container is running, you can only access the folders that you mounted here.` qGHP\
92-
*Please note that the image uses root user, as shown in the Dockerfile.
93-
122+
<div align="center" style="display:flex;flex-direction:column;"}>
123+
<div align>
124+
<a href="https://excalidraw.com/#room=9abc890c35d8e7d3f149,htwzR9k0SUhZzhwB3zjJ8A">
125+
<img width="300" height="72" alt="Connect to the Dev Excalidraw" src="https://img.shields.io/badge/Excalidraw-181717?style=for-the-badge&logo"/>
126+
</a>
127+
<a href="https://discord.gg/5FNPTvZSTq">
128+
<img width="300" height="72" src="https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white"/>
129+
</a>
130+
<h3>Virtual whiteboard for sketching the structure/data flow of spearmint. Also inside the /public/spearmint.svg file</h3>
131+
<h3>Let's stay up to date, ask/answer questions, and connect with one another!</h3>
132+
<h3>Join the spearmint developer community Discord!</h3>
133+
</div>

0 commit comments

Comments
 (0)