Skip to content

Commit 6e429f9

Browse files
Merge pull request #308 from oslabs-beta/master
LA46 - Chris Pan, Jennifer Wu, Adrian Uesugui, Jacob Viesselman, Michael Prince
2 parents abe8e9c + c1d03fc commit 6e429f9

File tree

90 files changed

+1891
-1044
lines changed

Some content is hidden

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

90 files changed

+1891
-1044
lines changed

.eslintrc.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ module.exports = {
1818
version: 'detect',
1919
},
2020
'import/resolver': {
21-
typescript: {},
21+
typescript: {
22+
// "alwaysTryTypes": true, //->new
23+
},
2224
'babel-module': {
2325
root: ['.'],
2426
alias: {
@@ -75,7 +77,7 @@ module.exports = {
7577
'guard-for-in': 0,
7678
'import/extensions': 0,
7779
'import/no-extraneous-dependencies': 0,
78-
'import/no-unresolved': 0,
80+
'import/no-unresolved': 0, // <-- was 0
7981
'import/prefer-default-export': 0,
8082
'max-len': 0,
8183
'no-alert': 0,
@@ -138,6 +140,7 @@ module.exports = {
138140
},
139141
'import/resolver': {
140142
typescript: {
143+
// alwaysTryTypes: true, //<--- just added this
141144
project: './tsconfig.json',
142145
},
143146
},

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ Swell is a one-stop shop for sending and monitoring your API requests
7171
]
7272
```
7373

74+
- _Webhooks_: Swell includes user-defined HTTP callback connection testing designed to test other server's connection to the web and ability to send data. The test insures that when an event occurs, the source site makes an HTTP request to the URL configured for the webhook.
75+
<kbd><img src="./ReadMeGifs/Gifs/Webhook.gif" style="float: left; margin-right: 10px;margin-bottom : 30px; margin-top : 10px;" /></kbd>
76+
7477
## Additional Features
7578
7679
- _Scripting in Swell_: Swell allows you to write assertion tests to aid in the test-driven development cycle of backend API services.
@@ -87,6 +90,9 @@ Swell is a one-stop shop for sending and monitoring your API requests
8790
- _Schedule Tests_: You can also automate sending requests to occur on a periodic basis.
8891
<kbd><img src="./ReadMeGifs/Gifs/ScheduleTest.gif"
8992
style="float: left; margin-right: 10px; margin-bottom : 30px; margin-top : 10px; border: 1px solid black;" /></kbd>
93+
- _Dark Mode_: Swell allows you to toggle between light and dark mode when viewing the application.
94+
<kbd><img src="./ReadMeGifs/Gifs/DarkMode.gif"
95+
style="float: left; margin-right: 10px; margin-bottom : 30px; margin-top : 10px; border: 1px solid black;" /></kbd>
9096
9197
## Built With
9298
@@ -148,6 +154,11 @@ Swell is a one-stop shop for sending and monitoring your API requests
148154
- **Ted Craig** - [tedcraig](https://github.com/tedcraig)
149155
- **Anthony Wong** - [awong428](https://github.com/awong428)
150156
- **John Jongsun Suh** - [MajorLift](https://github.com/MajorLift)
157+
- **Christopher Pan** - [ChristopherJPan](https://github.com/ChristopherJPan)
158+
- **Adrian Uesugui** - [auesugui](https://github.com/auesugui)
159+
- **Jennifer Wu** - [jsh-wu](https://github.com/jsh-wu)
160+
- **Jacob Viesselman** - [JacobViesselman](https://github.com/JacobViesselman)
161+
- **Michael Prince** - [MichaelGPrince](https://github.com/MichaelGPrince)
151162
152163
## License
153164

ReadMeGifs/Gifs/DarkMode.gif

1.22 MB
Loading

ReadMeGifs/Gifs/Webhook.gif

534 KB
Loading

__tests__/businessReducer.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ describe('Business reducer', () => {
118118
history: [
119119
{
120120
id: 'd79d8f1a-f53c-41a1-a7e3-514f9f5cf24e',
121-
created_at: '2019-02-15T21:40:44.132Z',
121+
createdAt: '2019-02-15T21:40:44.132Z',
122122
},
123123
{
124124
id: 'c8d73eec-e383-4735-943a-20deab42ecff',
125-
created_at: '2019-02-15T20:52:35.990Z',
125+
createdAt: '2019-02-15T20:52:35.990Z',
126126
},
127127
],
128128
},
@@ -131,11 +131,11 @@ describe('Business reducer', () => {
131131
history: [
132132
{
133133
id: '0faf2207-20d3-4f62-98ca-51a39c8c15dd',
134-
created_at: '2019-02-15T00:40:56.360Z',
134+
createdAt: '2019-02-15T00:40:56.360Z',
135135
},
136136
{
137137
id: '577eab93-e707-4dc0-af45-7adcc78807fa',
138-
created_at: '2019-02-15T00:16:56.133Z',
138+
createdAt: '2019-02-15T00:16:56.133Z',
139139
},
140140
],
141141
},
@@ -160,7 +160,7 @@ describe('Business reducer', () => {
160160
history: [
161161
{
162162
id: 'c8d73eec-e383-4735-943a-20deab42ecff',
163-
created_at: '2019-02-15T20:52:35.990Z',
163+
createdAt: '2019-02-15T20:52:35.990Z',
164164
},
165165
],
166166
},
@@ -169,11 +169,11 @@ describe('Business reducer', () => {
169169
history: [
170170
{
171171
id: '0faf2207-20d3-4f62-98ca-51a39c8c15dd',
172-
created_at: '2019-02-15T00:40:56.360Z',
172+
createdAt: '2019-02-15T00:40:56.360Z',
173173
},
174174
{
175175
id: '577eab93-e707-4dc0-af45-7adcc78807fa',
176-
created_at: '2019-02-15T00:16:56.133Z',
176+
createdAt: '2019-02-15T00:16:56.133Z',
177177
},
178178
],
179179
},
@@ -188,7 +188,7 @@ describe('Business reducer', () => {
188188
type: 'DELETE_HISTORY',
189189
payload: {
190190
id: '0faf2207-20d3-4f62-98ca-51a39c8c15dd',
191-
created_at: '2019-02-15T00:40:56.360Z',
191+
createdAt: '2019-02-15T00:40:56.360Z',
192192
},
193193
};
194194

@@ -205,7 +205,7 @@ describe('Business reducer', () => {
205205
type: 'DELETE_HISTORY',
206206
payload: {
207207
id: 'c8d73eec-e383-4735-943a-20deab42ecff',
208-
created_at: '2019-02-15T20:52:35.990Z',
208+
createdAt: '2019-02-15T20:52:35.990Z',
209209
},
210210
};
211211
const initialHistory = state.history;
@@ -234,15 +234,15 @@ describe('Business reducer', () => {
234234
describe('REQRES_ADD', () => {
235235
const fakeReqRes1 = {
236236
id: 'd79d8f1a-f53c-41a1-a7e3-514f9f5cf24e',
237-
created_at: '2019-02-15T21:40:44.132Z',
237+
createdAt: '2019-02-15T21:40:44.132Z',
238238
protocol: 'http://',
239239
request: { method: 'POST', body: 'I am a request body' },
240240
response: {},
241241
};
242242

243243
const fakeReqRes2 = {
244244
id: 'c8d73eec-e383-4735-943a-20deab42ecff',
245-
created_at: '2019-02-16T20:52:35.990Z',
245+
createdAt: '2019-02-16T20:52:35.990Z',
246246
protocol: 'http://',
247247
request: { method: 'POST', body: 'I am a newer request body' },
248248
response: {},
@@ -281,15 +281,15 @@ describe('Business reducer', () => {
281281
const fakeReqResArray = [
282282
{
283283
id: 'c8d73eec-e383-4735-943a-20deab42ecff',
284-
created_at: '2019-02-15T20:52:35.990Z',
284+
createdAt: '2019-02-15T20:52:35.990Z',
285285
},
286286
{
287287
id: '0faf2207-20d3-4f62-98ca-51a39c8c15dd',
288-
created_at: '2019-02-15T00:40:56.360Z',
288+
createdAt: '2019-02-15T00:40:56.360Z',
289289
},
290290
{
291291
id: '577eab93-e707-4dc0-af45-7adcc78807fa',
292-
created_at: '2019-02-15T00:16:56.133Z',
292+
createdAt: '2019-02-15T00:16:56.133Z',
293293
},
294294
];
295295

@@ -313,23 +313,23 @@ describe('Business reducer', () => {
313313
const fakeReqResArray = [
314314
{
315315
id: 'c8d73eec-e383-4735-943a-20deab42ecff',
316-
created_at: '2019-02-15T20:52:35.990Z',
316+
createdAt: '2019-02-15T20:52:35.990Z',
317317
},
318318
{
319319
id: '0faf2207-20d3-4f62-98ca-51a39c8c15dd',
320-
created_at: '2019-02-15T00:40:56.360Z',
320+
createdAt: '2019-02-15T00:40:56.360Z',
321321
},
322322
{
323323
id: '577eab93-e707-4dc0-af45-7adcc78807fa',
324-
created_at: '2019-02-15T00:16:56.133Z',
324+
createdAt: '2019-02-15T00:16:56.133Z',
325325
},
326326
];
327327

328328
const action = {
329329
type: 'REQRES_UPDATE',
330330
payload: {
331331
id: '0faf2207-20d3-4f62-98ca-51a39c8c15dd',
332-
created_at: '2018-02-15T00:40:56.360Z',
332+
createdAt: '2018-02-15T00:40:56.360Z',
333333
newKey: 'this is a new value',
334334
},
335335
};

__tests__/dbTests.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Dexie.dependencies.IDBKeyRange = require('fake-indexeddb/lib/FDBKeyRange');
1414
const db = new Dexie('test');
1515

1616
db.version(2).stores({
17-
history: 'id, created_at',
18-
collections: 'id, created_at, &name',
17+
history: 'id, createdAt',
18+
collections: 'id, createdAt, &name',
1919
});
2020

2121
db.version(1).stores({
22-
history: 'id, created_at',
22+
history: 'id, createdAt',
2323
});
2424

2525
// now we have db.history and db.collections
@@ -45,7 +45,7 @@ describe('db test', () => {
4545

4646
it('will not add history without an id', async () => {
4747
await db.history
48-
.put({ created_at: Date.now() })
48+
.put({ createdAt: Date.now() })
4949
.catch((err) => expect(err.name).toEqual('DataError'));
5050
const count = await db.history.count();
5151
expect(count).toEqual(0);

__tests__/httpTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ xdescribe('REST API Requests', () => {
7070
// define request
7171
const request = {
7272
id: 'testID',
73-
// created_at: 2020-11-04T19:33:55.829Z,
73+
// createdAt: 2020-11-04T19:33:55.829Z,
7474
protocol: 'http://',
7575
host: 'http://jsonplaceholder.typicode.com',
7676
path: '/posts',

main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Allow self-signing HTTPS over TLS
2-
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 1;
2+
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = 1;
33
// Allow self-signing HTTPS over TLS
44
// Disabling Node's rejection of invalid/unauthorized certificates
5-
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
5+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
66
// from stack overflow: https://stackoverflow.com/a/35633993/11606641
77
// Your fix is insecure and shouldn't really be done at all, but is often done in development (it should never be done in production).
88
// The proper solution should be to put the self-signed certificate in your trusted root store OR to get a proper certificate signed by an existing Certificate Authority (which is already trusted by your server).
@@ -329,7 +329,7 @@ ipcMain.on('import-collection', (event, args) => {
329329
!parsed.id ||
330330
!parsed.name ||
331331
!parsed.reqResArray ||
332-
!parsed.created_at
332+
!parsed.createdAt
333333
) {
334334
options.message = 'Invalid File';
335335
options.detail = 'Please try again.';

0 commit comments

Comments
 (0)