Skip to content

fix: reserved community type test fixes#6208

Open
ludtkemorgan wants to merge 1 commit into
mainfrom
test/reserved-community-type
Open

fix: reserved community type test fixes#6208
ludtkemorgan wants to merge 1 commit into
mainfrom
test/reserved-community-type

Conversation

@ludtkemorgan

@ludtkemorgan ludtkemorgan commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

This PR addresses issue with bloom-la release.

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

Two fixes to accommodate changes a forked jurisdiction might want and still allow tests to pass:

  • reserved community types now have test id consistent rather than the custom text so testing for them in Cypress tests is consistent even if the jurisdiction has overriden the text
  • When seeding data delete all community types already existing in the database. This is an issue because we create RCT with a jurisdiction attached, but on the UI we don't care what jurisdiction it is attached to.
    • Long term solution would be to refactor how we use RCT so that either jurisdiction id does not matter or we create unique ones for every jurisdiction in the database and reference just the appropriate jurisdiction's version in the partner site

How Can This Be Tested/Reviewed?

All tests should still pass.

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@netlify

netlify Bot commented Apr 21, 2026

Copy link
Copy Markdown

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit e2886ef
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-dev/deploys/69e7cb6072a1a70008ede030
😎 Deploy Preview https://deploy-preview-6208--partners-bloom-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 21, 2026

Copy link
Copy Markdown

Deploy Preview for partners-bloom-msq2 canceled.

Name Link
🔨 Latest commit e2886ef
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-msq2/deploys/69e7cb604a349200080fb598

@netlify

netlify Bot commented Apr 21, 2026

Copy link
Copy Markdown

Deploy Preview for bloom-angelopolis ready!

Name Link
🔨 Latest commit e2886ef
🔍 Latest deploy log https://app.netlify.com/projects/bloom-angelopolis/deploys/69e7cb60e3cc5400088650f8
😎 Deploy Preview https://deploy-preview-6208--bloom-angelopolis.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 21, 2026

Copy link
Copy Markdown

Deploy Preview for bloom-public-seeds ready!

Name Link
🔨 Latest commit e2886ef
🔍 Latest deploy log https://app.netlify.com/projects/bloom-public-seeds/deploys/69e7cb6055230e0008382406
😎 Deploy Preview https://deploy-preview-6208--bloom-public-seeds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 21, 2026

Copy link
Copy Markdown

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit e2886ef
🔍 Latest deploy log https://app.netlify.com/projects/bloom-exygy-dev/deploys/69e7cb60d814bf0007aebaa0
😎 Deploy Preview https://deploy-preview-6208--bloom-exygy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ludtkemorgan
ludtkemorgan force-pushed the test/reserved-community-type branch from 9625326 to e2886ef Compare April 21, 2026 19:09
// create pre-determined values
const unitTypes = await unitTypeFactoryAll(prismaClient);
// Clear all existing reserved community types and add new ones
await prismaClient.reservedCommunityTypes.deleteMany();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I am unsure about this, in LA this is going to cause some issues (a difference between the reserved community types available with the ones created by the migrations being deleted here and the generic reserved community types created)

I think maybe we should talk about this in a bit more depth but curious if @emilyjablonski feels similarly about this difference mattering

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could pull it over to LA to test it but my initial instinct would be that it would be ok - I think I might be missing something tho! What pieces would you expect would break?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think anything would break, but there would be differences between our local versions stood up and what LA actually has for reserved community types

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see!! Yes I agree it would be ideal that LA migrations would be reflected when seeding over there - and removing the types here would cause a mismatch

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are still going to run into mismatches in the LA repo since we don't filter by jurisdiction on the reserved community type. The way it currently works is it will display all of the LA and all of the seeded RCTs. So for example the Senior62 will show up twice. This will continue to cause headaches for our tests in a forked repo.

I could get around the specific problem we have for LA by making the tests select community types that are not in the LA migration files. And also update which one of the seeded RCTs has a description. Would that work for everyone? We could potentially run into issues with the next jurisdiction or even LA if they change the community types they want, but it would at least save us some headaches in the near term until we can fully refactor how community types are saved and fetched.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YazeedLoonat @emilyjablonski Do you have any thoughts on this?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirming we chatted about a generic RCT for testing that doesn't exist in prod envs!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Just checking in again about the generic RCT updates but no rush

@ludtkemorgan ludtkemorgan added the 1 review needed Requires 1 more review before ready to merge label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 review needed Requires 1 more review before ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants