Skip to content

Commit

Permalink
fix(hub-common): update events 3 schema & uiSchema tests
Browse files Browse the repository at this point in the history
affects: @esri/hub-common

ISSUES CLOSED: 11676
  • Loading branch information
rweber-esri committed Nov 26, 2024
1 parent 96f90c8 commit a3f5bb7
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ describe("EventSchemaCreate", () => {
default: [],
},
},
allOf: [
URL_VALIDATIONS_WHEN_ONLINE_OR_HYBRID,
TIME_VALIDATIONS_WHEN_NOT_ALL_DAY,
],
allOf: [URL_VALIDATIONS_WHEN_ONLINE_OR_HYBRID],
dependencies: {
isAllDay: TIME_VALIDATIONS_WHEN_NOT_ALL_DAY,
},
} as IConfigurationSchema);
});
});
Expand Down
12 changes: 6 additions & 6 deletions packages/common/test/events/_internal/EventSchemaEdit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ describe("EventSchemaEdit", () => {
default: [],
},
},
allOf: [
URL_VALIDATIONS_WHEN_ONLINE_OR_HYBRID,
TIME_VALIDATIONS_WHEN_NOT_ALL_DAY,
FIXED_ONLINE_ATTENDANCE_VALIDATIONS,
FIXED_IN_PERSON_ATTENDANCE_VALIDATIONS,
],
allOf: [URL_VALIDATIONS_WHEN_ONLINE_OR_HYBRID],
dependencies: {
isAllDay: TIME_VALIDATIONS_WHEN_NOT_ALL_DAY,
onlineCapacity: FIXED_ONLINE_ATTENDANCE_VALIDATIONS,
inPersonCapacity: FIXED_IN_PERSON_ATTENDANCE_VALIDATIONS,
},
} as IConfigurationSchema);
});
});
Expand Down
12 changes: 12 additions & 0 deletions packages/common/test/events/_internal/EventUiSchemaCreate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ describe("EventUiSchemaCreate", () => {
icon: true,
labelKey: `myI18nScope.fields.startTime.requiredError`,
},
{
type: "ERROR",
keyword: "format",
icon: true,
labelKey: "event.fields.startTime.invalidTime",
},
],
},
},
Expand Down Expand Up @@ -192,6 +198,12 @@ describe("EventUiSchemaCreate", () => {
icon: true,
labelKey: `myI18nScope.fields.endTime.minTimeError`,
},
{
type: "ERROR",
keyword: "format",
icon: true,
labelKey: "event.fields.endTime.invalidTime",
},
],
},
},
Expand Down
24 changes: 24 additions & 0 deletions packages/common/test/events/_internal/EventUiSchemaEdit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ describe("EventUiSchemaEdit", () => {
icon: true,
labelKey: "myI18nScope.fields.startTime.requiredError",
},
{
type: "ERROR",
keyword: "format",
icon: true,
labelKey: "event.fields.startTime.invalidTime",
},
],
},
},
Expand Down Expand Up @@ -280,6 +286,12 @@ describe("EventUiSchemaEdit", () => {
icon: true,
labelKey: "myI18nScope.fields.endTime.minTimeError",
},
{
type: "ERROR",
keyword: "format",
icon: true,
labelKey: "event.fields.endTime.invalidTime",
},
],
},
},
Expand Down Expand Up @@ -395,6 +407,12 @@ describe("EventUiSchemaEdit", () => {
labelKey:
"myI18nScope.fields.inPersonCapacity.minimumError",
},
{
type: "ERROR",
keyword: "type",
icon: true,
labelKey: "event.fields.inPersonCapacity.type",
},
],
},
},
Expand Down Expand Up @@ -517,6 +535,12 @@ describe("EventUiSchemaEdit", () => {
labelKey:
"myI18nScope.fields.onlineCapacity.minimumError",
},
{
type: "ERROR",
keyword: "type",
icon: true,
labelKey: "event.fields.onlineCapacity.type",
},
],
},
},
Expand Down

0 comments on commit a3f5bb7

Please sign in to comment.