stable

Clone or download

Read-only

chore: Unit-test bubbling change event on all fields

No functional change. Unit-tests should pass. Notes: Add unit-tests for all mutable fields to make it clear the "change" event is part of the fields' contract to the modal. When we change those fields, we need to keep that in mind. For example if we add ShadowDOM to the fields, the native "bubbling" will stop at the Shadow root. The host will need to keep dispatching at least one "change" event so that the modal can show the warning before closing. Closes request #32653 Do not lose modifications done in Artifact Modal Change-Id: I96334a0cc2e1e3b5299961ac09f528625cd23fc4

Modified Files

Name
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/checkbox-field/CheckboxField.test.ts +40 −37 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/date-field/DateField.test.ts +49 −56 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/date-field/DateField.ts +5 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/float-field/FloatField.test.ts +34 −18 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/float-field/FloatField.ts +5 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/int-field/IntField.test.ts +34 −18 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/int-field/IntField.ts +5 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkTypeSelectorElement.test.ts +32 −17 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/permission-field/PermissionField.test.ts +84 −39 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/permission-field/PermissionField.ts +5 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/radio-buttons-field/RadioButtonsField.test.ts +53 −25 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/radio-buttons-field/RadioButtonsField.ts +7 −5 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/select-box-field/SelectBoxField.test.ts +63 −5 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/select-box-field/SelectBoxField.ts +5 −4 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/select-box-field/SelectBoxHighlighter.test.ts +3 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/select-box-field/SelectBoxHighlighter.ts +2 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/string-field/StringField.test.ts +34 −11 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/string-field/StringField.ts +5 −2 Go to diff View file