From ee32dedf61e2d2ab6704fd40eec2a9e436f2114f Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 5 Feb 2026 15:38:25 +0000 Subject: Enhance testing and integration for checkbox-list custom field - Updated Gitea workflow to trigger on pushes to the master branch and refined job configurations for testing and E2E processes. - Added Jest and Playwright configurations for integration and E2E testing. - Introduced new checkbox-item API with corresponding controller, service, and routes. - Created integration tests for the checkbox-list functionality, ensuring proper handling of required fields and default values. - Updated package.json and package-lock.json to include necessary dependencies for testing. --- playground/types/generated/contentTypes.d.ts | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'playground/types') diff --git a/playground/types/generated/contentTypes.d.ts b/playground/types/generated/contentTypes.d.ts index 347cc6c..3080ede 100644 --- a/playground/types/generated/contentTypes.d.ts +++ b/playground/types/generated/contentTypes.d.ts @@ -503,6 +503,57 @@ export interface ApiCategoryCategory extends Struct.CollectionTypeSchema { }; } +export interface ApiCheckboxItemCheckboxItem extends Struct.CollectionTypeSchema { + collectionName: 'checkbox_items'; + info: { + description: 'Content type for checkbox list integration tests'; + displayName: 'Checkbox Item'; + pluralName: 'checkbox-items'; + singularName: 'checkbox-item'; + }; + options: { + draftAndPublish: false; + }; + attributes: { + choices: Schema.Attribute.CustomField< + 'plugin::checkbox-list.checkbox-list', + { + enum: ['alpha', 'beta', 'gamma']; + } + >; + choicesDefault: Schema.Attribute.CustomField< + 'plugin::checkbox-list.checkbox-list', + { + enum: ['defaultA', 'defaultB']; + } + > & + Schema.Attribute.DefaultTo<['defaultA']>; + choicesPrivate: Schema.Attribute.CustomField< + 'plugin::checkbox-list.checkbox-list', + { + enum: ['secret', 'top-secret']; + } + > & + Schema.Attribute.Private; + choicesRequired: Schema.Attribute.CustomField< + 'plugin::checkbox-list.checkbox-list', + { + enum: ['alpha', 'beta']; + } + > & + Schema.Attribute.Required; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation<'oneToMany', 'api::checkbox-item.checkbox-item'> & + Schema.Attribute.Private; + publishedAt: Schema.Attribute.DateTime; + title: Schema.Attribute.String & Schema.Attribute.Required; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private; + }; +} + export interface ApiGlobalGlobal extends Struct.SingleTypeSchema { collectionName: 'globals'; info: { @@ -963,6 +1014,7 @@ declare module '@strapi/strapi' { 'api::article.article': ApiArticleArticle; 'api::author.author': ApiAuthorAuthor; 'api::category.category': ApiCategoryCategory; + 'api::checkbox-item.checkbox-item': ApiCheckboxItemCheckboxItem; 'api::global.global': ApiGlobalGlobal; 'plugin::content-releases.release': PluginContentReleasesRelease; 'plugin::content-releases.release-action': PluginContentReleasesReleaseAction; -- cgit v1.2.3