A boilerplate for website using Remix.JS, Supabase as a backend and Playwright for E2E testing.
Remix Supabase Playwright is a development tool that combines the features of Remix, Supabase, and Playwright to provide an efficient way to create and test web applications. This tool allows developers to build and test their applications in a seamless manner, with built-in support for Supabase session cookies and authentication during testing. Additionally, Remix Supabase Playwright offers deployment options for live Supabase instances, including the ability to deploy using the built-in Remix app server or a custom hosting solution.
To install Remix Supabase Playwright, follow these steps:
Open your terminal and navigate to your desired directory.
Run the following command to start your app in development mode:
remix run
To run Playwright tests, use the following command:
remix test --playwright
If you want to run only tests containing the “signup” keyword, you can specify the user fixture in your Playwright tests:
async ({ page, user }) => {
// Your test code here
}
This will set the Supabase session cookie and authenticate the user during the test.
If you’ve made any database migrations and want to push them to a live Supabase instance, first build your app for production using the following command:
remix build
Then, run the app in production mode:
remix run --production
Finally, choose a hosting solution for your deployment:
build/public/build/.npx create-remix@latest command, select your desired hosting option, and then copy the app folder from your previous project to the new one.Remix Supabase Playwright is a powerful development tool that combines the functionalities of Remix, Supabase, and Playwright to provide an efficient and seamless experience for building, testing, and deploying web applications. Its features include development mode, testing with Playwright, authentication during testing, deployment to live Supabase instances, DIY deployment using the built-in Remix app server, and using a template for hosting. By using Remix Supabase Playwright, developers can streamline their workflow and create high-quality web applications with ease.