Skip to content

Commit f91d8f9

Browse files
authored
Merge pull request #264 from oslabs-beta/dev
version 0.4
2 parents 4f8251b + 3b17ef7 commit f91d8f9

Some content is hidden

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

65 files changed

+4658
-1179
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@
88
"@babel/preset-env",
99
"@babel/preset-react"
1010
],
11+
"plugins": [
12+
["@babel/transform-runtime"]
13+
],
1114
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@ ehthumbs.db
5555
# Windows shortcuts #
5656
#####################
5757
*.lnk
58+
59+
# proto files #
60+
#####################
61+
src/client/components/composer/protos
62+
*.proto

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v10.16.0
1+
12.14.1

README.md

100644100755
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111

12-
Swell is a API development tool that enables developers to test endpoints served over streaming technologies including Server-Sent Events (SSE), WebSockets, HTTP2, and GraphQL.
12+
Swell is a API development tool that enables developers to test endpoints served over streaming technologies including Server-Sent Events (SSE), WebSockets, HTTP2, GraphQL and gRPC.
1313

1414
## Getting Started
1515

@@ -22,6 +22,7 @@ Swell is a one-stop shop for sending and monitoring your API requests
2222

2323
* Send and monitor streams over HTTP2 (including SSEs) and WebSockets
2424
* Create GraphQL queries, mutations, and subscriptions
25+
* Provides full streaming testing support for gRPC
2526
* Support for up to six concurrent connections
2627
* View request/response timing information in an interactive chart
2728
* Save requests in "collections" of multiple requests
@@ -46,6 +47,11 @@ Swell is a one-stop shop for sending and monitoring your API requests
4647
<kbd><img src="./ReadMeGifs/Swell_API_GraphQL_Query.gif"
4748
style="float: left; margin-right: 10px;margin-bottom : 30px; margin-top : 10px;" /></kbd>
4849

50+
### **Latest Swell v.0.4.0 update**
51+
* *gRPC*: Swell includes full support for all four streaming types of gRPC - unary, client stream, server stream, bidirectional stream
52+
<kbd><img src="./ReadMeGifs/Swell_API_gRPC.gif"
53+
style="float: left; margin-right: 10px;margin-bottom : 30px; margin-top : 10px;" /></kbd>
54+
4955
## Additional Features
5056
* *Collections*: Swell allows you to save collections for easier testing of multiple requests.
5157
<kbd><img src="./ReadMeGifs/Swell_API_Collections.gif"
@@ -80,6 +86,12 @@ Swell is a one-stop shop for sending and monitoring your API requests
8086
* **Billy Tran** - [btctrl](https://github.com/btctrl)
8187
* **Paul Rhee** - [prheee](https://github.com/prheee)
8288
* **Sam Parsons** - [sam-parsons](https://github.com/sam-parsons)
89+
* **Nancy Dao** - [nancyddao](https://github.com/nancyddao)
90+
* **Evan Grobar** - [egrobar](https://github.com/egrobar)
91+
* **Dan Stein** - [danst3in](https://github.com/danst3in)
92+
* **Amruth Uppaluri** - [amuuth](https://github.com/amuuth)
93+
* **Yoon Choi** - [cyoonique](https://github.com/cyoonique)
94+
8395

8496
## License
8597

ReadMeGifs/Swell_API_gRPC.gif

7.1 MB
Loading

ReadMeGifs/Swell_API_gRPC_smol.gif

8.48 MB
Loading

__mocks__/electronMock.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const ipcRenderer = {
2+
on: jest.fn()
3+
};

__mocks__/styleMocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = {};
1+
module.exports = 'test-file-stub';

__tests__/businessReducer.js

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import reducer from '../src/client/reducers/business';
2+
import {remote} from "electron";
23

34
describe('Business reducer', () => {
45
let state;
@@ -14,20 +15,35 @@ describe('Business reducer', () => {
1415
protocol: '',
1516
url: 'http://',
1617
method: 'GET',
17-
graphQL: false
18+
graphQL: false,
19+
gRPC: false
1820
},
1921
newRequestHeaders: {
2022
headersArr: [],
2123
count: 0,
2224
},
25+
newRequestStreams: {
26+
streamsArr: [],
27+
count: 0,
28+
streamContent: [],
29+
selectedPackage: null,
30+
selectedRequest: null,
31+
selectedService: null,
32+
selectedStreamingType: null,
33+
initialQuery: null,
34+
queryArr: null,
35+
protoPath: null,
36+
services: null,
37+
protoContent: ''
38+
},
2339
newRequestCookies: {
2440
cookiesArr: [],
2541
count: 0,
2642
},
2743
newRequestBody: {
2844
bodyContent: '',
2945
bodyVariables: '',
30-
bodyType: 'none',
46+
bodyType: 'raw',
3147
rawType: 'Text (text/plain)',
3248
JSONFormatted: true,
3349
},
@@ -331,6 +347,28 @@ describe('Business reducer', () => {
331347
graphQL: true
332348
}
333349
}
350+
const requestStreamsAction = {
351+
type: 'SET_NEW_REQUEST_STREAMS',
352+
payload: {
353+
354+
streamsArr: [],
355+
count: 0,
356+
streamContent: [],
357+
selectedPackage: 'helloworld',
358+
selectedRequest: 'helloRequest',
359+
selectedService: 'hello',
360+
selectedStreamingType: null,
361+
initialQuery: null,
362+
queryArr: null,
363+
protoPath: null,
364+
services: null,
365+
366+
},
367+
}
368+
it('sets the newRequestStreams on SET_NEW_REQUEST_STREAMS', () => {
369+
const { newRequestStreams } = reducer(state, requestStreamsAction);
370+
expect(newRequestStreams).toEqual(requestStreamsAction.payload);
371+
})
334372
it('sets the newRequestFields on POST', () => {
335373
const { newRequestFields } = reducer(state, postAction);
336374
expect(newRequestFields).toEqual(postAction.payload);

__tests__/composerTests.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ import React from 'react';
55
import { configure, shallow } from 'enzyme';
66
import Adapter from 'enzyme-adapter-react-16';
77
import toJson, { mountToJson } from 'enzyme-to-json';
8-
8+
import {remote} from "electron";
99
import { JestEnvironment } from '@jest/environment';
1010
// Enzyme is a wrapper around React test utilities which makes it easier to
1111
// shallow render and traverse the shallow rendered tree.
1212
// import * as actions from '../src/client/actions/actions.js';
1313
// import httpController from '../src/client/controllers/httpController.js'
1414
// import historyController from '../src/client/controllers/historyController.js'
1515
// import reqResController from '../src/client/controllers/reqResController.js'
16-
1716
// import ComposerNewRequest from "../src/client/components/composer/NewRequest/ComposerNewRequest.jsx"; //doesn't like png
1817
import ProtocolSelect from "../src/client/components/composer/NewRequest/ProtocolSelect.jsx";
1918
import FieldEntryForm from "../src/client/components/composer/NewRequest/FieldEntryForm.jsx";
@@ -78,7 +77,7 @@ describe('GraphQL Composer', () => {
7877
},
7978
newRequestBody: {
8079
bodyContent: '',
81-
bodyType: 'none',
80+
bodyType: 'raw',
8281
rawType: 'Text (text/plain)',
8382
JSONFormatted: true,
8483
bodyVariables: ''

0 commit comments

Comments
 (0)