/oc-test-plugin

Playground for OctoberCMS

Primary LanguageHTML

Test Plugin

This is a UI test plugin for OctoberCMS. Extract this archive to /plugins/october/test and click on Playground in the back-end area.

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

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

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

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

Reviews "Morph To" Plugins and Themes as Product (Polymorphic relationship)

Test 6: Trees

A Member uses a simple tree (parent-child) structure.

A Category uses a simple tree structure, with sorting.

A Channel uses a nested set tree structure.

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.

  • Deleting multiple Comments from a Post (deferred) only deletes one comment.

  • Constrained relations should not appear in RecordFinder (Phone:is_active) and Relation Controller lists (Comment:is_visible).

  • 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