Commit Graph

61 Commits

Author SHA1 Message Date
Hexxa
2898c2fb8d
fix: avoid rendering script by temporarily disable it (#7466) 2024-05-30 16:20:08 +08:00
Hexxa
55440c77ae
fix: unify after-response script property name for folders (#7460) 2024-05-29 10:28:17 +08:00
Hexxa
46b6ea811e
feat: enable major features of the after-response script (#7411)
* feat: update data model and request-pane to support post-req-script

* fix: unit test failed

* feat: integrate post-request script to the engine - INS-3785,INS-3786 (#7329)

* feat: integrate post-request script to the engine

* refactor: some minor improvements

* fix: lint error

* chore: clean up typings

* refactor: separate transforming into sync and async parts

* use named args

* fix: renaming pre-req vars, functions and 2 minor fixes

* fix: the error message is updated

* feat: add snippets for post-request scripting (#7395)

* feat: enable extended assertion chains on `insomnia.response` (#7396)

* feat: add snippets for post-request scripting

* feat(sdk): support response.to.have assertion for verifying response

* chore: fix lint error

---------

Co-authored-by: jackkav <jackkav@gmail.com>

* test: add tests for post-request scripts and post-request scripts - INS-3786 (#7331)

* test: add some tests for post-req script and script engine

* fix: incorrect script type

* chore: refresh package-lock after merging

* chore: clean up package-lock.json

* fix: failed tests after rebasing

* feat: support importing post-req script from Postman (#7423)

* feat: support importing post-req script from Postman

* fix: introduce post-req script property for merged changes

* test: add a test case for importing scripts

* fix: add missing fixture

* chore: remove row after merging

* chore: rename to after-response-script

* fix test

* refresh lock

* update snapshot

* extract pre request logic to function

* refresh lock again

* throw on base env

* fix: revert the logic which rejects the case of unselected environment

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-05-23 15:25:35 +08:00
Hexxa
e5ce4cd390
fix: init the hidden window when renderers are reloaded (#7428)
* fix: init the hidden window when renderers are reloaded

* fix: missing some smoke test stuff after merging

* feedback

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-05-22 09:29:49 +02:00
Jack Kavanagh
5e673767ae
can navigate to folder and inherit auth (#7353)
* can navigate to folder

* add docs tab

* can edit pre request script

* refactor authdropdown to support groups

* can input auth in folders

* can concat scripts

* ensure scripts are scoped

* inherit auth from parent folder

* extract to function

* support inherit

* remove console log

* fix inheritance

* fix types

* remove console.log

* skip pre request for now

* hide response pane

* reload on env modified

* fix oauth1 and support undefined auth

* add auth test

* watch sync for updates

* collapse folder only on icon click

* review feedback

* remove pre-req logic
2024-05-17 12:37:39 +02:00
Hexxa
69fb149274
fix(sdk): some of external modules are missing (#7315)
* fix: some external modules are missing

* chore: update @types/tv4

* chore: use map instead of switch-case statement

* test(scripting): check using external libs in the critical test suite
2024-04-26 19:44:01 +08:00
Hexxa
8e00a2e27e
fix: persist script's changes on environment and baseEnvironment (#7306)
* fix: persist script's changes on environment and baseEnvironment

* fix: avoid persisting effect when no environment is activated

* fix: comparing mutated env with baseEnvironment

* Update packages/insomnia/src/ui/routes/request.tsx

---------

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
2024-04-24 12:04:37 +02:00
Hexxa
ba610daca3
fix: insomnia.environment.name is missing (#7289) 2024-04-22 16:57:36 +08:00
Hexxa
03c74532c0
feat(hidden-win): try to simulate the existing behavior of handling async tasks (#7281) 2024-04-19 12:23:33 +02:00
Hexxa
6c63b0d8d3
feat: enable external modules in pre-request script (#7257) 2024-04-15 10:14:00 +02:00
Hexxa
7f767a8341
feat: translate pm object handler into insomnia object instead of supporting alias - INS-3702 (#7253)
* feat: translate pm object handler into insomnia object instead of supporting alias

* chore: remove comment

* simplify implementation

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-04-09 13:13:51 +00:00
Hexxa
aaf76f755e
fix: some minor fixes for pre-request script sdk - INS-3379 (#7225)
* fix: try to make sendRequest compatible with the existing behavior by adding await

* fix: add _index for making method behavior (such as upsert) consistent with existing ones
2024-04-09 13:00:09 +00:00
Hexxa
38896f4547
feat: enable insomnia.test and insomnia.expect in scripting - INS-3637 (#7202)
* feat: enable insomnia.test and insomnia.expect in scripting

* fix: lint error

* feat: enable replaceIn method
2024-03-26 15:04:26 +01:00
Hexxa
a79b01e1e6
chore(pre-req): clean up pre-request script sdk objects - INS-3379 (#7172)
* feat: enable eval() in script

* feat: enable requiring node.js modules

* fix: request auth type is not correctly updated

* test: add tests for unphappy paths

* test: fixed a flaky test

* chore: make console.log outputs more friendly

* feat: enable requiring npm modules and built-in lodash

* fix: add prefix to 'fs' module requiring name as it is for internal usage

* fix: smoke test failure

* fix: use fs module directly to avoid exposing it

* fix: replace atob btoa with node.js modules

* chore: remove unused line

* fix: lint error

* fix: smoke test failed because fs no longer exposed

* fix: use builtin atob, btoa

* fix: disable lint error for builtin lodash

* chore: remove lodash as it's redundant

* chore: temporarily remove external dependencies

* fix: rebase and update smoke tests style

* chore: restore lock

* chore: remove comments

* chore: remove comments
2024-03-22 20:02:56 +08:00
Hexxa
fab636a669
feat(pre-req): enable manipulation of proxy and certificate through insomnia.request - INS-3379 (#7171)
* feat: enable manipulation on insomnia.request

* feat: enable manipulate proxy, certificate and auth through insomnia.request

Changes:
- chore: revert changes on test
- fix: allow user to update active request certs and proxy through insomnia.request
- feat: hook settings to insomnia.request and cleanups
- test: add a test for proxy and certificate manipulation
- fix: lint error
- fix: problems after rebasing
- fix: revamp auth transforming functions
- fix: type checking
- test: add a unit test for auth transforming

* chore: move auth manipulation changes to another PR

* fix: missing OAuth2AuthOption and lint error

* fix: add back UT for auth transforming

* fix: incorrect merging

* fix: lint error

* chore: remove no-proposed comparison

* fix: use predefined requests for test instead of reusing one

* fix: remove waiting

* test: refactor smoke tests to use predefined request if possible
2024-03-21 11:35:51 +00:00
Hexxa
7bd2441178
feat: enable insomnia.sendRequest in pre-request scripting - INS-3379 (#7147)
* feat: enable manipulation on insomnia.request

* chore: revert changes on test

* chore: fix and re-org pre-request scripts

* fix: bring back request test in smoke spec

* feat: enable insomnia.sendRequest

* chore: implement req-sender with function, remove unused cancellation

* add types

* feedback

* remove duplicate enums

* fix: pass settings and certificates to the hidden window

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-03-15 17:27:49 +08:00
Hexxa
bdd0d420e5
feat: enable manipulation on insomnia.request - INS-3379 (#7145)
* feat: enable manipulation on insomnia.request

* chore: revert changes on test

* fix: lint errors

* chore: clean up dependencies

* fix: lint error

* fix: smoke test failure

* chore: fix and re-org pre-request scripts

* fix: bring back request test in smoke spec
2024-03-08 16:40:20 +01:00
Hexxa
2ee1475cea
feat: enable property in pre-request scripting (#7120) 2024-02-29 10:51:49 +08:00
Hexxa
d7a0bc1e58
feat(hidden-window): enable baseEnvironment in the pre-request scripting (#7102)
* feat(hidden-window): enable baseEnvironment in the pre-request scripting

* fix: input empty selected environment data to avoid incorrect environment manipulation and overriding

* test: add a test for folder environments overriding

* fix: smoke tests failed because of env overriding
2024-02-23 20:00:20 +08:00
Hexxa
7718df0489
feat(hidden-window): enable the insomnia object with the environment api [INS-3379] (#7097)
* feat(hidden-window): enable the insomnia object with the environment api

* fix: tests and lint errors

* fix: app building is flaky

* fix: fallback to the original environment instead of an invalid id

* chore: improve comment and remove unused code
2024-02-21 18:02:59 +08:00
Jack Kavanagh
8ff2c6b522
feat(prereq): add cancellation (#7078)
* add cancellation

* add cancel test

* fix test

* remove folder check
2024-02-13 10:28:46 +01:00
Jack Kavanagh
039c12160c
E2e/mock-test-fixture (#7086)
* fix export

* add fixture

* use fixture
2024-02-13 09:01:32 +00:00
Jack Kavanagh
c0707c884f
Add pre-request tab and minimal execution context (#7065)
* works

* add preload

* promise api

* tidy

* create hash works

* return errors from worker

* basic wiring

* remove preload

* move build output to folder

* async execution

* add simple context object

* smoke test

* fix types

* fix unit tests

* remove createHash remote function

* tidy

* naming

* fix test

* add errors to preview and timeline

* basic require support

* fix types

* fix warning

* can get logs

* fix console.log patch

* logs

* fix test

* remove log

* skip mock test

* fix test

* fix types

* can write to timeline

* add watcher

* improved dx

* can console.log in the script

* simplify

* enable contextIsolation

* fix types

* use vite for hidden window build and dev

* fix type

* rename

* move pre request test to critical

* fix typo

* close ports

* unskip test
2024-02-09 10:51:55 +00:00
Jack Kavanagh
e3caa557be
Test/ssl-cert-flow (#6750)
* client cert ui

* first pass

* use import to avoid url onChange timing issue

* re order test

* use 4001 port, refresh certs

* move test to critical

* expose cacert create over maain
2023-12-14 16:03:26 +08:00
KobeNguyenT
1d9768909b
feat(tests): support json schema validation (#6532)
* feat(tests): support json schema validation

* add json schema to cli test

---------

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2023-12-06 16:09:46 +00:00
Mark Kim
83a3fab4c4
fix: graphql render issue caused by illegal Object.includes() (#6861)
* fix: graphql render issue caused by illegal JSON.includes()

* fix: redner gql pane failed

* chore: add comment

* fix: add tests for gql

* fix: add workaround to send graphql variables as object before sending request [n/a]

* fix: rm unnecessary bit of code on graphql editor [n/a]

---------

Co-authored-by: George He <hexxa@outlook.com>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2023-11-23 16:12:36 +00:00
Filipe Freire
e9e1d27add
chore: fix smoke tests that depended on mockbin [no-ticket] (#6740) 2023-10-31 15:31:31 +01:00
James Gatz
6ef9a46814
Api V2 (#6135)
* Add support for multiple remote projects per Team (#6009)

* update fetching of teams

* create and delete remote projects

* backend project sync using the new teamProjectId in the API

* indicator

* use team api to get organization data

* handle logged out state

* remove remote from duplicate modal

* remaining insomnia fetch fixes

* fix ts issues

* fix ts log issue

* fix ts error

* fix ts update

* fix tests

* remove log

* add types to insomniaFetch

* named arguments in vcs

---------

Co-authored-by: jackkav <jackkav@gmail.com>

* Project Presence (#6079)

* fix ts log issue

* fix ts update

* update fetching of teams

* create and delete remote projects

* real-time

* update api changes

* check for successful response

* get user profile

* cleanup

* update fetch

* update network status

* fix for insomniaFetch new api

* insomnia fetch from window

* fix missing stat

* fix project dropdown

* update avatar

* update presence when closing the app

* update the presence every minute

* cleanup presence

* use eventsource and improve debugging

* Cloud only projects (#6167)

* Add support for multiple remote projects per Team (#6009)

* update fetching of teams

* create and delete remote projects

* backend project sync using the new teamProjectId in the API

* indicator

* use team api to get organization data

* handle logged out state

* remove remote from duplicate modal

* remaining insomnia fetch fixes

* fix ts issues

* fix ts log issue

* fix ts error

* fix ts update

* fix tests

* remove log

* add types to insomniaFetch

* named arguments in vcs

---------

Co-authored-by: jackkav <jackkav@gmail.com>

* login routes

* cleanup logged in state

* update organizations

* fixes

* update migration

* auto init sync on workspaces without git

* fix auto init sync

* checkpoint

* update import options in empty project pane

* responsive styles

* update package-lock

* join an org in sidebar

* readability improvements

* move modals and root loader to org

* cleanup root

* expire session take 1

* cleanup default org id

* fix ts issue

---------

Co-authored-by: jackkav <jackkav@gmail.com>

* Add Scratch Pad collection (#6221)

* add scratchpad collection

* filter scratchpad from cloud migration

* disable sync for scratchpad

* update settings for scratchpad

* log in rename

* check if user is logged in or has logged in before

* use organization api

* organizations api fixes

* update urls

* move modals to root

* update org navbar links

* lint fix

* type-check

* Add form for setting up the staging env

* add autolinking

* onboarding

* remove default org id

* staging urls

* avatar styles

* update urls

* use display name for orgs

* update settings modal with dev

* proper project deletions

* fix api calls perf

* sidebar improvements

* layout styles

* disable tests for now

* fix boolean

* fix data migration

* dev settings styles

* test init

* organization names

* link styles

* improve scratchpad banner styles

* http colors

* url bar styles

* spinner styles

* breadcrumbs styles

* help and feedback links

* settings to root

* onboarding

* fetch remote projects on org nav

* update avatar styles

* use name initials in avatars

* don't allow to delete default organization project

* add scratchpad checks

* tests

* workspace settings tabs types

* export all workspaces

* fix types and personal org

* project permission checks

* continue with sso

* organization avatars

* project presence avatars

* fix privacy/terms links

* add the no-wrap classname

* update user name and email in the app

* fix delete action

* ai fetching

* generate tests in sequence to help with rate limiting

* wip testing

* wip test

* improve test and migration script

* fix ts

* local to cloud projects test

* set local-to-cloud-projects.test as slow

* fix e2e tests

* update settings tests

* update more apis that changed from teams -> organizations

* simplify remote project migration

* org.branding can be undefined

* fix imports issue in sr

* remove .only

* remove unused gql query

* fix onboarding height jump

* trust some rnd and upload artifacts on failure

* fix env vars replacement on prod

* fix constant name

* bring back checks

* fix inso test

* add temp changes

* fix inconsistent response handling

* handle bad auth code errors

* show email when logged in

* remove the concept of default_project

* cleanup auth styles

* fix: use scratchpad constants wherever needed and remove seed

* fix sentry lint error

* migrate with update

* add scratch pad fixture and typing

* refactor pushSnapshotOnInitialize to always work

* remove console.log

* remove account from preferences

* improve trail-lines styles

* fix project sidebar scroll issue

* only create diff of projects

* fix lint

* sync

* feat: add plan upgrading modal for git sync (#6516)

* feat: add plan upgrading modal for git sync

* feat: add plan upgrading modal to project git menu and grid menu

* fix: use JSON.parse for getting flag value

* update ask modal

* remove git option from workspace settings

---------

Co-authored-by: gatzjames <jamesgatzos@gmail.com>

* sort projectswith default at top

* create local copies of remotes

* update presence exit update

* renames

* fix deleting/renaming projects with remoteId

* remoteId instead of projectId

* remote-collections

* fix initializeProjectForTeam

* fix missing parentId in remote projects

* add missing billing api

* add migration page and check for migrations

* cleanup project sync logic

* fix remote projects updating

* add notes

* fix backend-project test

* fix: use features API for fetching feature list (#6538)

* members -> collaborators

* remove dev settings

* use shouldRunMigrations in onboarding

* fix empty pane styles

* remove beforeUnload for presence

* show expiry info

* better error for upgrade in new project action

* extend retry period

* fallback and control revalidate

* add pending indicator for switching organizations

* fix exports (#6553)

* Sync Organizations (#6551)

* organization cache and updates

* error handling in org sync

* sort organizations

* clean up sort

* org sort and avatar fallback

---------

Co-authored-by: jackkav <jackkav@gmail.com>

* Presence updates (#6552)

* use remoteId for presence

* use project loader for the active project

* fix in present users

* logic clean

* match remoteId checks

---------

Co-authored-by: jackkav <jackkav@gmail.com>

* add default color to loading indicator

* fix redirect loop when there are no projects

* scratchpad fallback on initial route load

* re-enable ai check

* update error in renameProject

* db query to get projects in workspace

* review fix

* comments

* remove initModelFrom magic

* fix lint issue

---------

Co-authored-by: jackkav <jackkav@gmail.com>
Co-authored-by: Mark Kim <mark.kim@konghq.com>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
Co-authored-by: Hexxa <hexxa@outlook.com>
2023-09-24 23:12:50 +00:00
Jack Kavanagh
3cdd4c8491
SSE/EventStream support (#6147)
* new request

* add button

* s

* fix formatting issue

* detect event stream

* hide dropdown

* wip

* add basic test

* pass 1 can make connection

* implement event stream open pass 2

* wire up ready state

* wiring up close and error pass 3

* can open and close connections

* clean header

* listen to timeline

* extract options to function

* fix bug in ws

* add debug stuff to timeline

* don't rely on redux to set active response

* fix close type

* rename sse to event stream

* get request flag from request model

* copy websocket response pane

* hide response data

* flatten ws and curl responses

* fix test

* fix catch

* reset file

* use realtime event watcher

* rename some files

* fix types

* fix e2e test

* fix lint

* consistent empty states

* pin to bottom

* remove todo

* add SSE logo

* add sse to readme
2023-07-19 09:58:37 +00:00
Filipe Freire
bfb2821993
Environment Editor PreRelease Smoke Tests (#5502)
* Create initial test file and fixture

* fix create environment dropdown minor bug

* Add tests, datatestid & edit fixture
2023-01-26 08:39:32 +00:00
Jack Kavanagh
1bb9607c39
gRPC server reflection support (#5518)
* eliminate grpc paths

* add fake reflection ux

* add grpc packages

* basic ux

* first working pass

* package lock

* reset selected protofile

* fix types

* ssl

* improve naming

* remove deprecated grpc url parse

* remove broken test

* replace grpc proto PR test with reflection
2022-12-14 12:27:39 +00:00
Filipe Freire
ecf4c0ef65
Add server reflection to smoke test grpc server (#5517)
* Add server reflection to smoke test grpc server

* remove unnecessary proto file
2022-12-13 21:34:15 +01:00
Filipe Freire
792bf7034d
Add prerelease grpc smoke tests (#5480)
* Add prerelease grpc smoke tests

* Wrap up smoke tests

* small improvements

* Remove duplication
2022-12-07 10:33:15 +00:00
Filipe Freire
943c28cc12
[INS-2082] Add prerelease tests for Design interactions (#5415)
* initial commit

* Add prerelease tests for Unit Test feature

* Add test to import oa3 spec into design doc
2022-11-22 11:32:05 +00:00
kreosus
df2488ae48
[INS-2129] Add prerelease smoke test to open properties of a folder (#5423)
* WIP to open properties of a folder

* FIx Open properties of a folder test
2022-11-17 16:45:07 +00:00
kreosus
95babda62e
Adding initial test for debug-sidebar (#5393)
* Adding initial test for debug-sidebar

* Add data-testids to interact with dropdowns better

Co-Authored-By: kreosus <59621250+kreosus@users.noreply.github.com>

* Rename testHandle to dataTestId

Co-authored-by: kreosus <kreosus@users.noreply.github.com>

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
Co-authored-by: kreosus <kreosus@users.noreply.github.com>
2022-11-09 14:34:34 +00:00
Filipe Freire
d3bded4fe0
[INS-2078] Dashboard PreRelease tests (#5330)
* [INS-2077] Dashboard PreRelease tests

* Add create,rename,delete project test

* Add test for filter in the dashboard

* Rename/duplicate/delete collection & design tests
2022-10-27 17:49:45 +01:00
Filipe Freire
c501ae9963
Add /delay endpoint to WS express server (#5326) 2022-10-26 08:38:10 +00:00
James Gatz
0373bb578b
Initial WebSocket support (#5043)
* [INS-1697] Create WebSocket Request (#5041)

* add fail safe

Co-authored-by: Mark Kim <mark.kim@konghq.com>

* Websockets IPC API (#5044)

* add url to ws-request model

* fix webSocketRequest typo and add url

* add websocket api and expose it through preload ipc

* add typings

Co-authored-by: Mark Kim <mark.kim@konghq.com>

* [INS-1701] Create/Close Websocket Connection (#5046)

* add websocket action bar and its components

* remove comments

* clean up

* reflect on the electron api

* remove unused files

* import name change

* add styling

* remove commet

* add suggested changes

* remove default value

* Add WebSocketRequest to sidebar and update types (#5048)

* [INS-1700] Delete Websocket Request (#5055)

* add websocket actions dropdown

* add actions to websocket request in sidebar

* [INS-1703] Display WebSocket messages - first pass (#5054)

* Update event types to improve inference

* Update websocket response pane to fetch/subscribe and display the events

* [INS-1693] Add WS echo server for smoke tests (#5050)

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>

* fix sidebar unit tests (#5064)

* [INS-1776] adds `ws` dependency explicitly (#5066)

* [INS-1702] WebSocket Send Message (#5052)

* add initial changes for websocket message

* add abstraction for db operation and websocket operation

* remove console

* add rename

* add basic testing

* add basic testing

* add unit tests

* add form event type

* add comments

* disallow exporting context directly

* add suggested changes

* refresh the query

* using useDeepCompareEffect

* rename variable

* add mock

* clean up

* clean up

* correct the file name

* add some changes

* removing nedb-context and its hooks

* remove database changes for event sending

* [INS-1778] Fix Global Module Typing Issue (#5065)

* fix typings

* add jest import

* [INS-1703] View WebSocket Messages (#5074)

* save changes

* add styles and move files around

* remove unused code

* clean up some components

* add clean up

* add timestamp component

* add unit tests

* add case

* add style changes

* [INS-1786] WebSocket headers tab (#5080)

* first ui pass

* extract and wire up bulk editor

* raise ready state, move send

* add upgrade header debug logs

* can pass header to websocket upgrade

* implement readOnly headers

* add upgrade event and sent headers

* clean up

* fill out http upgrade into the event

* change upgrade message

* read only headers while connected

* remove upgrade event

* revert bulk editor change

* fix header editable toggle

* add nunjucks todos

* improve readOnly implementation

* disable codemirror/nunjucks for websocket headers

* take calculated headers out of the data model

* move hardcoded default headers down the tree

* fix request url rendering issue

* removed spammy warning

* clarify prop name

* refine pair typing

* change placeholder

* remove readOnly header property

* fix readOnly header layout

* Update packages/insomnia/src/ui/components/dropdowns/websocket-request-actions-dropdown.tsx

* Show HTTP->WS upgrade (handshake) (#5091)

* first pass as event

* add handshake ui

* add timeline tab

* simplify ResponseTimelineViewer

* transform res debug modal to change timeline props

* decouple timeline fetching from timeline component

* timeline ui pass

* record headers in request and response models

* can view timeline history

* write timeline to file

* some timeline

* can persist event logs

* put interface beside usage

* add note

* add event log history

* remove table event row

* tidying up

* make ws colors match

* enable multiple open connections

* close open connections at app exit

* remove old test

* Update packages/insomnia/src/models/request-version.ts

* fix type

* default readystate

* fix preview css scroll

Co-authored-by: James Gatz <jamesgatzos@gmail.com>

* INS-1788: Add control flow to improve responsiveness. (#5094)

* INS-1788: Add control flow for responsiveness.

This prevents events from flooding the UI thread entirely.

* Add additional code comments.

* fixup: webSocketEvent -> webSocketEvents

* display response headers (#5102)

* Show errors in timeline (#5100)

* remove unused context provider

* show errors in event tab

* updates timeline with message and close

* clean up

* show errors in timeline

* fix WebSocket capitalisation

* make timeline reader specific to ws

* write outbound messages to the timeline

* fix type

* Make the head row sticky in the events table (#5103)

* Add client certificate support to websocket connections (#5112)

* [INS-1810] close connection on response change (#5104)

* close ws connection when response is changed

* add delete logic for the queue mapg

* set error response to active response

* useRef for CodeEditor

* extract closeRequest

* use requestId to eliminate inconsistencies

* refactor extract clean up methods

* timeline feedback

* change type annotation

* fix type

* Revert "use requestId to eliminate inconsistencies"

This reverts commit 98335a927e.

* [INS-1803] show cookie tab in response pane (#5105)

* hard code sending and storing to true

* make tab naming consistent

* hard code cookie settings to false

* fix headers isDisabled bug

* [INS-1805] Add Auth Header Tab (#5115)

* add minimal change to the auth flow

* add disable state

* adding dropdown disable

* simplify reducer

* fix lint

* [INS-1839] Rename tab Header everywhere (#5119)

* can import/export websocket requests (#5122)

* use responseId for timeline name (#5124)

* add react-virtual to virtualize the event log view (#5126)

* [INS-1833] Include Auth Header in Headers mapping for WebSocket Connection (#5120)

* add auth to the header

* remove console log

* remove unneeded async

* add success redirect logic to websocket server

* add unexpected-response handler

* remove digest auth (#5129)

* remove auth header and outbound message timeline (#5130)

* [INS-1840] Add Connected Status Label and Extras (#5131)

* add status related changes

* text label change

* WebSocket ipc typing proposal (#5125)

* make consistent with main bridge

* rename webSocket

* remove deviated mock

* use consistent arrow function defintions

* Update packages/insomnia/src/main/network/websocket.ts

* Set the environment for websocket responses (#5132)

* first pass (#5123)

* [INS-1843] Add more checks to WS smoke test (#5138)

* Fix failing websocket smoke test

* Add remaining websocket smoke server endopints to fixtures

* Add checks for basic-auth, bearer and redirect

* Rm assertion

* can select payload type (#5133)

* Implement nunjucks rendering for websocket urls, authentication, headers and urls (#5134)

* fix  websocket->webSocket (#5142)

* bug fix (#5144)

* INS-1844: Implement basic event view functionality. (#5146)

* INS-1844: Implement basic event view functionality

* CSS fix to align Preview button with tab buttons.

* Reverse the order of WebSocket events (#5148)

* Reverse the event log order in the view and subscribe to messages after the latest

* WebSocket response model (#5147)

* init websocket-response model

* add websocket response model

* remove unused timeline getter

* remove unused functionality from the ws-response model

* can select and save payload message and preview mode (#5143)

* [INS-1838] Add Empty State (#5140)

* add empty state

* use the empty state pane

Co-authored-by: gatzjames <jamesgatzos@gmail.com>

* Bug/stabilise-ws-fetch-method (#5152)

* just poll

* remove cts and eventlog channel

* Fix/nitpicks (#5156)

* remove unused names

* fix copypasta icon

* ensure all subcompnent drop state on request change

* move empty state to response pane

* add websockets to quick switch (#5159)

* [INS-1800] Remove value validity check in the WebSocket headers (#5154)

* remove valid value check in the headers

* add header name filtering

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Mark Kim <mark.kim@konghq.com>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
Co-authored-by: John Chadwick <86682572+johnwchadwick@users.noreply.github.com>
Co-authored-by: David Marby <david@dmarby.se>
2022-09-09 14:53:28 +00:00
Filipe Freire
dd79b934bf
Add graphQL to smoke tests (INS-1592). (#4867)
* Add graphQL to smoke tests (INS-1592).

* Remove waitForNavigation

* Tidy up code, improve assertions and selectors

* Fix typo

* add gandalf

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-06-22 15:29:27 +00:00
John Chadwick
3234c05c6e
Enable noImplicitAny. (#4864)
* Enable noImplicitAny.

* extracts PreviewMode

* Update packages/insomnia/src/network/certificate-url-parse.ts

* Add missing type.

* un-any-ifies some of the modal onDone callbacks

easy enough.

* few more onDone, but the async ones this time

* Get rid of jsonlint any.

* adds noImplicitAny support for insomnia-smoke-test

* fixes playwright type error

* avoid full @ts-ignore in playwright

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-06-14 23:41:19 -04:00
Jack Kavanagh
6285ab8b0f
add grpc server (#4758) 2022-05-05 13:30:13 +02:00
Jack Kavanagh
d16eaa553f
add grpc test (#4746) 2022-05-02 16:00:19 +02:00
Jack Kavanagh
8585eea9e6
electron v15 pre-upgrade refactoring (#4524)
* now with 100% fat free cancellation

Co-authored-by: James Gatz <jamesgatzos@gmail.com>

* unblock electron 15

* fix cookielist and temp fix curl types

* fix types

* fix inso

* default to verbose inso test

* implement readdata function

* fix test

* revert test changes

* isomorphic cancel

* reduce typing issues

* curl types

* turns out the tests were wrong

* handle errors

* remove unused inso mock

* remove request delay

* fix lint and add logs

* Revert "remove request delay"

This reverts commit f07d8c90a7a7279ca10f8a8de1ea0c82caa06390.

* simplify and add cancel fallback

* skip cancel test

* playwright is fast and insomnia is slow

* trailing spaces are serious yo

* cancel is flake town

* hmm

* unblock nunjucks and storeTimeline

* fix nunjucks tests

* preload writeFile

* oops forgot to remove the reload

* debugging CI takes all day, log stuff and pray

* also warn if nunjucks is being lame

* Stop using environment variables

* revert debugging logs

Co-authored-by: James Gatz <jamesgatzos@gmail.com>
Co-authored-by: David Marby <david@dmarby.se>
2022-03-03 13:42:04 +00:00
David Marby
5af79c7486
Create smoketests for oauth flows (#4511)
* Move basic auth routes to a separate file

* Stop slowing requests down artificially

* Add initial oauth routes

* Mount oidc routes under /oidc

* Enable all forms of oauth that Insomnia supports

* Add oauth request collection fixture

* Update playwright config

* Use 127.0.0.1 instead of localhost

* simple oauth2 test

* Make the playwright extension work

* Move oauth tests to a separate file

* Test all oauth flows

* Mark test as slow

* Wait for load state for new pages

* Use locators consistently

* Add playwright to recommended extensions

* Add instructions for how to use the playwright extension

* update selectors and use fill

* Fix markdown lint

Co-authored-by: jackkav <jackkav@gmail.com>
Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-02-28 16:28:02 +01:00
Filipe Freire
45d9d4ece5
Add /cookies endpoint to smoke test express server (INS-1342)
* add /cookies endpoint to smoke test mock server

* add smoke test steps for /cookies endpoint

* Update packages/insomnia-smoke-test/tests/app.test.ts

Co-authored-by: James Gatz <jamesgatzos@gmail.com>
2022-02-04 12:20:21 +00:00
Dimitri Mitropoulos
4940348dd9
removes insomnia designer migration code (#4404) 2022-01-25 11:14:24 -05:00
Jack Kavanagh
722044ed33
can cancel request (#4366) 2022-01-19 11:35:03 +00:00
Jack Kavanagh
8cea5edc26
Chore: replace spectron with playwright (#4305)
* add smoke test fixture

* respect INSOMNIA_DATA_PATH override in CI

* add playwright

* remove spectron

* move CLI tests after app smoke tests in CI

* remove onboarding skip

* random path feedback

* npx feedback

* remove DATA_PATH override

* remove step from import process

* cleanup

* restore readme

* move specs to tests

* feedback on DESIGNER_DATA_PATH

* remove skipLibCheck

* last mention of spectron

* fix windows npm run test:smoke:build

* DATA_PATH override is required

* github CI is slow sometimes
2021-12-17 13:05:14 +01:00
Opender Singh
dc4bc1ae48
Remove NPM build dependency for lerna packages (#4306) 2021-12-16 01:08:45 +01:00