Go to file
2024-10-21 11:54:58 +13:00
_config API Update API to reflect changes to CLI interaction (#203) 2024-09-26 17:17:35 +12:00
.github MNT Run module-standardiser (#186) 2024-06-18 17:43:04 +12:00
client DEP Update JS dependencies 2024-09-01 04:29:01 +00:00
code API Update method signature to match parent class (#207) 2024-10-21 11:54:58 +13:00
css MNT Fix lint css warnings (#184) 2024-06-12 11:42:09 +12:00
images NEW: More complete block content, unique images with watermarks 2021-05-03 13:36:06 +12:00
templates MNT Cuccumber Studio test suite (#167) 2024-02-29 14:33:36 +13:00
_config.php Update deprecated API 2017-01-11 10:47:17 +13:00
.editorconfig Rebased with webpack 2016-09-29 13:39:07 +13:00
.eslintignore Added TestReactFormBuilder admin section, this utilises BasicFieldsTestPage fields currently. 2016-09-28 11:42:20 +13:00
.eslintrc.js MNT Add yarn lint back in 2023-01-13 15:23:09 +13:00
.gitignore new gitignore 2017-11-29 11:46:19 +13:00
.nvmrc DEP Upgrade build stack (#133) 2022-12-19 10:20:07 +13:00
.stylelintrc.js MNT Replace sass-lint with stylelint (#173) 2024-05-01 17:01:24 +12:00
code-of-conduct.md Added standard code of conduct file 2016-02-16 11:37:34 +13:00
composer.json DEP Limit PHP support for CMS 6 (#200) 2024-08-22 12:09:18 +12:00
LICENSE MNT Run module-standardiser 2024-05-20 16:27:10 +12:00
package.json API Remove GraphQL 2024-08-30 12:06:47 +12:00
phpstan.neon.dist MNT Run module-standardiser 2024-05-20 16:27:10 +12:00
README.md API Update API to reflect changes to CLI interaction (#203) 2024-09-26 17:17:35 +12:00
webpack.config.js DEP Upgrade build stack (#133) 2022-12-19 10:20:07 +13:00
yarn.lock Merge branch '1' into 2 2024-09-11 14:03:29 +12:00

Framework Test Module

Introduction

Aids core and module developers in testing their code against a set of sample data and behaviour.

  • Shows all core form fields, including their disabled and readonly state
  • Shows sample GridField instance including data
  • Creates sample members (to efficiently test SecurityAdmin)
  • Creates a sample ModelAdmin instance (available at admin/test)
  • (Optional) Three-step process for the multiform module
  • (Optional) Sample page for the tagfield module
  • (Optional) Sample page for the recaptcha module

Usage

Simply running sake db:build will take care of most sample data setup.

In order to use any of the optional test behaviour targeted at modules, install the module and remove the _manifest_exclude file from the relevant folder. For example, to test the tagfield module, remove the frameworktest/code/tagfield/_manifest_exclude file.

More sample data

The module creates some default pages for different CMS behaviours. The CMS is intended to be perform well with a couple of thousand pages. If you want to test the CMS behaviour for a large and nested tree, the module includes a simple generator task: sake tasks:FTPageMakerTask. It will create 3^5 pages by default, so takes a while to run through.

Configuring the amount of data

Both FTPageMagerTask and FTFileMakerTask allow the amount of generated content to be configured. To do this, pass a comma-seprarated list of integers representing the amount of records to create at each depth.

$ vendor/bin/sake tasks:FTPageMakerTask --pageCounts=10,200,5,5

$ vendor/bin/sake tasks:FTFileMakerTask --fileCounts=5,300,55,5 --folderCounts=1,5,5,5

Guaranteed unique images

The FTFileMakerTask will randomly watermark each reference to your images by default. If you want to disable this, set the uniqueImages config variable to false.

Blocks

When dnadesign/silverstripe-elemental is installed, the FTPageMakerTask can also generate blocks within those pages automatically. It has a few hardcoded sample data structures for common block types, and randomly creates a number of blocks, as well as randomly choosing to publish them. Relies on files and images being available to add as sample data.

Additional setup:

composer require dnadesign/silverstripe-elemental
composer require silverstripe/elemental-bannerblock
composer require silverstripe/elemental-fileblock

Usage:

# Generate some sample files to associate with blocks
sake tasks:FTFileMakerTask
sake tasks:FTPageMakerTask withBlocks=true

Requirements

The module is intended to run against the latest core codebase, but also includes branches matching earlier core releases for backwards compatibility.