natef
natef
Explore posts from servers
TTCTheo's Typesafe Cult
Created by natef on 11/15/2023 in #questions
📆 Seeking Best Practices for E2E Testing with Time-Sensitive Web Apps
Hi everyone! 👋 I'm currently working on a calendar-based web application and facing a bit of a challenge with end-to-end testing. Specifically, I'm looking for effective ways to ensure tests run on a fixed “test date” for reproducibility. For example, I might choose Jan 1, 2023 as the effective date that my tests run on, and have expectations that calendar events are created relative to this date. Please let me know if this doesn't seem like a good practice, and that I should instead have all my tests run based on the real world time during test execution. I'm using Cypress for testing, and my application is deployed on Vercel. The main issue is synchronizing the time between my frontend (Cypress tests) and the server, especially in CI environments, where the server doesn't share the same clock as Cypress. I’ve considered options like mocking backend calls and adjusting test data, but I'm keen to maintain true end-to-end testing without resorting to extensive mocking. If you've encountered similar challenges or have insights on best practices, especially in a small-scale startup environment, I’d love to hear your thoughts or suggestions. How do you handle time synchronization in your tests? Are there specific strategies or tools you recommend? Thanks in advance for your help and insights! 🙏
3 replies
TTCTheo's Typesafe Cult
Created by natef on 7/13/2023 in #questions
Authentication (next-auth) Persistence Issue with iOS Home Screen Web App
Hello Everyone, I'm currently working on a web application built with next-auth and react and I'm trying to enable web push notifications for users that have iOS mobile devices. To achieve this, I need my users to bookmark the app to their home screen, making my app appear similarly to native apps on the iPhone's home screen (basically a PWA?). However, I am encountering an issue. After users bookmark the app to their home screen and open the app from there, they are required to sign in again, even though they were previously authenticated. My aim is to have the users automatically signed in when they open the app from the home screen, without having to re-enter their login credentials the first time they open the home screen app. Is this even possible? I notice that some high production value apps like Notion and Linear make me log in again after saving their apps to my home screen. Hopefully someone has encountered this issue before or have some ideas on how to solve it. Thanks in advance!
2 replies
TTCTheo's Typesafe Cult
Created by natef on 2/9/2023 in #questions
Accessing model relations with zod-prisma
1 replies
TTCTheo's Typesafe Cult
Created by natef on 12/9/2022 in #questions
Calling tRPC procedure from within another tRPC procedure?
Is this possible?
9 replies
TTCTheo's Typesafe Cult
Created by natef on 12/2/2022 in #questions
Examples of projects with custom and well designed Tailwind theme?
I am looking for some good examples to learn how to structure a design system on my T3 app with Tailwind. A designer has built a full design system (in Figma) that I need to translate into my NextJS app, and I was wondering if anyone has examples of repos that I can follow along with. I specifically want to have Tailwind Intellisense autocomplete a lot of the custom classes and variants I will be styling my components with. Maybe some larger companies are using Tailwind in there open source apps? I'm looking for more than just a boilerplate set up. Some app that has a fully built, custom UI is ideal. Any help would be appreciated. Thanks!
1 replies