-
Notifications
You must be signed in to change notification settings - Fork 0
ETT-752 sbcr project #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ETT-752 sbcr project #206
Conversation
- Add `Project` subclass and views for UI testing on dev-2
- Still TODO:
- Unit tests
- Input validation
…t block when displayed
- Add parameter extraction of all fields in SBCR UI - Review data format - Extract out `partial/rights.tt` which should be reusable across all projects
…s/reasons/rights routines in CRMS.pm with a more structured class that is not just a wrapper around SQL queries: - `TranslateAttr` - `TranslateReason` - `TranslateRights` - `AllCRMSRights` - `Rights` - `AllAssignableRights` - `GetAttrReasonFromCode` - `TranslateAttrReasonFromCode` - `GetCodeFromAttrReason` - `GetAttrReasonCode` This class is fully tested. For now it will only be used in the SBCR module and its tests.
- SBCR module tests, first pass
…ts.pm` - Eager load only when populating the singleton
aelkiss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally the perl side is looking pretty good but I wonder if we might be able to clean up a bit in the templates.
- individual tests are easy to follow, although I didn't read through each one in detail
SBCR.pmandEntitlements.pmlook fine to me.- I don't know that we have another name for the combination of attr/reason that 'entitlement' represents other than "attribute/reason combination" -- as "rights" typically to me implies the combination of the item ID and the attribute & reason codes. 'entitlement' seems as reasonable as anything.
- I had some comments on the templates; if they're copied from other existing things that might make it more involved to address the comments. If they're new for this project, maybe it's worth addressing now.
… not have led to aberrant behavior - Add comment about the rights way to do the rights <-> id mapping in JS code
…tively commented out
… partial used by SBCR - Should be usable by other projects by swapping in an `INCLUDE` in each project's main form
…ur own poorly maintained version
aelkiss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional changes & reasons for not addressing other items now all make sense to me.
…gled so user-entered data is not lost.
…on-experts, in SBCR project.
The SBCR UI is a combination of the Core and Crown Copyright projects. No attempt has been made to reduce duplication between the new code and the existing UI components (*.tt bits), since we don't have sufficient test coverage, in particular no way to Playwright the thing.
The new
Project::SBCRsubclass has 100% test coverage, most of that being in theValidateSubmissionmethod which does a number of checks on user-entered review data. Many of these were written (based on checks in other projects) and not needed for SBCR so they are applied toward better coverage in Project.t (which holds the default set of validations for monographs/state gov docs projects) mostly. More could be done, either by copying the tests to other projects, or by extracting out common validations to theProjectclass. That's out of scope.CRMS::Entitlements (also 100% under test) was added because the
CRMS.pmmethods are gross wrappers around SQL-as-API and I wanted something not horrible for theSBCR.pmtests. The comments indicate this may be a temporary class name becauseCRMS::Rightsis currently taken... but I have to confessEntitlementsis growing on me.The
UNIQUEconstraint oncrms.rights.{attr/reason}has already been applied in production and htdev.