Fix test using a mock redirected response#667
Conversation
|
If preferred for ease of review can merge this into the root branch -- feel free to do so (squash & merge wud b good) |
habdelra
left a comment
There was a problem hiding this comment.
The approach looks good, but there a couple things you need to fix.
| isCardSourceFetch(request) && | ||
| urlParts.length === 1 //has no extension | ||
| ) { | ||
| const realmPaths = new RealmPaths(testRealmURL); |
There was a problem hiding this comment.
testRealmPathURL is just the default test realm URL. There is an option to configure the test realm with a different URL and we do that for a few tests—don’t assume this is the realm URL.
There was a problem hiding this comment.
hmmm ok fixed this. But I made the handler pass an argument (required) of realmURL. I thought ideally, I would build something higher order which allows the handlers to have realmURL,adapter and maybeHandle available but the change seemed a bit too much and made the handlers being passed more unclear. I prefer this way of forcing the test maker to specify the realmURL.
* get file extension and realm info * reinclude test * put getRealmInfo in resource * fix url bug * cache request * lint * Use adoption manager and use loading states * add selection of card * mock out some ui * fix lint * refactor for better loading pattern and clearer role * Change selections to a single object * might as well use a select button * add comment * fix loading * place realm info deeper in definition info * maintain selected card type api * TODO for test * TODO test * wokraround 4 redirect in host test * Revert "TODO test" This reverts commit d1df438. * Revert "TODO for test" This reverts commit 20f00a6. * fix due to card no longer being resource. TODO: solve .json identification * Fix test using a mock redirected response (#667) * register a redirect handler that returns redirected response * revert original change * fix * fix * fix * fix lint * fix * reposition * clean up & organise useage * fix file response.url not returning * fix url parts using pathname * arg to pass in realm * make realm url explicit to guard from the wrong use of handle * use pathname * move everything to code mode * Fix lint * Fix linting * fix info service to get card source accept header
FigJam-style infinite-canvas board card, step 1 of CS-12193: pan, cursor-anchored wheel/pinch zoom with momentum (rig.gts camera engine), zoom toolbar, and layout-independent keyboard shortcuts, with live tests and a demo instance. Continues development in the monorepo; the boxel-catalog PRs (#666, #667) hold the earlier history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FigJam-style infinite-canvas board card, step 1 of CS-12193: pan, cursor-anchored wheel/pinch zoom with momentum (rig.gts camera engine), zoom toolbar, and layout-independent keyboard shortcuts, with live tests and a demo instance. Continues development in the monorepo; the boxel-catalog PRs (#666, #667) hold the earlier history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FigJam-style infinite-canvas board card, step 1 of CS-12193: pan, cursor-anchored wheel/pinch zoom with momentum (rig.gts camera engine), zoom toolbar, and layout-independent keyboard shortcuts, with live tests and a demo instance. Continues development in the monorepo; the boxel-catalog PRs (#666, #667) hold the earlier history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FigJam-style infinite-canvas board card, step 1 of CS-12193: pan, cursor-anchored wheel/pinch zoom with momentum (rig.gts camera engine), zoom toolbar, and layout-independent keyboard shortcuts, with live tests and a demo instance. Continues development in the monorepo; the boxel-catalog PRs (#666, #667) hold the earlier history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Add poster-board to experiments realm FigJam-style infinite-canvas board card, step 1 of CS-12193: pan, cursor-anchored wheel/pinch zoom with momentum (rig.gts camera engine), zoom toolbar, and layout-independent keyboard shortcuts, with live tests and a demo instance. Continues development in the monorepo; the boxel-catalog PRs (#666, #667) hold the earlier history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Update readme * Scope poster-board keyboard shortcuts to the board element Move the zoom-shortcut keydown listener from window onto the focusable board root so Shift+=/−/0 only act when the board is the active surface, and two isolated instances can't both react to one keystroke. Panning focuses the board explicitly since preventDefault on pointerdown suppresses the default click-to-focus. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This wud complete CS-5982
2 issues
person. We usually rely on native fetch to follow this response, but since we userealm.maybeHandlein test our app just gets a 302person.gtsrather it returnsresponse.url =''Solution
create overriding url handlers that
Responseobject doesn't allow thisThere are ofcourse assumptions about how the handler overrides the request. I tried my best to restrict as much as possible and if the handler doesn't pick up the request just pass it along to its handlers set previously