Commit Graph

1112 Commits

Author SHA1 Message Date
giancarlo
6271e6a4f7 Update Next.js version to 14.2.1 in pnpm lockfile
The commit updates the Next.js package version in the pnpm lockfile from 14.2.0 to 14.2.1. The version update includes all dependencies that specify Next.js.
2024-04-14 19:07:58 +08:00
giancarlo
736e377462 Update billing status wording and increase wait timeout
The commit changes the expected text for billing status in both 'user-billing.spec.ts' and 'team-billing.spec.ts' from 'active' to 'Active'. In addition, the waiting time for the page to return to home in 'billing.po.ts' has been increased from 500ms to 1000ms to improve testing reliability.
2024-04-14 18:56:31 +08:00
giancarlo
a549d2d08f Add detailed error messages for missing environment variables
The commit adds detailed error messages for missing environment variables across different configuration files. It updates the zod schema validations in different files, such as feature-flags.config.ts, personal-accounts-server-actions.ts, and others to provide more informative error messages when environment variables are not provided.
2024-04-14 18:50:09 +08:00
giancarlo
81f1bbca3b Add error message for invalid Supabase Service Role Key
The code now supplies a detailed error message when an invalid Supabase Service Role Key is provided. The error message prompts the user to check the SUPABASE_SERVICE_ROLE_KEY environment variable ensuring clearer debugging.
2024-04-14 18:27:39 +08:00
giancarlo
7dcd688ca9 Update user billing flow and improve error handling
Updated the user billing process to add a return to home function and redirect users to their specific account page after payment. Enhanced error handling in the billing event handler to handle scenarios where no account id is found in the subscription. Removed unused billing page object from the stripe page object.
2024-04-14 18:25:33 +08:00
giancarlo
0824ac8e9f Refactor billing process in e2e tests
Code for billing process was refactored in end-to-end tests for clean code and better structure. In the described tests, related codes and classes have been moved to a new class named BillingPageObject. All corresponding calls were updated accordingly.
2024-04-14 17:54:15 +08:00
giancarlo
d078e0021c Add end-to-end tests for user and team billing features
This commit introduces end-to-end tests for the user and team billing features. It also enhances existing billing configurations, logging, and error handling mechanisms. Refactoring has been done to simplify the code and make it more readable. Adjustments have also been made in the visual aspects of some components. The addition of these tests will help ensure the reliability of the billing features.
2024-04-14 17:15:04 +08:00
giancarlo
1321b31ae4 Split full flow test 2024-04-14 14:01:44 +08:00
giancarlo
91bee99857 Refactor join page and update packages
The join page's redirect functionality has been replaced with permanentRedirect. Adjustments were also made for handling conditional authentication and user account verification. Package upgrades were performed and the i18n client now checks if an instance is already initialized. The process tends to deliver performance benefits and enhancing the code readability.
2024-04-14 13:48:50 +08:00
giancarlo
fd890ea09d Update avatar styling and enhance workflow
Removed 'mr-2' from avatar styling in 'account-selector.tsx' and enhanced alignment within the group. Several environment variables were added in the GitHub workflow, improving the security and consistency of the test job. The names for 'typescript' and 'test' jobs are also standardized for better readability.
2024-04-14 12:39:50 +08:00
giancarlo
eca8bb76c4 Update deleteAfter flag in invitation spec
This commit modifies the `deleteAfter` flag from `false` to `true` in the E2E tests for invitations. This change helps to ensure that invitation emails are deleted after being confirmed during testing, keeping the test environment cleaner.
2024-04-13 21:05:59 +08:00
giancarlo
cb3e14a265 Update workflow and suppress dev server in e2e tests
The playwright.config.ts file has been updated to comment out the part that runs the local dev server during end-to-end tests. Additionally, an action has been added in the GitHub workflow to specifically run the app. Also, a trivial modification to the 'startTransition' function in the 'invite-members-dialog-container.tsx' file has been made.
2024-04-13 20:50:08 +08:00
giancarlo
52e7b89243 Update test logs, adjust webhook timeout, and modify email handling
Improved the clarity of console logs within e2e tests for better debugging. Changed the timeout timing for webhook requests from 1000ms to 5000ms in the supabase seed.sql. The "deleteAfter" option of the visitConfirmEmailLink and getInviteEmail functions in the e2e tests has been set to "false" for email persistence.
2024-04-13 20:42:02 +08:00
giancarlo
78b6ae1ab0 Add team member invitation success and error messages
The code now includes success and error messages for team member invitation completion. It validates entered email addresses for duplicates and sets a limit on the number of invitations that can be sent at once to avoid server spam. Also, visual changes have been made to the form - label placement, form message, button types, etc.
2024-04-13 20:24:23 +08:00
giancarlo
f0bc6959e1 Refactor Supabase client and service role key usage
The refactoring includes the moving of the `getSupabaseClientKeys()` and `getServiceRoleKey()` function calls to the module scope and the addition of a `warnServiceRoleKeyUsage()` function, used to display a warning when the Supabase Service Role is accessed. The change aims to improve code readability and maintainability.
2024-04-13 20:03:08 +08:00
giancarlo
4b9c023700 Update e2e config, package.json, and database schema
The e2e test configuration has been modified to take screenshots only on failure and the dev server code has been adjusted for better project directory handling. The "supabase:reset" command in package.json no longer starts the server after reset. Default roles 'owner' and 'member' are also now seeded into the roles table, and constraints in the roles table and its associated functions have been updated to manage hierarchy levels and role naming more effectively.
2024-04-13 17:10:42 +08:00
giancarlo
8e04365bd0 Update E2E test settings and methods
Updated the Playwright End-To-End test configurations to run the local dev server before starting the tests. Removed unnecessary page load wait states in the invitation tests. Also, updated the parameters passed in the `visitMailbox` method used in the authentication tests.
2024-04-13 16:33:52 +08:00
giancarlo
6ad84026da Update command to run app in background
The command to run the app in the .github/workflows/workflow.yml file has been updated. "pnpm run dev" now runs in the background, allowing it to progress alongside subsequent commands in the workflow. This change is expected to enhance the efficiency of the workflow process.
2024-04-13 15:54:34 +08:00
giancarlo
4ed51fed22 Update environment files and modify SQL trigger
Environment files have been updated; a typo corrected in .env.development, and new variables added in .env.test. Sequence of variables were also reorganized in .env.test for better readability. Additionally, the name of an SQL trigger in seed.sql file has been changed to align with naming convention. Lastly, the application running command in workflow.yml has been modified for efficiency.
2024-04-13 15:48:57 +08:00
giancarlo
6049c17aa7 Update environment variables and improve code formatting
Added new paths and other configurations to .env files for production, test, and development environments. Removed the requirement for email confirmation from all .env files. In addition, unnecessary spacing in the update-member-role-dialog component was removed for better code readability.
2024-04-13 15:40:52 +08:00
giancarlo
b6b9a9462f Add data testing attributes and adapt tests for team account invitations
This commit adds data testing attributes to key elements in the team account invitations features. It also modifies e2e tests to make use of these attributes. Additionally, it introduces minor tweaks to other parts of the system to better facilitate testing, such as adjustments in timeouts and update of some log messages.
2024-04-13 15:27:21 +08:00
giancarlo
24e5c0debd Refine warning messages and test feedback
This commit refines the warning text in the 'deleteAccountDescription' in locales and associated Supabase service role warning. Additionally, the E2E test for account deletion has been updated to include a response check for a redirection status, improving the reliability of the test outcome.
2024-04-13 13:49:40 +08:00
giancarlo
87e8376af6 Refactor key access and role warning in Supabase clients
The update simplifies accessing environment keys and role warnings in Supabase clients by moving them to new functions 'getSupabaseClientKeys' and 'getServiceRoleKey'. The redundancy in the code is reduced promoting clearer and more maintainable code. The '@epic-web/invariant' import has been removed from files as it is no longer needed.
2024-04-13 12:57:56 +08:00
giancarlo
7f11905fc1 Improve tree shaking and dynamic loading, fix translations in production build. Moved i18n settings to the application's side. 2024-04-13 12:43:02 +08:00
giancarlo
31a8d68809 Update workflow to run app in background
Changed the `.github/workflows/workflow.yml` to run the application in the background during Github Actions workflow. This change will allow the Playwright tests to run while the app is still running, providing better efficiency and time management in the CI/CD process.
2024-04-13 03:06:02 +08:00
giancarlo
5ecf0e97da Update dependencies and environment for web app
Upgraded '@makerkit/data-loader-supabase-nextjs' to version 1.1.0 and replaced 'autoprefixer' with a newer version. Added new scripts to 'packages.json' and '.env.test' file for test environment. The changes also include removal of unnecessary 'eslint' dependencies and modifications for 'postcss' related dependencies.
2024-04-13 03:05:51 +08:00
giancarlo
c52119ff5a Add e2e testing for user invitation
This commit adds e2e testing for the user invitation process in the app. It introduces data-test attributes to key components in the invitation flow, assisting in test case creation. Newly created tests validate user invitation functionality including form filling, role selection, and submission.
2024-04-13 02:35:34 +08:00
giancarlo
f6800d3763 Update dependency versions across multiple packages
A broad range of dependency versions have been updated in numerous packages. This includes updates to major libraries such as supabase-js, react, i18next and multiple typescript definitions. The version specifier has been standardized for some packages to maintain consistency.
2024-04-13 02:13:11 +08:00
giancarlo
bb608f5312 Replace account sign-in redirect with URL wait
Modified the e2e test for account deletion. Rather than redirecting to the sign-in page after the account is deleted, the change ensures that the system waits for a local URL. This should improve test coverage by making sure the browser is redirected to the correct URL instead of automatically going
2024-04-12 21:51:59 +08:00
giancarlo
be82e6b342 Refactor tests and update turbo.json configuration
Removed unnecessary response wait in `auth.po.ts` and a redundant output property in `turbo.json`. The code is now simpler with less redundancy, which makes it easier to read and maintain. Removed files are either not used or not necessary for the project to behave as expected.
2024-04-12 21:42:32 +08:00
giancarlo
21fba33462 Add account deletion process and improve tests
The commit introduces a message to indicate the account deletion process. It also enhances the tests by reducing code redundancy in the e2e tests, creating a more random name for team accounts, and improving the navigation process after account deletions. The commit also includes code cleanup tasks, such as the removal of unused imports.
2024-04-12 21:30:13 +08:00
giancarlo
2bad506d75 Update account management features and improve test configurations
Multiple updates are made to refine the account management features, including updating the 'Your Teams' text to show the number of teams, and modifying the form data validation process in the 'deletePersonalAccountAction' service. Additionally, improvements have been made in test configurations including updating the test timeout settings, taking screenshots when a test fails, and adjusting the location for saving Playwright reports.
2024-04-12 20:52:35 +08:00
giancarlo
24a6190f51 Update CI settings for e2e tests
Adjusted the parallel test limit on CI from 1 to 2 in playwright configuration and updated the test script to stop after the first failure. These changes will allow CI to run tests more efficiently and stop running further tests when a failure is encountered.
2024-04-12 19:08:29 +08:00
giancarlo
f7de3ea9c4 Update data-loader-supabase-nextjs version and refactor e2e tests
This commit involves updating the version of @makerkit/data-loader-supabase-nextjs to ^1.0.0 across multiple components. The end-to-end tests for team-accounts have also been refactored to improve their reliability and accuracy. Additionally, a new `.env.test` file has been added for improved testing.
2024-04-12 18:51:06 +08:00
giancarlo
477b8f0d52 Update Next.js version across dependencies
The Next.js version has been updated across multiple dependencies in the pnpm-lock file. This ensures consistency, removes instances of the canary version, and aligns all packages to use the stable 14.2.0 release.
2024-04-12 17:48:19 +08:00
giancarlo
b7aa64b06e Update site headers, buttons, and pricing table format
The changes made are primarily related to updating the layout and style of the site headers and buttons. A significant chunk of modifications were made to the pricing-table.tsx file, including tweaks to the styling, padding, highlighting, and addition of new properties. Also, the site-header-account-section.tsx and site-page-header.tsx files have seen a few changes, focusing mainly on buttons and heading style. A new locale message was added to facilitate better user interaction.
2024-04-12 00:28:11 +08:00
giancarlo
fb86e6e6b2 Refactor e2e tests for improved efficiency
The commit has made key changes to enhance the efficiency of end-to-end tests. The password generation logic and random email creation method have been modified to use bigger random numbers, ensuring
2024-04-11 21:54:03 +08:00
giancarlo
93964e174a Update UI layout and enhance email confirmation test
The UI layout for the site header, site footer, and account section was updated to improve visual spacing and arrangement. In addition, the authentication test for email confirmation was enhanced, specifically by adding checking that the response from visiting the mailbox is not null. This improves the robustness and reliability of the test.
2024-04-11 21:29:46 +08:00
giancarlo
9ac0707bef Refactor account settings and e2e tests
Renamed several components related to account settings and updated corresponding data-test selectors for more clarity. Adjusted e2e tests to reflect these changes and added tests for new functionalities, like changing password and deleting account. In addition, generator description in monorepo configuration was simplified. Minor changes were also made to e2e test utilities for better error handling.
2024-04-11 20:11:49 +08:00
giancarlo
d3cfa3d8f3 Update method to get Playwright's version in workflow
The code to retrieve Playwright's version in the GitHub action workflow has been updated. Previously, it was using `npm ls` but now it has been modified to use `pnpm ls` with the `--filter web-e2e` option. This change will ensure a more accurate retrieval of the Playwright test version specific to web end-to-end testing.
2024-04-11 19:00:47 +08:00
giancarlo
9d8d33121a Update e2e tests for authentication
The commit modifies end-to-end testing for the authentication process. It replaces the explicit waitForURL method with the waitForTimeout method and makes the navigation checks less strict. Aside from this, it configures the page navigation methods to wait until there is no network activity
2024-04-11 18:50:55 +08:00
giancarlo
4dfabd8b89 Add caching for Playwright browsers in workflow
This commit introduces caching for Playwright browsers in the GitHub Actions workflow. It first stores the Playwright version as an environment variable, then attempts to cache the browsers for this specific version. Browsers are only installed if they aren't found in the cache.
2024-04-11 18:29:16 +08:00
giancarlo
67c8097a31 Add waitForResponse for auth in e2e tests
Introduced a waitForResponse function in the authentication end-to-end test file. This helps to ensure that the test doesn't proceed until a response from the auth URL is received, adding robustness to the test flow.
2024-04-11 18:25:42 +08:00
giancarlo
311086d0e7 Update retries in playwright config and refactor account settings
This update changes the number of retries in the Playwright configuration. Additionally, solid improvements have been made in the account settings, including better data semantics for testing, changes to email confirmation, and adding a new E2E test suite for accounts. The sign-up flow was updated and problems with multi-language support logic were fixed.
2024-04-11 18:15:16 +08:00
giancarlo
a6780a80ed Format and add caching folder to Turbo commands 2024-04-11 17:13:27 +08:00
giancarlo
473de45f19 Update Supabase server instructions and scripts
Updated README.md and scripts to separate the 'web application' and 'Supabase server' in the development process. Modified package.json to include specific scripts for starting, stopping, and generating the Supabase schema. Also adjusted GitHub workflow to start Supabase server before running the app and reduced retention of Playwright report artifacts from 30 to 7 days.
2024-04-11 17:01:27 +08:00
giancarlo
49c050c92b Add 'Run App' step to the GitHub workflow
This commit introduces a new step in the GitHub actions workflow file. 'Run App' step, which runs the development server, has been included right before running the Playwright tests. This change is essential for seeing a real-time reflection of changes in the dev server during the testing phase.
2024-04-11 16:38:50 +08:00
giancarlo
e4e5cee3f3 Update pnpm version in GitHub actions workflow
The pnpm version used in the GitHub actions workflow has been updated from 6.32.9 to 8. This change will ensure that our GitHub actions use the latest pnpm version for setting up the environments and building our project.
2024-04-11 16:29:43 +08:00
giancarlo
96a1857da1 Update GitHub Workflow to use pnpm action
This commit updates the workflow configuration to use the 'pnpm/action-setup' GitHub Action. This eliminates the need for a separate step to globally install pnpm, simplifying the dependency installation process. Both the setup and the use of pnpm have been streamlined.
2024-04-11 16:26:04 +08:00
giancarlo
e517d18d48 Update GitHub Actions workflow
Enhancements have been made to the GitHub Actions workflow. The fetch depth has been updated and a cache has been added. Node.js dependencies are now setup with 'pnpm' cache and the 'test' timeout minutes have been reduced to 15. Also, Playwright Browsers are now installed before running Playwright tests.
2024-04-11 16:21:08 +08:00