Skip to content

Refactoring + Unit tests#94

Merged
shenanigans-be merged 34 commits intomainfrom
pipeline-ci
Dec 28, 2025
Merged

Refactoring + Unit tests#94
shenanigans-be merged 34 commits intomainfrom
pipeline-ci

Conversation

@shenanigans-be
Copy link
Owner

@shenanigans-be shenanigans-be commented Dec 12, 2025

We're finally professionalizing up in here, because my I-threw-this-over-the-weekend style of architecture is causing problems. 🫠

This started as a pretty innocent attempt to introduce Unit testing into the project, but soon grew into a full refactor of pretty much the entire back-end.
I realised that in order to do Unit testing, we need units, and the classes and implementations now were way to huge to be tested effectively.

This refactor aims to fix the following things:

  • Break functionality up into smaller components.
  • Work with typed values where possible.
  • Implement unit tests on every level
  • Run the unit tests in github actions for every PR so I don't have to manually check every new feature (-> this is what started the whole thing)

@shenanigans-be shenanigans-be changed the title Refactoring + PHPUnit & PHPStan Refactoring + Unit tests Dec 13, 2025
@shenanigans-be
Copy link
Owner Author

shenanigans-be commented Dec 28, 2025

Currently betatesting, courtesy of the fine TI community on reddit.
Feedback:

  1. TE factions in the Advanced settings should be above the DS ones.
  2. Show backend errors in the frontend (for validation or impossible slices)
  3. Map generation seems to be different:

I rerolled the draft a couple of times and I noticed way less anomalies right in the middle of the slice, way more systems with planets adjacent to the HS and way less systems with planets adjacent to Mecatol Rex.

Almost all slices i generated had planets in all three systems adjecent to HS. Also felt like there were less difference between slices then before

I noticed this too. Lots more obstacles next to Mecatol, too

  1. On moblie, when the admin passkey appears. It is too wide for me to see everything clearly
  2. when I set minimum legendaries to 6 (shooting for one per slice) it would infinitely load
  3. I don’t seem to be able to generate a draft on a mobile browser (chrome and safari) even after clearing
  4. when you click on the systems of each slice on phone, the ones on the sides get their values partly hidden

@shenanigans-be shenanigans-be merged commit df152ac into main Dec 28, 2025
3 checks passed
@shenanigans-be shenanigans-be deleted the pipeline-ci branch December 28, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant