silverstripe / silverstripe-frameworktest Goto Github PK
View Code? Open in Web Editor NEWSilverstripe Framework Test
License: BSD 3-Clause "New" or "Revised" License
Silverstripe Framework Test
License: BSD 3-Clause "New" or "Revised" License
Hook into the existing "generate pages" command?
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");
}
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
TODO:
Hardcode to the following: (don't bother making configurable)
FTFileMakerTask.php
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
TODO:
TODO:
Also as a part of work, fix this issue at the same time #64
Not a complete list:
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();
}
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',
);
Behat tests can use TestOnly
extensions. For an example of this, see silverstripe/silverstripe-elemental#930
There is likely some content in here that is intended for use in behat tests which can be implemented via Extension
classes. We should evaluate to see if that's the case and migrate any such code into the relevant modules.
HasOnePageWithSearch and ManyManyPages (with search) fields on the RelationFields page no longer search through the items when you start typing the name or even if you have finished adding a name
When frameworktest is installed and you're doing a fresh dev build, it will fail because it will try to run a query against a _Versions table that will not have been created yet.
[Emergency] Uncaught LogicException: The current member does not have permission to publish this ChangeSet.
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
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
Should generate pages, files, and based on the models available in the codebase, also blocks and other models.
FTPageMakerTask
only creates 2k pages, yet our internal NFRs dictate 10k pages.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.
Apparently, some things are broken and its required for testing UI. Needs review...
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).
The SilverStripe installer now requires this module in Travis builds: silverstripe/silverstripe-installer#283.
The master branch must be updated to support SilverStripe 5. We cannot merge up the installer branches until this is done.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.