Observed behavior
This is a follow up issue on #4472
contentcuration/contentcuration/frontend/accounts/pages/__tests__/create.spec.js fails to run during tests execution when migrated to KCheckbox. It's likely related to the rules and hide-details props that have been removed from the Checkbox.vue component and yet are used in the Create.vue component.
|
<Checkbox |
|
v-model="acceptedAgreement" |
|
:label="$tr('agreement')" |
|
required |
|
:rules="tosAndPolicyRules" |
|
:hide-details="false" |
|
class="my-1 policy-checkbox" |
|
/> |
The work around was to use the VCheckbox instead of the Checkbox, since it has the props in question.
Expected behavior
- The
Create component should be migrated to KCheckbox
- The failing tests should run and pass.
User-facing consequences
None
Errors and logs
FAIL contentcuration/contentcuration/frontend/accounts/pages/__tests__/create.spec.js
● Test suite failed to run
Call retries were exceeded
at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
Additional information
We don't need to implement hide-details or rules necessarily. Since this page is the only place where we're using checkbox rules, we can just implement the validation directly in the component. Additionally, it needs to display the error message underneath the field, which hide-details=false allows space for.
Steps to reproduce the issue
Observed behavior
contentcuration/contentcuration/frontend/accounts/pages/__tests__/create.spec.jsfails to run during tests execution when migrated toKCheckbox. It's likely related to therulesandhide-detailsprops that have been removed from theCheckbox.vuecomponent and yet are used in theCreate.vuecomponent.studio/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
Lines 135 to 142 in dbb5a63
The work around was to use the
VCheckboxinstead of theCheckbox, since it has the props in question.Expected behavior
Createcomponent should be migrated toKCheckboxUser-facing consequences
None
Errors and logs
Additional information
We don't need to implement
hide-detailsorrulesnecessarily. Since this page is the only place where we're using checkbox rules, we can just implement the validation directly in the component. Additionally, it needs to display the error message underneath the field, whichhide-details=falseallows space for.Steps to reproduce the issue
yarn run test