You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: - 🔨 What does this issue fix? Fixes E2E failures due to schema changes and optimizes the Playwright CI pipeline. In addition included changes to backend returns tags as Tag objects instead of eventTags as strings these changes ensure frontend compatibility.
👀 What is the expected behavior? Successful E2E runs using corrected endpoints and a "Smart CI" that scales based on file changes.
🗨️ Any relevant technical details? Transitioned from a "run-all" approach to a tiered strategy: Smoke Tests for UI changes vs. Full Sharded Suite for critical backend/logic changes.
Changes:
Endpoint Update:** Fixed delete path to /events/remove/${id} in api-client.ts.
DTO Alignment:** Updated eventTags → tagNames in event-management.spec.ts.
CI Optimization:** Implemented path-based filtering and 2-way parallel sharding.
activity.service.ts: Added relations: ['tags', 'coverPhoto',
'document'] to getActivityById() to include tag data in API
responses
Frontend Data Layer:
dbFieldMapper.ts: Added tags→eventTags transformation to
convert Tag objects ([{id, name, slug}]) to string arrays
(["Tech", "Social"])
Frontend Components (Defensive Coding):
EditDialog.tsx: Added null-safe fallback for .join() on
eventTags
HomeEventsCard.tsx: Added null-safe fallback for .map() on
eventTags
Unit Test Updates:
activity.service.spec.ts: Updated mock expectation to include
new relations
dbFieldMapper.test.ts: Updated 6 tests to expect eventTags: []
in normalized output
📝 Efficiency: Reduced average CI runtime for non-critical PRs.
Screenshots / Visual Aids 🔎
📌 Required for: UI changes, layout updates, or bug fixes.
Expand ⬇️
How to Test 🧪
Steps to Reproduce:
0. If you have the old schema, please makesure to drop the schema and run the application again.
run this quary in pgAdmin: DROP SCHEMA public CASCADE; CREATE SCHEMA public;
Run full E2E suitenpx playwright test
Run Unit Tests:npm run test
Manual Verification:
Create a new event with tags → Verify tags display on event
detail page
Edit an existing event → Verify tags load correctly in the
edit dialog
View event cards on home page → Verify tags render without
console errors Expected Behavior:
All E2E tests and unit-test pass
Checklist ✅
I have tested this PR locally and it works as expected.
This PR resolves an issue (Resolves #135).
Reviewers, assignees(self), tags, and labels are correctly assigned.
The reason will be displayed to describe this comment to others. Learn more.
Can connect to database from client. Cannot connect from Postman.
E2E test's are outputting flaky test which vary depending on test refresh rate. There is also about a dozen tests that we are skipping. Can we fix these before pushing this PR?
E2E test's are outputting flaky test which vary depending on test refresh rate. There is also about a dozen tests that we are skipping. Can we fix these before pushing this PR?
Thanks for the thorough review, Troy!
The 500 error on /api/events is reproducible from both the UI and Postman as shown in the screenshot, the frontend also returns no events. It's not a Postman-specific issue the issue "not being able to connect to the database" might be in the set up but all events was not showing up, and it is fixed now.
Regarding flaky tests, these are pre-existing and not introduced by this PR. Retries are already configured in playwright.config.ts (retries: 2 on CI, retries: 1 locally), so Playwright is already handling transient failures per its recommended approach. The root cause of flakiness in E2E tests like ours is typically race conditions or timing variance across environments, which is a broader codebase concern. I'll open a separate issue to investigate and address the underlying causes (e.g. replacing any waitForTimeout() calls with proper auto-waiting assertions). Here's the relevant Playwright docs for reference: https://playwright.dev/docs/test-retries
Of the 12 skipped tests shown, 5 are intentionally skipped in the initial Playwright tests branch. The rest are surfacing from the unit test file as a result. The 5 skipped, fall into two categories: the Material UI date picker in our UI is difficult for Playwright to interact with (the test is kept for future use), and a few redirect simulation tests that were extra and can be iterated on. I covered this in the Playwright demo, but I'll document it now since it wasn't written down.
These are all valid observations, but none are regressions introduced by this PR. I'll create separate issues for tracking. Happy to move further discussion to the GitHub Discussions section for visibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Changes 📃
Resolves:
Bug Report: Fix E2E Tests for ERD Schema Refactor Compatibility #150
Issue: Update dbFieldMapper Utility for New Schema Fields #152
Related To: nsc-events-fullstack_30_130_erd-schema-refactoring #142
Summary: - 🔨 What does this issue fix? Fixes E2E failures due to schema changes and optimizes the Playwright CI pipeline. In addition included changes to backend returns tags as Tag objects instead of eventTags as strings these changes ensure frontend compatibility.
👀 What is the expected behavior? Successful E2E runs using corrected endpoints and a "Smart CI" that scales based on file changes.
🗨️ Any relevant technical details? Transitioned from a "run-all" approach to a tiered strategy: Smoke Tests for UI changes vs. Full Sharded Suite for critical backend/logic changes.
Changes:
/events/remove/${id}inapi-client.ts.eventTags→tagNamesinevent-management.spec.ts.workflow_dispatchto allow manual scope selection (Smoke/Critical/Full).Backend:
'document'] to getActivityById() to include tag data in API
responses
Frontend Data Layer:
convert Tag objects ([{id, name, slug}]) to string arrays
(["Tech", "Social"])
Frontend Components (Defensive Coding):
eventTags
eventTags
Unit Test Updates:
new relations
in normalized output
📝 Efficiency: Reduced average CI runtime for non-critical PRs.
Screenshots / Visual Aids 🔎
📌 Required for: UI changes, layout updates, or bug fixes.
Expand ⬇️
How to Test 🧪
Steps to Reproduce:
0. If you have the old schema, please makesure to drop the schema and run the application again.
run this quary in pgAdmin:
DROP SCHEMA public CASCADE; CREATE SCHEMA public;npx playwright testnpm run testdetail page
edit dialog
console errors
Expected Behavior:
Checklist ✅
Resolves #135).