Skip to content

Commit

Permalink
Merge pull request #106 from oslabs-beta/staging
Browse files Browse the repository at this point in the history
Merging LA42 Spearmint with OS Labs Spearmint v0.6.0 Release
  • Loading branch information
MaxWeisen committed May 13, 2021
2 parents 85d86a1 + bb23c55 commit c463d04
Show file tree
Hide file tree
Showing 45 changed files with 1,383 additions and 457 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"rules": {
"arrow-body-style": "off",
"no-plusplus": "off",
"no-param-reassign": "off"
"no-param-reassign": "off",
"linebreak-style": "off"
},
"env": {
"jest": true,
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# production
/build
/dist

# misc
.DS_Store
Expand Down
101 changes: 46 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,80 +2,67 @@

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.

# How to use
# Installation
Please download spearmint from our [website](https://www.spearmintjs.com/). Available for Mac OS, Windows and Linux.

Download spearmint @ spearmintjs.com. Available for Mac OS and Windows.

<br>
# How to use in development mode

### React Testing
<hr>
To run React tests generated by spearmint, install the following in your dev dependencies.
### For Mac developers

npm i -D jest @testing-library/jest-dom @testing-library/react test-data-bot
**Prerequisite**: Install Xcode

To run Redux tests generated by spearmint, install the following in your dev dependencies, in addition to your React test installations above.
First install
1. Fork and clone this repository.
2. ```npm run install-once```
3. ```npm run start```

npm i -D redux-mock-store redux-thunk fetch-mock
***

To run Hooks / Context tests generated by spearmint, install the following in your dev dependencies, in addition to your React test installations above.
### For Windows developers

npm i -D @testing-library/react-hooks
**Prerequisite**: Install Python and Microsoft C++ Build Tools.

<br>

### Endpoint Testing
<hr>
To run Endpoint tests generated by spearmint, install the following in your dev dependencies.
In an Administrator PowerShell run the following commands: <br />
```choco install python visualcpp-build-tools -y``` <br />
```npm config set msvs_version 2017```

1. Fork and clone this repository.
2. ```npm run install-once```
3. ```npm run start-windows```

npm i -D jest supertest

<br>

### Puppeteer Testing
<hr>
To run Puppeteer tests generated by spearmint, install the following in your dev dependencies.

npm i -D jest puppeteer
# How it works


<br>

### Accessiblity Testing
<hr>
1. On the initial screen, load your application to start creating tests.

To run Accessibility tests generated by spearmint on HTML, install the following in your dev dependencies.
![](/public/mainPage.png)

npm i -D axe-core regenerator-runtime jest
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.

To run Accessibility tests generated by spearmint on React Components, install the following in your dev dependencies.
![](/public/generateTest.png)

npm i -D axe-core regenerator-runtime jest enzyme enzyme-adapter-react-16
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.

To run Accessibility tests generated by spearmint on URL's with Puppeteer, install the following in your dev dependencies.

npm i -D axe-core puppeteer
4. Lastly click **Run Test** button and follow the guide and click what type of test you would like to perform.
![](/public/runTest.png)

5. Accessibility lens have been added in the app to give developers with different mismatches various options to interact with the app.
![](/public/AccLens_Demo.gif)

<br>

# How it works

1. On the initial screen, enter the URL of your project and load your application to start creating tests.

![](https://lh4.googleusercontent.com/CAFpoefRUUxgNosudQuc7gabSReFiI_puZ_WTjrzUSzB6pgOUdQ1babF2mxJql2lC8TQ-jjVLOgG5Qka8SUfF2fi-u2H9xSP7rZ_0Udpj-ISFPAY028UYKIUZcgOApnipVZwE7xh)

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.

![](/public/newReact.png?raw=true)

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.
# Demo

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.
![](/public/inapp-test-demo-run-test.gif)

![](/public/testfile.png?raw=true)

<br>
***

### The Spearmint Team
<hr>
Expand All @@ -84,24 +71,28 @@ To run Accessibility tests generated by spearmint on URL's with Puppeteer, insta
> Alfred [@astaiglesia](https://github.com/astaiglesia) &nbsp;&middot;&nbsp;
> Annie [@annieshinn](https://github.com/annieshinn) &nbsp;&middot;&nbsp;
> Ben [@bkwak](https://github.com/bkwak) &nbsp;&middot;&nbsp;
> Charlie [@charlie-maloney](https://github.com/charlie-maloney) <br />
> Charlie [@charlie-maloney](https://github.com/charlie-maloney) &nbsp;&middot;&nbsp; <br />
> Chloe [@HeyItsChloe](https://github.com/HeyItsChloe) &nbsp;&middot;&nbsp;
> Cornelius [@corneeltron](https://github.com/corneeltron) &nbsp;&middot;&nbsp;
> Dave [@davefranz](https://github.com/davefranz) &nbsp;&middot;&nbsp;
> Evan [@Berghoer](https://github.com/Berghoer) &nbsp;&middot;&nbsp;
> Gabriel [@bielchristo](https://github.com/bielchristo) <br />
> Dieu [@dieunity](https://github.com/dieunity) &nbsp;&middot;&nbsp;
> Evan [@Berghoer](https://github.com/Berghoer) &nbsp;&middot;&nbsp; <br />
> Gabriel [@bielchristo](https://github.com/bielchristo)
> Johnny [@johnny-lim](https://github.com/johnny-lim) &nbsp;&middot;&nbsp;
> Julie [@julicious100](https://github.com/julicious100) &nbsp;&middot;&nbsp;
> Karen [@karenpinilla](https://github.com/karenpinilla) &nbsp;&middot;&nbsp;
> Justin [@JIB3377](https://github.com/JIB3377) &nbsp;&middot;&nbsp;
> Karen [@karenpinilla](https://github.com/karenpinilla) &nbsp;&middot;&nbsp; <br />
> Linda [@lcwish](https://github.com/lcwish) &nbsp;&middot;&nbsp;
> Luis [@Luis-KM-Lo](https://github.com/Luis-KM-Lo) <br />
> Luis [@Luis-KM-Lo](https://github.com/Luis-KM-Lo) &nbsp;&middot;&nbsp;
> Max [@MaxWeisen](https://github.com/MaxWeisen) &nbsp;&middot;&nbsp;
> Mike [@mbcoker](https://github.com/mbcoker) &nbsp;&middot;&nbsp;
> Natlyn [@natlynp](https://github.com/natlynp) &nbsp;&middot;&nbsp;
> Mo [@mhmaidi789](https://github.com/mhmaidi789) &nbsp;&middot;&nbsp; <br />
> Natlyn [@natlynp](https://github.com/natlynp) &nbsp;&middot;&nbsp;
> Nick [@nicolaspita](https://github.com/nicolaspita) &nbsp;&middot;&nbsp;
> Rachel [@rachethecreator](https://github.com/rachethecreator) &nbsp;&middot;&nbsp;
> Sean [@sean-haverstock](https://github.com/Sean-Haverstock) <br />
> Sharon [@sharon-zhu](https://github.com/sharon-zhu) &nbsp;&middot;&nbsp;
> Sean [@sean-haverstock](https://github.com/Sean-Haverstock) &nbsp;&middot;&nbsp; <br />
> Sharon [@sharon-zhu](https://github.com/sharon-zhu) &nbsp;&middot;&nbsp;
> Sieun [@sieunjang](https://github.com/sieunjang) &nbsp;&middot;&nbsp;
> Tolan [@taoantaoan](https://github.com/taoantaoan) &nbsp;&middot;&nbsp;
> Tristen [@twastell](https://github.com/twastell) <br />
<hr>
> Tristen [@twastell](https://github.com/twastell)
<hr>
7 changes: 7 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* config-overrides.js */

module.exports = function override(config, env) {
//do stuff with the webpack config...
config.target = 'electron-renderer';
return config;
}
43 changes: 32 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "spearmint",
"version": "0.5.0",
"version": "0.6.0",
"description": "An open-source developer tool that simplifies testing and hopes to help increase awareness about web accessibility.",
"author": "spearmintjs",
"author": "team spearmint",
"build": {
"appId": "com.spearmint",
"files": [
Expand All @@ -12,12 +12,24 @@
],
"directories": {
"buildResources": "build"
},
"linux": {
"target": [
"deb"
],
"icon": "build/icon.*",
"maintainer": "Team Spearmint"
}
},
"main": "public/electron.js",
"bugs": {
"url": "https://github.com/oslabs-beta/spearmint_LA42/issues"
},
"homepage": "./",
"private": true,
"dependencies": {
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@types/jest": "^25.2.3",
"@types/react-beautiful-dnd": "^12.1.2",
"@types/react-dom": "^16.9.8",
Expand All @@ -28,33 +40,40 @@
"dotenv": "^8.2.0",
"electron-is-dev": "^1.1.0",
"fibers": "^5.0.0",
"fix-path": "^3.0.0",
"js-beautify": "^1.10.0",
"monaco-editor": "^0.17.0",
"node-sass": "^4.12.0",
"node-pty": "^0.10.0",
"react": "^16.8.6",
"react-autosuggest": "^9.4.3",
"react-beautiful-dnd": "^11.0.3",
"react-dom": "^16.8.6",
"react-modal": "^3.8.1",
"react-monaco-editor": "^0.25.1",
"react-scripts": "^3.4.1",
"sass": "^1.26.5",
"sass": "^1.32.11",
"typescript": "^3.9.2",
"wait-on": "^3.3.0"
"wait-on": "^3.3.0",
"xterm": "^4.11.0",
"xterm-addon-fit": "^0.5.0",
"xterm-for-react": "^1.0.4"
},
"scripts": {
"test": "react-scripts test --env=jsdom",
"install-once": "npm i && npm run electron-rebuild",
"test": "react-app-rewired test --env=jsdom",
"test:e2e": "./node_modules/mocha/bin/mocha src/__tests__/spec.e2e.js",
"test:integra": "mocha src/__tests__/spec.integra.js",
"test:watch": "jest --watch",
"react-start": "react-scripts start",
"react-eject": "react-scripts eject",
"build": "NODE_ENV=production npm run react-build && npm run electron-build",
"build": "NODE_ENV=production react-app-rewired build && npm run electron-build",
"react-build": "NODE_ENV=production react-scripts build",
"electron-build": "NODE_ENV=production electron-builder -mwl",
"electron-rebuild": "electron-rebuild -f -w node-pty",
"postinstall": "electron-builder install-app-deps",
"release": "npm run react-build && electron-builder --publish=always",
"start-windows": "SET NODE_ENV=development concurrently \"cross-env BROWSER=none npm run react-start\" \"wait-on http://localhost:3000 && electron .\"",
"start": "NODE_ENV=development concurrently \"cross-env BROWSER=none npm run react-start\" \"wait-on http://localhost:3000 && electron .\""
"start-windows": "cross-env NODE_ENV=development concurrently \"cross-env BROWSER=none react-app-rewired start\" \"wait-on http://localhost:3000 && electron .\"",
"start": "NODE_ENV=development concurrently \"cross-env BROWSER=none react-app-rewired start\" \"wait-on http://localhost:3000 && electron .\""
},
"browserslist": {
"production": [
Expand All @@ -78,9 +97,10 @@
"@typescript-eslint/parser": "^2.33.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"electron": "^5.0.3",
"electron": "^12.0.5",
"electron-builder": "^22.6.1",
"electron-devtools-installer": "^3.0.0",
"electron-rebuild": "^2.3.5",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint-config-airbnb-typescript": "^7.2.1",
Expand All @@ -89,8 +109,9 @@
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^2.5.1",
"mocha": "^8.3.2",
"react-app-rewired": "^2.1.8",
"react-test-renderer": "^16.12.0",
"spectron": "^5.0.0",
"test-data-bot": "^0.8.0"
}
}
}
Binary file added public/AccLens_Demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/appDemo - Copy.gif
Binary file not shown.
Loading

0 comments on commit c463d04

Please sign in to comment.