-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.0.22 - Add the ability to edit cached responses. - feat: users may now edit the cached responses - feat: persist cache filters - patch: use routing to navigate acrsoss the ui - patch: clean-up global state management - patch: attempt to close any jambox process prior to e2e tests - fix: crash when deleting unknown cached id - fix: waterfall ui - feat: css filter - fix: unknown props warnings
- Loading branch information
Showing
28 changed files
with
470 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
node_modules | ||
coverage | ||
coverage-cypress | ||
cypress/screenshots | ||
cypress/videos | ||
.DS_Store | ||
*.log | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
#!/usr/bin/env node | ||
import http from 'http'; | ||
import tinyServer from './src/utils/tiny-server.mjs'; | ||
import jamboxServer from './src/server/index.mjs'; | ||
|
||
await tinyServer(7777); | ||
await jamboxServer({ port: 9000 }); | ||
const launch = async () => { | ||
await tinyServer(7777); | ||
await jamboxServer({ port: 9000 }); | ||
}; | ||
|
||
// Shutdown any other server currently running | ||
http | ||
.request('http://localhost:9000/shutdown', { method: 'GET' }, launch) | ||
.on('error', launch) | ||
.end(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import API from './Api'; | ||
import App from './App.svelte'; | ||
|
||
let api; | ||
before(async () => { | ||
await cy.task('set-jambox-config', { | ||
blockNetworkRequests: false, | ||
forward: { | ||
'http://jambox-test.com': { | ||
target: 'http://localhost:7777', | ||
paths: ['**'], | ||
}, | ||
}, | ||
cache: { | ||
dir: '.jambox', | ||
write: 'auto', | ||
stage: ['jambox-test.com/**'], | ||
}, | ||
}); | ||
api = await API.create(); | ||
}); | ||
|
||
describe('Cache UI', () => { | ||
it('can edit response objects', () => { | ||
cy.mount(App, { props: { api } }); | ||
|
||
// Additional requests to fill up the cache | ||
cy.request('http://jambox-test.com/pathA'); | ||
cy.request('http://jambox-test.com/pathB'); | ||
cy.request('http://jambox-test.com/pathC'); | ||
|
||
cy.get('[data-cy-id="cache-link"]').click(); | ||
cy.get( | ||
'[data-cy-id="cache-cell-edit-f4c55ab257c689845921746061bfeb73"]' | ||
).as('test-edit'); | ||
|
||
cy.get('@test-edit').click(); | ||
cy.get('[data-cy-id="select-response-tab"]').click(); | ||
|
||
// Edit body | ||
cy.get('[data-cy-id="select-response-tab"]').click(); | ||
cy.get( | ||
'[data-path="%2Fbody"] > .jse-props > .jse-json-node > .jse-contents-outer > .jse-contents > .jse-value' | ||
).dblclick(); | ||
cy.get('.jse-editable-div').clear(); | ||
cy.get('.jse-editable-div').type('foobar{enter}'); | ||
cy.get('[data-cy-id="update-response-btn"]').click(); | ||
|
||
// Close | ||
cy.get('[data-cy-id="back-to-cache"]').click({ force: true }); | ||
|
||
// Open modal | ||
cy.get('@test-edit').click(); | ||
cy.get('[data-cy-id="select-response-tab"]').click(); | ||
cy.get('[data-cy-id="cache-detail"]').contains('foobar'); | ||
|
||
// clear cache | ||
cy.get('[data-cy-id="select-details-tab"]').click(); | ||
cy.get('[data-cy-id="cache-delete"]').click(); | ||
cy.get('[data-cy-id="cache-detail"]').should('not.exist'); | ||
|
||
cy.wait(1).then(() => { | ||
// cleanup | ||
return api.delete([ | ||
'ba20ccbb470042f3200692cad1926c1c', | ||
'f4c55ab257c689845921746061bfeb73', | ||
'cd4482b36a608021cd943786ecb54c5d', | ||
]); | ||
}); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.