Skip to content

add event seeding file for populating home page with test events#176

Open
TVW96 wants to merge 5 commits intomainfrom
175-issue-missing-eventsdata-and-userdata-add-database-seed-file
Open

add event seeding file for populating home page with test events#176
TVW96 wants to merge 5 commits intomainfrom
175-issue-missing-eventsdata-and-userdata-add-database-seed-file

Conversation

@TVW96
Copy link
Copy Markdown
Contributor

@TVW96 TVW96 commented Mar 7, 2026

Summary & Changes 📃

Changes made:

  • Added: scripts/events-seed.js
  • Added: scripts/users-seed.js
  • Added: command for running scripts in package file.
  • Added: logic for global-teardown.ts.
  • Updated: test to include removal of test users and test events after test completed. This process is again repeated when running the global-teardown file.

📌 Required for: UI changes, layout updates, or bug fixes.

Expand ⬇️ Screenshot 2026-03-06 at 9 14 25 PM

How to Test 🧪

Step 1: Run the setup script in your terminal

linux:

bash setup-macos-linux.sh

windows:

bash setup-windows.bat

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 ✅

  • I have tested this PR locally and it works as expected.
  • This PR resolves an issue (Resolves #issue-number).
  • Reviewers, assignees(self), tags, and labels are correctly assigned.
  • Squash commits and enable auto-merge if approved.

@TVW96 TVW96 self-assigned this Mar 7, 2026
@TVW96 TVW96 added enhancement New feature or request DevOps CI/CD pipelines, build, and release management labels Mar 7, 2026
@TVW96 TVW96 linked an issue Mar 7, 2026 that may be closed by this pull request
7 tasks
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 8, 2026

✅ Full E2E Test Results

Running full test suite (critical files changed)

Status Count
✅ Passed 47
❌ Failed 0
📊 Total 47

View detailed report

@TVW96 TVW96 marked this pull request as ready for review March 9, 2026 17:26
@IsaacJrTypes
Copy link
Copy Markdown
Collaborator

IsaacJrTypes commented Mar 14, 2026

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

  • If one runs the seeding scripts twice, we will get duplicate events for testing which might confuse some developers.

Is your end goal to seed the database through the API endpoint to actually provide a postgres seed file?
If so, I am assuming that there will be follow up PRs that will generate said postgres seed and schema files.

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

CleanShot 2026-03-13 at 16 32 15 CleanShot 2026-03-13 at 17 25 40 CleanShot 2026-03-13 at 16 52 14

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DevOps CI/CD pipelines, build, and release management enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue: Missing EventsData and UserData – Add Database Seed File

2 participants