Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: page router validations and add test cases #720

Merged
merged 47 commits into from
Oct 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
85f0a25
refactor: use vite-tsconfig-paths for vitest config
karrui Sep 30, 2024
bc216dc
feat: replace pglite with testcontainers
karrui Oct 1, 2024
2e7258c
fix: lint
karrui Oct 2, 2024
6e3a7af
fix: remove unused dependency
karrui Oct 2, 2024
4062d3d
fix: remove env load, update dd ci action
karrui Oct 2, 2024
f68a9ea
fix: commit .env.test
karrui Oct 2, 2024
21b8490
feat: delete root .env.test, use studio-specific .env.test instead
karrui Oct 2, 2024
b3d8d66
fix: avoid using execAsync and instead run migrations manually
karrui Oct 3, 2024
e49c362
fix: apply migrations on db mock setup
karrui Oct 3, 2024
c99e796
fix(ci): add new .env path for e2e tests
karrui Oct 3, 2024
a3952ae
feat(ci): remove unnecessary env and use v2 for dd gha
karrui Oct 3, 2024
2cd01f8
feat: update comment for .env.test file
karrui Oct 3, 2024
fa38573
fix: pass env-mode=loose to e2e tests too
karrui Oct 3, 2024
a1689d0
test(utils): update auth helper functions to use kysely
karrui Sep 30, 2024
e413b54
test: add initial page.router tests
karrui Sep 30, 2024
9d6a83c
feat: remove unused page procedures and related functions/constants
karrui Sep 30, 2024
b769e49
feat(getPageById): handle page not found instead of throwing
karrui Sep 30, 2024
6e30b4c
test(page): update test cases for readPage
karrui Sep 30, 2024
d7617c9
feat: add seed test functions
karrui Oct 1, 2024
b74b192
feat: update all default*Select constants to use satisfies instead
karrui Oct 1, 2024
d41f683
fix: add readPage output validation, correct checks
karrui Oct 1, 2024
68b2f85
test: add test cases for page.readPage
karrui Oct 1, 2024
974113d
feat: tag jsonb types so that insertion is correctly handled
karrui Oct 2, 2024
8c41d1e
feat: update test helpers to generate random unique keys
karrui Oct 2, 2024
a7705dc
test: update page.router.readPage to check value instead of shape
karrui Oct 2, 2024
d1a827f
test: add test cases for reacPageAndBlob
karrui Oct 2, 2024
2304118
test: simplify page.router.test setup
karrui Oct 2, 2024
431731e
test: add test cases for page.reorderBlock procedure
karrui Oct 2, 2024
7ec9e6c
feat: move isomer schema content validation to zod schema
karrui Oct 2, 2024
7dcba1d
fix(resource): throw 404 error if resource to update not found
karrui Oct 2, 2024
e374acd
fix: lint
karrui Oct 2, 2024
e9539e9
test: add tests for updatePageBlob
karrui Oct 2, 2024
cd5d2ef
feat: use transaction when updating page blob
karrui Oct 2, 2024
ce5206a
fix: remove it.only
karrui Oct 3, 2024
2cfde9b
feat: change updateBlobById to only allow Transaction
karrui Oct 3, 2024
72c4cf5
feat(updateBlobById): return 404 if resource not found
karrui Oct 3, 2024
082fa8c
feat: add folderId validation and fkey violation error for createPage
karrui Oct 3, 2024
9667fbf
test: add test cases for createPage
karrui Oct 3, 2024
b5d80a2
feat: add 404 error handling for getRootPage, test cases
karrui Oct 3, 2024
bb6c26a
feat: update try-catch when parsing settings meta
karrui Oct 3, 2024
6ec7ed7
feat: add tests for page.updateSettings
karrui Oct 3, 2024
99a4afe
feat: guard against invalid resource when fetching permalink
karrui Oct 3, 2024
5480183
test: add test cases for getFullPermalink
karrui Oct 3, 2024
3ef1598
test: add test cases for getPermalinkTree
karrui Oct 3, 2024
c768018
fix: use tx instead of db when inside a tx
karrui Oct 3, 2024
09673fe
feat: update test cases due to merge, add test case for root page
karrui Oct 11, 2024
215adc2
fix: types
karrui Oct 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: update try-catch when parsing settings meta
so correct errors are returned
  • Loading branch information
karrui committed Oct 11, 2024
commit bb6c26a16450b2bfa10a926d96b55f6d086a379f
1 change: 0 additions & 1 deletion apps/studio/src/server/modules/page/page.router.ts
Original file line number Diff line number Diff line change
@@ -381,7 +381,6 @@ export const pageRouter = router({
})
},
),

getFullPermalink: protectedProcedure
.input(basePageSchema)
.query(async ({ input }) => {