Skip to content

Commit 4804f86

Browse files
authored
Merge pull request #99 from open-source-labs/master
Update staging branch
2 parents ae4dabf + 5573147 commit 4804f86

File tree

203 files changed

+12431
-5865
lines changed

Some content is hidden

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

203 files changed

+12431
-5865
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.eslintrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": ["airbnb-typescript"],
3+
"parserOptions": {
4+
"project": "./tsconfig.json"
5+
},
6+
"rules": {
7+
"arrow-body-style": "off",
8+
"no-plusplus": "off",
9+
"no-param-reassign": "off"
10+
},
11+
"env": {
12+
"jest": true,
13+
"browser": true
14+
}
15+
}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@
2323
npm-debug.log*
2424
yarn-debug.log*
2525
yarn-error.log*
26+
27+
28+
#configuration
29+
.vscode

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: node_js
22
node_js:
3-
- 'node'
3+
- node
44
cache:
55
directories:
66
- node_modules
7-
script:
8-
- npm run build
9-
deplloy:
7+
script:
8+
- npm test
9+
deploy:
1010
skip_cleanup: true
11-
on: master
11+
on: master

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](https://lh5.googleusercontent.com/5Gr2dZXHJdmIiASsPw9put-6mR20e4g1gOk-af4krREaJ7NqkZnqXLD5QgiotfNHYhGRh387HSqdhjRwxdwOvQzg9ChhfIrZz0FdxVu6gktBtG-sy1MX6Xq36Gmrzu_6G_K7LDQZ)
22

3-
Spearmint helps developers easily create functional React/Redux/Endpoint tests without writing any code. It dynamically converts user inputs into executable Jest test code by using DOM query selectors provided by @testing-library.
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.
44

55
## How to use
66

@@ -22,6 +22,10 @@ To run Endpoint tests generated by spearmint, install the following in your dev
2222

2323
npm i -D jest supertest
2424

25+
To run Puppeteer tests generated by spearmint, install the following in your dev dependencies.
26+
27+
npm i -D jest puppeteer
28+
2529
## How it works
2630

2731
1. On the initial screen, enter the URL of your project and load your application to start creating tests.
@@ -30,23 +34,32 @@ To run Endpoint tests generated by spearmint, install the following in your dev
3034

3135
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.
3236

33-
![](https://lh5.googleusercontent.com/5VYUlGG5VDdZxdZEh5aokuilhKRp8B5QyVmxvtW_abLYCAzYN-s-el1oV5WMtGuTzbEO2I6l8Ys_yK2gC0fCi8ISHwjh4LlgezsrPWd7mDEtLbPqBYf1J4pgkGmfIV4yq4I_dpQg)
37+
![](/public/newReact.png?raw=true)
3438

3539
3. Refer to the browser view of your app that is displayed on the right to quickly identify values for your selectors and use the file directory to open up a code editor view to easily refer to your codebase for props information.
3640

3741
4. Spearmint will then convert user input to dynamically generate a test file that will be saved inside a **tests** folder, which you can use to run ‘npm test’ on.
3842

39-
![](https://lh4.googleusercontent.com/zE-ty31I22R7P9-ubFIb4ko6MOBb7r1-56cHX65h9AcF9IsE22RhPKMEdhyR0MJ3PbqNovj1uwxF2T5_klwZ2sWniXfCiXfaEysjQgH5NRskaDFNd-TOGce0oTMn2jPaPEGFHlEq)
43+
![](/public/testfile.png?raw=true)
4044

4145
## Team
4246

4347
> Alex [@apark0720](https://github.com/apark0720)  · 
44-
> Chloe [@HeyItsChloe](https://github.com/HeyItsChloe)  · 
45-
> Cornelius [@corneeltron](https://github.com/corneeltron)  · 
48+
> Ben [@bkwak](https://github.com/bkwak)  · 
49+
> Charlie [@charlie-maloney](https://github.com/charlie-maloney)  · 
50+
> Chloe [@HeyItsChloe](https://github.com/HeyItsChloe) <br />
51+
> Cornelius [@corneeltron](https://github.com/corneeltron) &nbsp;&middot;&nbsp;
4652
> Dave [@davefranz](https://github.com/davefranz) &nbsp;&middot;&nbsp;
53+
> Evan [@Berghoer](https://github.com/Berghoer) &nbsp;&middot;&nbsp;
4754
> Johnny [@johnny-lim](https://github.com/johnny-lim) <br />
4855
> Julie [@julicious100](https://github.com/julicious100) &nbsp;&middot;&nbsp;
4956
> Karen [@karenpinilla](https://github.com/karenpinilla) &nbsp;&middot;&nbsp;
5057
> Linda [@lcwish](https://github.com/lcwish) &nbsp;&middot;&nbsp;
58+
> Luis [@Luis-KM-Lo](https://github.com/Luis-KM-Lo) <br />
59+
> Mike [@mbcoker](https://github.com/mbcoker) &nbsp;&middot;&nbsp;
5160
> Natlyn [@natlynp](https://github.com/natlynp) &nbsp;&middot;&nbsp;
52-
> Rachel [@rachethecreator](https://github.com/rachethecreator)
61+
> Nick [@nicolaspita](https://github.com/nicolaspita) &nbsp;&middot;&nbsp;
62+
> Rachel [@rachethecreator](https://github.com/rachethecreator) <br />
63+
> Sean [@sean-haverstock](https://github.com/Sean-Haverstock) &nbsp;&middot;&nbsp;
64+
> Sieun [@sieunjang](https://github.com/sieunjang) &nbsp;&middot;&nbsp;
65+
> Tristen [@twastell](https://github.com/twastell)

package.json

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@
1818
"homepage": "./",
1919
"private": true,
2020
"dependencies": {
21+
"@types/jest": "^25.2.3",
22+
"@types/react-beautiful-dnd": "^12.1.2",
23+
"@types/react-dom": "^16.9.8",
24+
"@types/react-modal": "^3.10.5",
25+
"classnames": "^2.2.6",
2126
"concurrently": "^4.1.2",
2227
"cross-env": "^5.2.1",
28+
"dotenv": "^8.2.0",
2329
"electron-is-dev": "^1.1.0",
30+
"fibers": "^5.0.0",
2431
"js-beautify": "^1.10.0",
2532
"monaco-editor": "^0.17.0",
2633
"node-sass": "^4.12.0",
@@ -30,23 +37,21 @@
3037
"react-dom": "^16.8.6",
3138
"react-modal": "^3.8.1",
3239
"react-monaco-editor": "^0.25.1",
33-
"react-scripts": "3.0.1",
34-
"typescript": "^3.5.1",
40+
"react-scripts": "3.4.1",
41+
"sass": "^1.26.5",
42+
"typescript": "^3.9.2",
3543
"wait-on": "^3.3.0"
3644
},
3745
"scripts": {
3846
"react-start": "react-scripts start",
39-
"react-build": "react-scripts build",
47+
"react-build": "NODE_ENV=production react-scripts build",
4048
"test": "react-scripts test --env=jsdom",
4149
"test:watch": "jest --watch",
4250
"react-eject": "react-scripts eject",
43-
"electron-build": "electron-builder -mwl",
51+
"electron-build": "NODE_ENV=production electron-builder -mwl",
4452
"release": "npm run react-build && electron-builder --publish=always",
45-
"build": "npm run react-build && npm run electron-build",
46-
"start": "concurrently \"cross-env BROWSER=none npm run react-start\" \"wait-on http://localhost:3000 && electron .\""
47-
},
48-
"eslintConfig": {
49-
"extends": "react-app"
53+
"build": "NODE_ENV=production npm run react-build && npm run electron-build",
54+
"start": "NODE_ENV=development concurrently \"cross-env BROWSER=none npm run react-start\" \"wait-on http://localhost:3000 && electron .\""
5055
},
5156
"browserslist": {
5257
"production": [
@@ -61,13 +66,22 @@
6166
]
6267
},
6368
"devDependencies": {
64-
"@testing-library/react": "^8.0.1",
69+
"@testing-library/jest-dom": "^5.8.0",
70+
"@testing-library/react": "^8.0.9",
6571
"@testing-library/react-hooks": "^3.2.1",
72+
"@types/jest": "^25.2.3",
73+
"@typescript-eslint/eslint-plugin": "^2.33.0",
74+
"@typescript-eslint/parser": "^2.33.0",
6675
"electron": "^5.0.3",
67-
"electron-builder": "^20.43.0",
76+
"electron-builder": "^22.6.1",
77+
"electron-devtools-installer": "^3.0.0",
6878
"enzyme": "^3.10.0",
6979
"enzyme-adapter-react-16": "^1.14.0",
70-
"jest-dom": "^3.5.0",
80+
"eslint-config-airbnb-typescript": "^7.2.1",
81+
"eslint-plugin-import": "^2.20.2",
82+
"eslint-plugin-jsx-a11y": "^6.2.3",
83+
"eslint-plugin-react": "^7.20.0",
84+
"eslint-plugin-react-hooks": "^2.5.1",
7185
"react-test-renderer": "^16.12.0",
7286
"spectron": "^5.0.0",
7387
"test-data-bot": "^0.8.0"

public/electron.js

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
const { app, BrowserWindow } = require('electron');
22
const path = require('path');
33
const isDev = require('electron-is-dev');
4-
54
let mainWindow;
6-
let testView;
75

6+
if (isDev) console.log('electron version', process.versions.electron);
7+
8+
if (isDev) {
9+
const {
10+
default: installExtension,
11+
REACT_DEVELOPER_TOOLS,
12+
} = require('electron-devtools-installer');
13+
function addDevTools() {
14+
app.whenReady().then(() => {
15+
installExtension(REACT_DEVELOPER_TOOLS)
16+
.then((name) => console.log(`Added Extension: ${name}`))
17+
.catch((err) => console.log('An error occurred: ', err));
18+
});
19+
}
20+
}
821
function createWindow() {
922
mainWindow = new BrowserWindow({
10-
width: 1400,
11-
minWidth: 1400,
23+
width: 1550,
1224
height: 750,
1325
minHeight: 750,
1426
icon: path.join(__dirname, 'public/icon.png'),
@@ -17,21 +29,22 @@ function createWindow() {
1729
webviewTag: true,
1830
},
1931
});
20-
2132
mainWindow.loadURL(
2233
isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`
2334
);
2435
mainWindow.on('closed', () => (mainWindow = null));
2536
}
2637

27-
app.on('ready', createWindow);
38+
if (isDev) {
39+
app.on('ready', addDevTools);
40+
}
2841

42+
app.on('ready', createWindow);
2943
app.on('window-all-closed', () => {
3044
if (process.platform !== 'darwin') {
3145
app.quit();
3246
}
3347
});
34-
3548
app.on('activate', () => {
3649
if (mainWindow === null) {
3750
createWindow();

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
manifest.json provides metadata used when your web app is installed on a
1010
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
1111
-->
12+
<script src="https://kit.fontawesome.com/3142614e38.js" crossorigin="anonymous"></script>
1213
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
1314
<!--
1415
Notice the use of %PUBLIC_URL% in the tags above.

public/newReact.png

146 KB
Loading

public/testfile.png

226 KB
Loading

0 commit comments

Comments
 (0)