You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Windows Developers**: Install Node.js globally, may also have to run Spearmint in admin mode.
6
+
7
+
1. Fork and clone this repository.
8
+
2. Use node version 16.13: ```nvm use 16.13``` (make sure that you already installed v 16.13, ```nvm install 16.13```)
9
+
3.```npm install```
10
+
4. Create a .env file in the root directory of the project
11
+
5. Insert the following lines of code into the .env file
12
+
```
13
+
APP_DEV=true
14
+
BROWSER=non
15
+
SKIP_PREFLIGHT_CHECK=true
16
+
MONGO_LINK=
17
+
```
18
+
6. Set MONGO_LINK to your MongoDB URI (ex: mongodb://localhost:27017)
19
+
7. Make sure your MongoDB is running if it's hosted locally.
20
+
8. ```npm run rebuild```
21
+
9. ```npm run watch``` on one terminal
22
+
10. ```npm run start-dev``` on another terminal, make sure you also use node version 16.13 in this terminal.
23
+
24
+
25
+
26
+
# Build and Run image on Docker
27
+
28
+
## Pre-requisites
29
+
- 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.
30
+
31
+
1. Add `172.17.0.1` and `0.0.0.0` to the network interfaces of mongo config file.
32
+
33
+
a. Open `mongod.cfg` (Usually located in C:\Program Files\MongoDB\Server\4.4\bin)
34
+
35
+
# network interfaces
36
+
net:
37
+
port: 27017
38
+
bindIp: 127.0.0.1, 172.17.0.1, 0.0.0.0
39
+
40
+
2. Run mongo on port 27017
41
+
42
+
- X server
43
+
44
+
1. Download and run either [X410](https://x410.dev/) or [VcXsrv](https://sourceforge.net/projects/vcxsrv/)
45
+
46
+
* For X410, use the following configuration
47
+
48
+

49
+
50
+
* For VcXsrv: change the display number to 0, for other settings, use default.
51
+
52
+

53
+
54
+
55
+
## Running the image
56
+
After running the mongo on port 27017 and running the x server with display number of 0, follow the steps below.
57
+
58
+
1. Build the docker image by running the following command
59
+
60
+
`docker build -t [image name] .`
61
+
62
+
2. Run the docker image by using the following command:
63
+
64
+
`docker run -e DISPLAY='host.docker.internal:0.0' -it -v [directory of project to be tested]:/[directory to create volume] [image name]`
65
+
66
+
- `-e DISPLAY='host.docker.internal:0.0'`: Set environment variable ‘display’ to host.docker.internal:0.0
67
+
68
+
- `-it`: Run container as interactive
69
+
70
+
- `-v`: Creates a volume and mounts the testing application into the container. (ex: `-v [testing files]:[created volume]`)
71
+
72
+
*Please note that once the spearmint container is running, you can only access the folders that you mounted here.
73
+
74
+
*Please note that the image uses root user, as shown in the Dockerfile.
Spearmint helps developers easily create functional Accessibility, Endpoint, GraphQL, Puppeteer, React, Hooks, Redux, Svelte, Vue, and Security 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 Accessibility, Endpoint, GraphQL, Puppeteer, React, Hooks, Redux, Svelte, Vue, Security, and now **_Solid.js_** 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
4
5
5
# Installation
6
-
Please download spearmint from our [website](https://www.spearmintjs.com/). Available for Mac OS, Windows, and Linux.
6
+
Please download spearmint from our [website](https://www.spearmintjs.com/).
7
7
8
8
9
9
# How to use in development mode
10
10
11
-
**Mac Developers**: Install Xcode
12
-
13
-
**Windows Developers**: Install Node.js globally
14
-
15
-
1. Fork and clone this repository.
16
-
2.```npm install```
17
-
3.```npm run watch```
18
-
4.```npm run start-dev```
19
-
20
-
Note: Windows users may also have to run Spearmint in admin mode
21
-
22
-
5. Create a .env file in the root directory of the project
23
-
6. Insert the following lines of code into the .env file
24
-
```
25
-
APP_DEV=true
26
-
BROWSER=non
27
-
SKIP_PREFLIGHT_CHECK=true
28
-
MONGO_LINK=
29
-
```
30
-
7. Set MONGO_LINK to your MongoDB URI
31
-
11
+
Please refer to [README-dev.md](https://github.com/open-source-labs/spearmint/blob/main/README-dev.md)
32
12
33
13
<br>
34
14
@@ -38,93 +18,55 @@ MONGO_LINK=
38
18
39
19
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.
40
20
41
-

21
+

42
22
43
-
2. Utilize our auto-complete, drop-down options, and tooltips features to easily create arrangement, action, and assertion test statements for React, Vue, and Svelte; reducer, action creator, asynchronous action creator, and middleware test statements for Redux; and hooks, context, endpoint, and GraphQL test statements. Spearmint can save test templates for future use for logged in user (not guests).
23
+
2. Utilize our auto-complete, drop-down options, and tooltips features to easily create arrangement, action, and assertion test statements for React, Vue, Svelte, and Solid; reducer, action creator, asynchronous action creator, and middleware test statements for Redux; and hooks, context, endpoint, and GraphQL test statements. Spearmint can save test templates for future use for logged in user (not guests).
44
24
45
-

25
+

46
26
47
27
3. Spearmint will then convert user input to dynamically generate a test file. You can click the export icon on the nav bar to automatically save the test file in the **\_\_tests\_\_** folder to run test or to modify in the future.
48
28
49
-

29
+

50
30
51
31
52
32
4. Lastly click **Run Test** button and follow the guide on the popup and click what type of test you would like to perform.
53
-

54
-
33
+

55
34
56
-
5.The latest version of Spearmint adopted testing capability for Svelte and GraphQL. The [Svelte](https://testing-library.com/docs/svelte-testing-library/intro/) library has been utilized to test your Svelte application.
35
+
5. Spearmint v.0.11 now supports Solid.js, an up-and-coming front-end JavaScript library.
57
36
58
-

37
+

59
38
60
-
# New features with version 0.10.0
39
+
# Containerization with Docker
40
+
Spearmint is now available as an OCI-compliant container image via Docker.
61
41
62
-
* Testing capability for Svelte components
42
+
Windows and Linux users may access Spearmint by running a Docker image.
63
43
64
-
* GraphQL endpoint testing functionality
44
+
Please pull down the image from [Docker hub](https://hub.docker.com/repository/docker/spearmintoslabs/spearmint) if you would like to run Spearmint on Docker.
65
45
66
-
* Google Oauth
46
+

67
47
68
-
* Facebook Oauth
48
+
For developers: [README-dev.md](https://github.com/open-source-labs/spearmint/blob/main/README-dev.md)
69
49
70
-
* Dependency refactoring
50
+
# New features with version 0.11.0
71
51
72
-
*Additional typescript component conversions
52
+
*Testing capability for Solid.js components
73
53
74
-
*Logout button
54
+
*Optimized UI/UX features
75
55
76
-
* UI/UX streamlining
77
-
78
-
* Ample bug fixes
56
+
* Containerization in Docker
79
57
80
58
<br>
81
59
82
-
<!-- # Demos
83
-
84
-
### Guest login
85
-

86
-
87
-
### Signup + login
88
-

89
-
90
-
### Github Oauth login
91
-

92
-
93
-
### Facebook Oauth login
94
-

95
-
96
-
### Google Oauth login
97
-

98
-
99
-
### Vue Test
100
-

101
-
102
-
### Svelte Test
103
-

104
-
105
-
### GraphQL Test
106
-

107
-
108
-
### Dark Mode + Upgraded UI/UX
109
-

110
-
111
-
### Save Test Functionality
112
-

113
-
114
-
### Run a security test
115
-

116
-
117
-
<br> -->
118
-
119
-
120
60
# The Spearmint Team
121
61
<hr>
122
62
123
63
> Alan [@alanrichardson7](https://github.com/alanrichardson7) <br />
124
64
> Alex [@apark0720](https://github.com/apark0720) <br />
125
65
> Alfred [@astaiglesia](https://github.com/astaiglesia) <br />
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!
0 commit comments