Playground for Winter CMS

Fund package maintenance!

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 6

Forks: 1

Open Issues: 6



dev-main 2021-05-06 03:46 UTC


This is a UI test plugin for Winter CMS. Extract this archive to /plugins/winter/test and click on Playground in the back-end area. If the backend dashboard is open already, you have to sign out and sign in again for the plugin tables to be created.

The following sections are explored, tested and demonstrated along with a list of the features used:

Test 1: People

A Person "Has One" Phone (One to one relationship)

  1. Relation Controller
  2. Record Finder
  3. Proxy Form fields
  4. Date pickers
  5. Context-based Form fields
  6. List search policies @todo

Test 2: Posts

A Post "Has Many" Comments (One to many relationship)

  1. Relation Controller
  2. Popup-based Form fields
  3. Rich Editor
  4. Dual Form Controller and List Controller
  5. HTML in comments
  6. Custom Delete workflow
  7. Repeater fields in comments popup

Test 3: Users

User "Belongs To Many" Roles (Many to many relationship)

  1. Relation Controller (Standard, Pivot data, Pivot model)
  2. Image Uploaders (Single, Multi, File, Image)
  3. Number field
  4. No click list column
  5. Custom File model
  6. Form field partial
  7. Tag List in relation mode

Test 4: Countries

A Country "Has Many" Posts "Through" a User (Has many through relationship)

  1. Checkbox list
  2. Default form field values
  3. Field dependency and filtering
  4. Repeater fields
  5. Tabs empty with no fields

Test 5: Reviews

  1. Reviews "Morph To" Plugins and Themes as Product (Polymorphic relationships)
  2. Meta "Morph To" Plugins and Themes as Product (Polymorphic relationships)
  3. Plugins and Themes "Morph Many" Reviews
  4. Plugins and Themes "Morph One" Meta
  5. Plugins should not create when Meta validation fails.

Test 6: Galleries

  1. Galleries are "Morphed By Many" Posts
  2. Posts "Morph To Many" Galleries

Test 7: Trees

  1. A Member uses a simple tree (parent-child) structure.
  2. A Category uses a simple tree structure, with sorting.
  3. A Channel uses a nested set tree structure.

Test 8: Attributes

An Attribute is a single generic model with many relationship types.

  1. Posts "Belong To" (Attribute) Status (general.status).
  2. Countries "Belong To Many" (Attribute) Types (general.types).

Tests that need attention

  • An attach relation when required inside a tab does not make the tab active.

  • Proxy fields throw a nasty error when the relation is non existant.

  • Record Finder does not incorporate deferred bindings.

  • HasOne relations acting as HasMany will break the list completely.

  • Pivot model with required field doesn't show the asterisk on the form.

Incorporating functional tests

  • All relation controllers

  • Test that input preset API works on fields

  • Test that trigger API works on fields