Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 00954b4

Browse files
committed
fixed tests
1 parent 356a02c commit 00954b4

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

packages/core/tests/unit/collection/group/group.observer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('GroupObserver Tests', () => {
100100
});
101101

102102
describe('Group Observer Function Tests', () => {
103-
let groupObserver: GroupObserver;
103+
let groupObserver: GroupObserver<ItemInterface>;
104104

105105
beforeEach(() => {
106106
groupObserver = new GroupObserver(dummyGroup, {

packages/multieditor/src/status/status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export class Status<ValueType = any> extends State<StatusValueType> {
2323
* @param config - Configuration object
2424
*/
2525
constructor(item: Item<ValueType>, config: CreateStatusConfigInterface = {}) {
26+
super(item.agileInstance(), null, { key: `status_${item._key}` });
2627
config = defineConfig(config, {
2728
display: false,
2829
});
29-
super(item.agileInstance(), null, { key: `status_${item._key}` });
3030
this.item = item;
3131
this.statusTracker = new StatusTracker();
3232
this.config = {

packages/multieditor/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function updateNestedProperty(
3131
}
3232

3333
// Update the value in the schema (corresponding object part)
34-
// and thus automatically update the 'newObject' by reference
34+
// and thus automatically update the to change part in the 'newObject' by reference
3535
schema[pathParts[pathPartsLength - 1]] = value;
3636

3737
return updatedObject;

packages/multieditor/src/validator/validator.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class Validator<ValueType = any> {
7474
// Handle tracked Statuses
7575
const trackedStatuses = item.status.statusTracker.getTrackedStatuses();
7676
if (trackedStatuses.length > 0) {
77-
item.status.set(trackedStatuses[0]); // First tracked Status is the most recent validation Status and thus should be displayed
77+
item.status.set(trackedStatuses[0]); // The first tracked Status is the most recent validation Status and thus should be displayed
7878
item.status.lastTrackedValues = copy(trackedStatuses);
7979
} else editor.resetStatus(item._key);
8080

@@ -163,7 +163,7 @@ export interface ValidationMethodContainerInterface<DataType = any> {
163163
* Key/Name identifier of the validation method.
164164
* @default undefined
165165
*/
166-
key?: string;
166+
key?: ValidationMethodKey;
167167
/**
168168
* Validation method
169169
*/
@@ -177,3 +177,5 @@ export interface AddValidationMethodConfigInterface {
177177
*/
178178
key?: string;
179179
}
180+
181+
export type ValidationMethodKey = string | number;

0 commit comments

Comments
 (0)