Skip to content

Commit

Permalink
feat: updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abp6318 committed Oct 20, 2023
1 parent 21ca87c commit 0696e14
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/common/test/content/_internal/ContentUiSchemaEdit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ describe("buildUiSchema: content edit", () => {
icon: true,
labelKey: "some.scope.fields.title.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -64,6 +70,14 @@ describe("buildUiSchema: content edit", () => {
helperText: {
labelKey: "some.scope.fields.summary.hint",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ describe("buildUiSchema: discussion create", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ describe("buildUiSchema: discussion edit", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand Down Expand Up @@ -83,6 +89,14 @@ describe("buildUiSchema: discussion edit", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
14 changes: 14 additions & 0 deletions packages/common/test/groups/_internal/GroupUiSchemaEdit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ describe("buildUiSchema: group edit", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -38,6 +44,14 @@ describe("buildUiSchema: group edit", () => {
control: "hub-field-input-input",
type: "textarea",
rows: 4,
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ describe("buildUiSchema: initiative template edit", () => {
icon: true,
labelKey: `some.scope.fields.name.requiredError`,
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand Down Expand Up @@ -73,6 +79,14 @@ describe("buildUiSchema: initiative template edit", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ describe("buildUiSchema: initiative create", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -62,6 +68,14 @@ describe("buildUiSchema: initiative create", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ describe("buildUiSchema: initiative edit", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -66,6 +72,14 @@ describe("buildUiSchema: initiative edit", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
14 changes: 14 additions & 0 deletions packages/common/test/pages/_internal/PageUiSchemaEdit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ describe("buildUiSchema: page edit", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -61,6 +67,14 @@ describe("buildUiSchema: page edit", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ describe("buildUiSchema: project create", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -62,6 +68,14 @@ describe("buildUiSchema: project create", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ describe("buildUiSchema: project edit", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -70,6 +76,14 @@ describe("buildUiSchema: project edit", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
14 changes: 14 additions & 0 deletions packages/common/test/sites/_internal/SiteUiSchemaCreate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ describe("buildUiSchema: site create", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -62,6 +68,14 @@ describe("buildUiSchema: site create", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
],
Expand Down
14 changes: 14 additions & 0 deletions packages/common/test/sites/_internal/SiteUiSchemaEdit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ describe("buildUiSchema: site edit", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand All @@ -61,6 +67,14 @@ describe("buildUiSchema: site edit", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ describe("buildUiSchema: template edit", () => {
icon: true,
labelKey: "some.scope.fields.name.requiredError",
},
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.name.maxLengthError`,
},
],
},
},
Expand Down Expand Up @@ -67,6 +73,14 @@ describe("buildUiSchema: template edit", () => {
helperText: {
labelKey: "some.scope.fields.summary.helperText",
},
messages: [
{
type: "ERROR",
keyword: "maxLength",
icon: true,
labelKey: `shared.fields.summary.maxLengthError`,
},
],
},
},
{
Expand Down

0 comments on commit 0696e14

Please sign in to comment.