Skip to content

Commit fb9b592

Browse files
committed
migrating code from spearmint-fresh repository
1 parent 432a292 commit fb9b592

File tree

228 files changed

+19654
-0
lines changed

Some content is hidden

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

228 files changed

+19654
-0
lines changed

.gitignore

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port
105+
106+
# Custom ignore files
107+
/out
108+
/build
109+
.DS_Store
110+
package-lock.json
111+
.dccache

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019-2021 spearmintjs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
![](https://lh5.googleusercontent.com/5Gr2dZXHJdmIiASsPw9put-6mR20e4g1gOk-af4krREaJ7NqkZnqXLD5QgiotfNHYhGRh387HSqdhjRwxdwOvQzg9ChhfIrZz0FdxVu6gktBtG-sy1MX6Xq36Gmrzu_6G_K7LDQZ)
2+
3+
Spearmint helps developers easily create functional React/Redux/Endpoint/Paint Timing tests without writing any code. It dynamically converts user inputs into executable Jest test code by using DOM query selectors provided by @testing-library.
4+
5+
# Installation
6+
Please download spearmint from our [website](https://www.spearmintjs.com/). Available for Mac OS and Windows.
7+
8+
9+
# How to use in development mode
10+
11+
### For Mac developers
12+
13+
**Prerequisite**: Install Xcode
14+
15+
First install
16+
1. Fork and clone this repository.
17+
2. ```npm install```
18+
3. ```npm run watch```
19+
3. ```npm run start-dev```
20+
21+
***
22+
23+
### For Windows developers
24+
25+
**Prerequisite**: Install Node.js globally
26+
27+
1. Fork and clone this repository.
28+
2. ```npm install```
29+
3. ```npm run watch```
30+
3. ```npm run start-dev```
31+
32+
Note: Windows users may also have to run Spearmint in admin mode
33+
34+
35+
<br>
36+
37+
38+
# How it works
39+
40+
41+
1. On the initial screen, a user is prompt to login, sign up (via OAuth or standard sign-up/login), or login as a guest. Once logged in choose your file and load your application to start creating tests.
42+
43+
![](/public/mainPage.png)
44+
45+
2. Utilize our auto-complete, drop-down options, and tooltips features to easily create arrangement, action, and assertion test statements for React; reducer, action creator, asynchronous action creator, and middleware test statements for Redux; and hooks, context, and endpoint test statements. Spearmint can save test templates for future use for logged in user (not guests).
46+
47+
![](/public/generateTest.png)
48+
49+
3. Spearmint will then convert user input to dynamically generate a test file, which you can click export icon on the left nav bar to automatically save the test file in the **\_\_tests\_\_** folder.
50+
51+
52+
4. Lastly click **Run Test** button and follow the guide and click what type of test you would like to perform.
53+
![](/public/runTest.png)
54+
55+
5. An accessibility lens has been added in the app to give developers with different mismatches various options to interact with the app.
56+
57+
![](/public/AccLens_Demo.gif)
58+
59+
6. The latest version of Spearmint has a specific focus on security. The [Snyk](https://snyk.io/) library has been utilized to ensure your application is up to snuff for various security standards and protect your application from malicious attacks.
60+
Users can now test their application for vulnerabilities including: SQL Injection, Cross-site Scripting (XSS), Hardcoded Secrets, and much more!
61+
62+
![](/public/demos/snyk-test-app.gif)
63+
64+
# New features with version 0.8.0
65+
66+
-Security testing via Snyk
67+
68+
-Guest Login
69+
70+
-Cross-platform functionality (Mac OS w/ M1 chip, Mac OS w/ Intel chip, Windows)
71+
72+
-60% reduced package size
73+
74+
-Accelerated startup time
75+
76+
-Ample bug fixes
77+
78+
<br>
79+
80+
# Demos
81+
82+
### Guest login
83+
![](/public/guest-login.gif)
84+
85+
### Signup + login
86+
![](/public/signup-login.gif)
87+
88+
### Snyk auth + dependency test
89+
![](/public/snyk-auth-testdep.gif)
90+
91+
### Snyk fix dependencies
92+
![](/public/snyk-fixdep.gif)
93+
94+
### Generate endpoint test
95+
![](/public/snyk-auth-testdep.gif)
96+
97+
### Run a specific test
98+
![](/public/snyk-auth-testdep.gif)
99+
100+
<br>
101+
102+
103+
# Snyk Setup
104+
105+
106+
### Authenticate Snyk
107+
![](/public/snyk-auth-testdep.gif)
108+
109+
### Enable Snyk code
110+
![](/public/snyk-enable.gif)
111+
112+
# The Spearmint Team
113+
<hr>
114+
115+
> Alan [@alanrichardson7](https://github.com/alanrichardson7) <br />
116+
> Alex [@apark0720](https://github.com/apark0720) <br />
117+
> Alfred [@astaiglesia](https://github.com/astaiglesia) <br />
118+
> Annie [@annieshinn](https://github.com/annieshinn) <br />
119+
> Ben [@bkwak](https://github.com/bkwak) <br />
120+
> Charlie [@charlie-maloney](https://github.com/charlie-maloney) <br />
121+
> Chloe [@HeyItsChloe](https://github.com/HeyItsChloe) <br />
122+
> Cornelius [@corneeltron](https://github.com/corneeltron) <br />
123+
> Dave [@davefranz](https://github.com/davefranz) <br />
124+
> Dieu [@dieunity](https://github.com/dieunity) <br />
125+
> Eric [@ericgpark](https://github.com/ericgpark) <br />
126+
> Evan [@Berghoer](https://github.com/Berghoer) <br />
127+
> Gabriel [@bielchristo](https://github.com/bielchristo) <br />
128+
> Joe [@josephnagy](https://github.com/Josephnagy) <br />
129+
> Johnny [@johnny-lim](https://github.com/johnny-lim) <br />
130+
> Julie [@julicious100](https://github.com/julicious100) <br />
131+
> Justin [@JIB3377](https://github.com/JIB3377) <br />
132+
> Karen [@karenpinilla](https://github.com/karenpinilla) <br />
133+
> Linda [@lcwish](https://github.com/lcwish) <br />
134+
> Luis [@Luis-KM-Lo](https://github.com/Luis-KM-Lo) <br />
135+
> Max B[@mbromet](https://github.com/mbromet) <br />
136+
> Max W [@MaxWeisen](https://github.com/MaxWeisen) <br />
137+
> Mike [@mbcoker](https://github.com/mbcoker) <br />
138+
> Mo [@mhmaidi789](https://github.com/mhmaidi789) <br />
139+
> Natlyn [@natlynp](https://github.com/natlynp) <br />
140+
> Nick [@nicolaspita](https://github.com/nicolaspita) <br />
141+
> Owen [@oweneldridge](https://github.com/oweneldridge) <br />
142+
> Rachel [@rachethecreator](https://github.com/rachethecreator) <br />
143+
> Sean Y [@seanyyoo](https://github.com/seanyyoo)<br />
144+
> Sean H [@sean-haverstock](https://github.com/Sean-Haverstock) <br />
145+
> Sharon [@sharon-zhu](https://github.com/sharon-zhu) <br />
146+
> Sieun [@sieunjang](https://github.com/sieunjang) <br />
147+
> Terence [@TERR-inss](https://github.com/TERR-inss) <br />
148+
> Tolan [@taoantaoan](https://github.com/taoantaoan) <br />
149+
> Tristen [@twastell](https://github.com/twastell) <br />
150+
> Tyler [@tytyjameson](https://github.com/tytyjameson)
151+
<hr>
152+
153+
***
154+
155+
# If You Want To Contribute:
156+
The following is a list of features + improvements for future open-source developers that the Spearmint team has either started or would like to see implemented. Or, if you have additional new ideas, feel free to implement those as well!
157+
- Vue test generation
158+
- Github OAuth login (was available in previous versions, but the components used became deprecated)
159+
- Additional security testing functionality

declaration.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
declare module '*.scss' {
2+
const content: Record<string, string>;
3+
export default content;
4+
}
5+
6+
declare module 'react-beautiful-dnd'

docker/.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
Dockerfile
3+
.git
4+
.gitignore
5+
.dockerignore
6+
.env
7+
package-lock.json

docker/.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: node_js
2+
node_js:
3+
- node
4+
cache:
5+
directories:
6+
- node_modules
7+
script:
8+
- npm test
9+
deploy:
10+
skip_cleanup: true
11+
on: master

docker/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:14
2+
RUN apt-get update && apt-get install \
3+
git libx11-xcb1 libxcb-dri3-0 libxtst6 libnss3 libatk-bridge2.0-0 libgtk-3-0 libxss1 libasound2 \
4+
-yq --no-install-suggests --no-install-recommends \
5+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
6+
RUN useradd -d /spearmint spearmint
7+
USER spearmint
8+
WORKDIR /spearmint
9+
COPY package.json .
10+
RUN npm run install-once
11+
COPY . .
12+
EXPOSE 3000
13+
USER root
14+
RUN chown root /spearmint/node_modules/electron/dist/chrome-sandbox
15+
RUN chmod 4755 /spearmint/node_modules/electron/dist/chrome-sandbox
16+
USER spearmint
17+
CMD ["npm", "start"]

docker/README-Docker.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# About
2+
A previous Spearmint team attempted to containerize the Spearmint application. As of version 0.8.0, these files do not work. However, we wanted to preserve them in case future open-source contributers would like to attempt to re-contanerize the application.

docker/docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: '3'
2+
services:
3+
frontend:
4+
container_name: frontend
5+
image: frontend
6+
security_opt:
7+
- seccomp=profile.json
8+
environment:
9+
- DISPLAY=host.docker.internal:0
10+
stdin_open: true
11+
ports:
12+
- "3000:3000"
13+
networks:
14+
- spearmint
15+
backend:
16+
container_name: backend
17+
image: backend
18+
ports:
19+
- "3001:3001"
20+
networks:
21+
- spearmint
22+
networks:
23+
spearmint:
24+
driver: bridge

0 commit comments

Comments
 (0)