add event seeding file for populating home page with test events#176
add event seeding file for populating home page with test events#176
Conversation
…leted, global-teardown logic (fetch test user & event data for deletion)
✅ Full E2E Test Results
|
|
Hi Troy! Thanks for taking initiative and creating the issue: #175 . I agree that there needs to be a seed file to help developers when testing the repo locally. There is a concern I have with seeding the database through an API endpoint. Concern
Is your end goal to seed the database through the API endpoint to actually provide a postgres seed file? Another way to insert new data to a database is to connect to the database instance, using pgadmin or datagrip, and write insert postgres sql scripts. It is ideal for developers to seed the database directly through postgres dump like files. Links to other projects that take this approach
If you do plan on creating dump like sql files, let me know and I will approve so this PR doesn't become a blocker |



Summary & Changes 📃
Changes made:
scripts/events-seed.jsscripts/users-seed.jsglobal-teardown.ts.📌 Required for: UI changes, layout updates, or bug fixes.
Expand ⬇️
How to Test 🧪
Step 1: Run the setup script in your terminal
linux:
windows:
Step 2: Start the project by running this command in terminal:
npm run dev.Step 3: Run this new seed command to populate database with visible test events
npm run seed.Expected Behavior: (Describe what should happen)
Event data is visible when navigating webpage.
Checklist ✅
Resolves #issue-number).