Skip to content
Merged

Orm #212

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1fc68a2
feat(e2e/order): add test for guest checkout flow and reusable order …
Angel-Briones Jun 21, 2025
449c340
Merge pull request #201 from codeableorg/guest-create-order
Angel-Briones Jun 26, 2025
7c752a4
feat: add test for OrderConfirmation loader to verify orderId extraction
Angel-Briones Jun 12, 2025
3d26466
feat: add OrderConfirmation component tests for success messages, tra…
Angel-Briones Jun 12, 2025
0885fe3
refactor: simplify order-confirmation.test component by removing unne…
Angel-Briones Jun 19, 2025
900d04e
feat: add Prisma setup with user model and seed script
diegotc86 Jun 21, 2025
4ae0f73
feat: add initial data and schema for categories and products, update…
mykeVera Jun 21, 2025
f92470d
feat: convert category slug to enum and update related services
diegotc86 Jun 25, 2025
aad9d8b
feat: remove category repository file as part of refactoring
diegotc86 Jun 25, 2025
40e1f81
fix: update import paths for Prisma client and related types to use c…
diegotc86 Jun 25, 2025
96a4058
refactor: migrate product repository functions to use Prisma client
mykeVera Jun 25, 2025
0d95eaa
fix: update model imports and adjust product price handling
diegotc86 Jun 26, 2025
89dcc2d
feat: implement order management with Prisma integration and update t…
Angel-Briones Jun 26, 2025
cdce7bc
refactor: simplify order creation and details handling in order service
Angel-Briones Jun 27, 2025
0b018cb
refactor: optimize order sorting and simplify order mapping in orders…
diegotc86 Jun 28, 2025
8d0d2cf
refactor: update user service to use Prisma client for database opera…
jhonattan Jun 26, 2025
be9959c
refactor: update user model and service to streamline user type usage
jhonattan Jun 27, 2025
30ef9c5
fix: omit password field from AuthResponse user type
jhonattan Jun 27, 2025
5f2821c
refactor: migrate user repository functions to use Prisma client
diegotc86 Jun 28, 2025
62958de
refactor: migrate cart service to use Prisma client
mykeVera Jun 28, 2025
b3495cc
refactor: update cart and product models to use Prisma types and stre…
diegotc86 Jun 28, 2025
2055d96
refactor: remove unused cart repository and update related test files
diegotc86 Jun 28, 2025
6d35a94
Merge pull request #211 from codeableorg/orm_cart
mykeVera Jun 28, 2025
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
7 changes: 7 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DATABASE_URL="postgresql://diego@localhost:5432/fullstock?schema=public"

# Admin Database (for database creation/deletion)
ADMIN_DB_NAME=postgres

# This was inserted by `prisma init`:
[object Promise]
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ dist-ssr
/playwright-report/
/blob-report/
/playwright/.cache/

/generated/prisma
120 changes: 120 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
"seed:dev": "tsx src/db/scripts/seed.ts",
"test": "vitest"
},
"prisma": {
"seed": "tsx ./prisma/seed.ts"
},
"dependencies": {
"@hookform/resolvers": "^4.1.3",
"@prisma/client": "^6.10.1",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-select": "^2.1.5",
"@radix-ui/react-separator": "^1.1.0",
Expand Down Expand Up @@ -70,6 +74,7 @@
"globals": "^15.12.0",
"jsdom": "^26.1.0",
"postcss": "^8.5.3",
"prisma": "^6.10.1",
"react-router-devtools": "^1.1.10",
"tailwindcss": "^3.4.17",
"tsx": "^4.19.4",
Expand Down
24 changes: 14 additions & 10 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { defineConfig, devices } from '@playwright/test';
import { defineConfig, devices } from "@playwright/test";
import dotenv from "dotenv";

// Load test environment variables
dotenv.config({ path: ".env.test" });

/**
* Read environment variables from file.
Expand All @@ -12,7 +16,7 @@ import { defineConfig, devices } from '@playwright/test';
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './src/e2e',
testDir: "./src/e2e",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand All @@ -22,31 +26,31 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
trace: "on-first-retry",
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
name: "webkit",
use: { ...devices["Desktop Safari"] },
},

/* Test against mobile viewports. */
Expand Down
Loading