Skip to content

Commit 0cb3dbb

Browse files
authored
Merge pull request #212 from codeableorg/orm
Orm
2 parents 499799a + 6d35a94 commit 0cb3dbb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1701
-824
lines changed

.env.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
DATABASE_URL="postgresql://diego@localhost:5432/fullstock?schema=public"
2+
3+
# Admin Database (for database creation/deletion)
4+
ADMIN_DB_NAME=postgres
5+
6+
# This was inserted by `prisma init`:
7+
[object Promise]

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ dist-ssr
3434
/playwright-report/
3535
/blob-report/
3636
/playwright/.cache/
37+
38+
/generated/prisma

package-lock.json

Lines changed: 120 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
"seed:dev": "tsx src/db/scripts/seed.ts",
2020
"test": "vitest"
2121
},
22+
"prisma": {
23+
"seed": "tsx ./prisma/seed.ts"
24+
},
2225
"dependencies": {
2326
"@hookform/resolvers": "^4.1.3",
27+
"@prisma/client": "^6.10.1",
2428
"@radix-ui/react-label": "^2.1.1",
2529
"@radix-ui/react-select": "^2.1.5",
2630
"@radix-ui/react-separator": "^1.1.0",
@@ -70,6 +74,7 @@
7074
"globals": "^15.12.0",
7175
"jsdom": "^26.1.0",
7276
"postcss": "^8.5.3",
77+
"prisma": "^6.10.1",
7378
"react-router-devtools": "^1.1.10",
7479
"tailwindcss": "^3.4.17",
7580
"tsx": "^4.19.4",

playwright.config.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { defineConfig, devices } from '@playwright/test';
1+
import { defineConfig, devices } from "@playwright/test";
2+
import dotenv from "dotenv";
3+
4+
// Load test environment variables
5+
dotenv.config({ path: ".env.test" });
26

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

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

3539
/* Configure projects for major browsers */
3640
projects: [
3741
{
38-
name: 'chromium',
39-
use: { ...devices['Desktop Chrome'] },
42+
name: "chromium",
43+
use: { ...devices["Desktop Chrome"] },
4044
},
4145

4246
{
43-
name: 'firefox',
44-
use: { ...devices['Desktop Firefox'] },
47+
name: "firefox",
48+
use: { ...devices["Desktop Firefox"] },
4549
},
4650

4751
{
48-
name: 'webkit',
49-
use: { ...devices['Desktop Safari'] },
52+
name: "webkit",
53+
use: { ...devices["Desktop Safari"] },
5054
},
5155

5256
/* Test against mobile viewports. */

0 commit comments

Comments
 (0)