Skip to content

Conversation

SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Jul 1, 2025

This PR represents a major overhaul of the testing framework in preparation for the 1.0.0 release.

Prior to this change, the PartTestTemplate model was linked to a specific part. So if the user wanted to assign the "same" test to another part (say in a different category) then the template had to be duplicated.

The major change here is to decouple the PartTestTemplate model from the Part model - templates are now generic and can be reused. We then add the PartTest model which links a template to either a Part or PartCategory instance.

Link to Part

If a template is linked to a given part, then test results can be generated for any stock item of that part (or any variants of that part).

Link to Category

If a template is linked to a given category then test results can be generated for any part which lives under that category.

TODO

  • Schema and data migrations
  • Add migration testing
  • Add API endpoints for new PartTest model
  • Add data tables for viewing / editing / deleting the PartTest instances against a part
  • Update UI logic for viewing available tests against a given part
  • Update UI logic for viewing available tests against a build order
  • Update UI logic for viewing available tests against a stock item
  • Fix "copy_tests_from" function on a Part instance
  • Fix "copy test_results_from" function on a StockItem instance.
  • Ensure test results are copied when serializing a stock item
  • Fix existing unit tests
  • Add new playwright tests
  • Add new API unit tests
  • Update documentation around testing procedures

@SchrodingersGat SchrodingersGat added part Related to Part models stock Related to Stock models api Relates to the API breaking Indicates a major update or change which breaks compatibility migration Data or schema migrations User Interface Related to the frontend / User Interface full-run Always do a full QC CI run labels Jul 1, 2025
Copy link

netlify bot commented Jul 1, 2025

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit b5f29eb
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/686de0d53b66b400089cde3d
😎 Deploy Preview https://deploy-preview-9928--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94 (🔴 down 3 from production)
Accessibility: 81 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@SchrodingersGat SchrodingersGat marked this pull request as draft July 1, 2025 14:17
@SchrodingersGat SchrodingersGat added this to the 1.0.0 milestone Jul 1, 2025
categoryId?: number;
}>) {
const table = useTable('part-test');
const user = useUserState();

Check notice

Code scanning / SonarCloud

Unused assignments should be removed Low

Remove this useless assignment to variable "user". See more on SonarQube Cloud
}>) {
const table = useTable('part-test');
const user = useUserState();
const navigate = useNavigate();

Check notice

Code scanning / SonarCloud

Unused assignments should be removed Low

Remove this useless assignment to variable "navigate". See more on SonarQube Cloud
@SchrodingersGat SchrodingersGat modified the milestones: 1.0.0, 1.1.0 Jul 23, 2025
@SchrodingersGat
Copy link
Member Author

Bumping to the next release target, a lot to think about here which I don't have time for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Relates to the API breaking Indicates a major update or change which breaks compatibility full-run Always do a full QC CI run migration Data or schema migrations part Related to Part models stock Related to Stock models User Interface Related to the frontend / User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant