Giter Site home page Giter Site logo

silverstripe-frameworktest's People

Contributors

chillu avatar clarkepaul avatar dependabot[bot] avatar dhensby avatar dnsl48 avatar emteknetnz avatar flamerohr avatar github-actions[bot] avatar guysartorelli avatar halkyon avatar mandrew avatar maxime-rainville avatar normann avatar robbieaverill avatar sabina-talipova avatar scopeynz avatar simonwelsh avatar sminnee avatar vikas-srivastava avatar wilr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silverstripe-frameworktest's Issues

Increase sample data to meet our NFRs

  • FTPageMakerTask should output >10,000 pages, with at least one leaf node having >1000 pages.
  • FTFileMakerTask should putput >10,000 files, with at least one folder having >1000 files.

When adding a new item on gridfield I get an error

I'm on feature-test-pages/gridfield/ (GridFieldTestPage) and I click the 'Add Company' button and get this error:

[User Error] Uncaught Exception: Object->__call(): the method 'push' does not exist on 'HTMLText'

Trace
Object->__call(push,Array)
GridFieldDetailForm.php:625
HTMLText->push(ArrayData)
GridFieldDetailForm.php:625
GridFieldDetailForm_ItemRequest->Breadcrumbs()
GridFieldDetailForm.php:363
GridFieldDetailForm_ItemRequest->ItemEditForm(GridField,SS_HTTPRequest)
GridFieldDetailForm.php:291
GridFieldDetailForm_ItemRequest->edit(SS_HTTPRequest)
RequestHandler.php:288
RequestHandler->handleAction(SS_HTTPRequest,edit)
RequestHandler.php:200
RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
GridFieldDetailForm.php:93

Is there something wrong with the core gridfield code or is the this function which I think is creating the new company?

Company.php (line 83)
public function requireDefaultRecords() {
parent::requireDefaultRecords();
$companySet = DataObject::get('Company');
foreach ($companySet as $company) {
$company->delete();
}

    foreach($this->data() as $companyData){
        $company = new Company();
        $company->Name = $companyData[0];
        $company->Category = $companyData[1];
        $company->Revenue = $companyData[2];
        $company->CEO = $companyData[3];
        $company->write();
    }
    DB::alteration_message("Added default records to Company table","created");
}

Bring numbers of objects up to date with latest NFRs

The following updates will bring this module into line with our latest NFR's as specified here

This work will assist this the 'more realistic platform regression testing' issue here https://github.com/silverstripeltd/product-issues/issues/33

FTPageMakerTask.php

  • 10,000 pages total, and at least one page with >200 child pages
  • 5 levels of page hierarchy

TODO:
Hardcode to the following: (don't bother making configurable)

  • 10 (was 5)
  • 250 (was 100)
  • 1
  • 1
  • 1

FTFileMakerTask.php

  • 10,000 files, and at least one folder with >1000 files
  • Files contain a variety of types, e.g. JPEGs with 2MB file size

TODO:

  • change protected $folderCountByDepth to
    0 => 2,
    1 => 1, (was 2)
    2 => 2,
    3 => 2,
    4 => 2,

  • change protected $fileCountByDepth to
    0 => 100,
    1 => 1001, (was 30)
    2 => 5,
    3 => 5,
    4 => 5

Company.php

  • 10,000 objects (managed through ModelAdmin or GridField)

TODO:

  • update data() to go from 216 companies to 10K
  • simply that array and suffix '-01', '02' etc 50 times

TODO:
Also as a part of work, fix this issue at the same time #64

save function on TestPage_Controller referring to legacy code

function save calls Director::redirectBack(); when it should call $variable->redirectBack(); Unsure of the exact variable in this instance.

function save($data, $form) {
$form->saveInto($this->dataRecord);
$this->dataRecord->write();
Director::redirectBack();
}

Action 'Form' isn't allowed on class TestFileUploadPage_Controller.

Keep getting this message when making changes to these files but when I add allowed actions to the array it still doesn't work e.g.

private $allowed_actions = array(
'Form',
'Form/field/Companies/item/new', // or even if I add the whole url action
'Form/field/Companies/item/edit',
);

Remove update-js workflow

Update-js workflow breaks because there's no ci.yml file

This dev-only module is piled high with tech debt e.g. cannot yarn build, however it's a waste of time fixing this since this module is just auto-generated database records and some behat only php classes

Just rely on dependabot for this one

ACs

  • Remove update-js workflow
  • Update module-standardiser to exclude update-js from module-standardiser

Need to drop database before running dev/build

I installed this module on an existing project. I was unable to to run /dev/build?flush as I was shown the error
Unknown column 'SiteTree_Versions.RelationFieldsTestPageID' in 'field list'

The solution was to drop the database, create a new database, then run /dev/build?flush

Generate more realistic tree shapes in sample data

  • FTPageMakerTask only creates 2k pages, yet our internal NFRs dictate 10k pages.
  • It only has 100 pages under one node tops, but should have a random amount between 10 and 1000 (above the default node_threshold).

GraphQL scaffolding breaks Kitchen Sink

The CWP Kitchen Sink repo's CI builds have been failing since the GraphQL Scaffolding PR was merged to this module in December, due to a DB query trying to fire during the flush prior to dev/build. Removing the GraphQL config introduced by this PR resolves the issue (as does having a populated database prior).

I haven't been able to determine a root cause, unfortunately. You can reproduce the issue consistently by installing the Kitchen Sink project and running /dev/build?flush. I can provide a full stack trace if this would be useful.

PR

silverstripe/silverstripe-graphql#204

Ability to generate [x] random page types

This will help testing the overhead associated with site tree generation, i.e. /admin/pages/treeview referenced here: silverstripe/silverstripe-cms#1977

One good approach would be to have a separate task to create randomly named page type files (within a range) and then integrate that into FTPageMakerTask to utilize either Page or any of the randomized page types (which will not vary from Page except in name). With this in mind, it may be best to ensure that the randomly generated page extend a single specific page class which can be used to then determine which (of the random set of pages) to create in this FTPageMakerTask (to ensure we don't randomly create instances of pages that are built separately for unrelated testing purposes).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.