owenwexler
TTCTheo's Typesafe Cult
•Created by owenwexler on 2/8/2024 in #questions
Intercept server-side API calls with Playwright?
Are there resources out there where I can read about intercepting server-side API calls with Playwright (particularly with the NextJS app router). page.route does not work. No errors, it just doesn’t intercept the call as expected. Hopefully with the new wave being server-side everything in web dev this has been figured out and standardized already or will be soon. Will have a few use cases where server-side API calls will need to be intercepted in the future.
Google search results so far has been a mix or “use page.route” and “Playwright is a popular new testing software made by Microsoft…”
Thanks in advance!
4 replies
TTCTheo's Typesafe Cult
•Created by owenwexler on 8/10/2023 in #questions
Please critique my workflow for replacing an entire legacy project with a C3TA-scaffolded prototype?
Been prototyping an 80% rewrite of my web app’s frontend scaffolded with Create-T3-App (NextJS 13 with pages, TypeScript, and Tailwind only, no tRPC, Prisma, or Next-Auth) in a separate repo. Significant rewrite with not only newer versions of Next, React, and Cypress, Tailwind as the CSS solution instead of Material-UI, and TypeScript instead of JavaScript, but also React Query, Jotai, and HeadlessUI too. Things have been going very well and I am almost ready to replace the running production frontend as it currently stands with the new frontend.
Main repo in legacy project has three branches: main (main dev branch), staging (auto builds on staging server), and production (auto builds on live production server)
Backend is in separate repo/deployed separately.
Proposed workflow for replacing old frontend with new one: 1. While on the main branch of the web frontend repo, completely empty out its top-level working directory of the entirety of the old frontend, moving the old frontend to a separate archive directory in the process, and copy the new frontend (including node_modules folder) in from the prototype directory. Ensure everything works & all tests pass (about 300 E2E tests I’ve been copying over and adapting) , then push the new frontend up to the main branch. 2. Merge the new frontend into the staging branch and confirm the staging app works. 3. Once it is confirmed that the staging app works, merge the frontend into the production branch at 3:30am on Tuesday morning and pray for no downtime.
Would this complete replacement-in-place workflow be advisable or should I consider a more surgical approach? Thanks in advance!
9 replies
TTCTheo's Typesafe Cult
•Created by owenwexler on 4/23/2023 in #questions
Does a Create-T3-App Next project use the Rust compiler or Babel
Kind of a nooby question but I searched Google, Create-T3-App docs and the questions channel and found nothing. This will determine how I set up Jest in my C-T3-A projects. Thank you in advance!
5 replies