mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Remove unexpected message
This commit is contained in:
parent
b37178e831
commit
babc811381
@ -362,7 +362,7 @@ class GridFieldFilterHeader extends AbstractGridFieldComponent implements GridFi
|
||||
}
|
||||
|
||||
foreach ($searchFields->getIterator() as $field) {
|
||||
$field->addExtraClass('stacked');
|
||||
$field->addExtraClass('stacked no-change-track');
|
||||
}
|
||||
|
||||
$name = $gridField->Title ?: singleton($gridField->getModelClass())->i18n_plural_name();
|
||||
|
@ -139,4 +139,21 @@ class GridFieldFilterHeaderTest extends SapphireTest
|
||||
'GridFieldFilterHeader::handleAction resets the gridstate filter when the user resets the search.'
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetSearchForm()
|
||||
{
|
||||
$searchForm = $this->component->getSearchForm($this->gridField);
|
||||
|
||||
$this->assertTrue($searchForm instanceof Form);
|
||||
$this->assertEquals('Search__Name', $searchForm->fields[0]->Name);
|
||||
$this->assertEquals('Search__City', $searchForm->fields[1]->Name);
|
||||
$this->assertEquals('Search__Cheerleader__Hat__Colour', $searchForm->fields[2]->Name);
|
||||
$this->assertEquals('TeamsSearchForm', $searchForm->Name);
|
||||
$this->assertEquals('cms-search-form', $searchForm->extraClasses['cms-search-form']);
|
||||
|
||||
foreach ($searchForm->fields as $field) {
|
||||
$this->assertEquals('stacked', $field->extraClasses['stacked']);
|
||||
$this->assertEquals('no-change-track', $field->extraClasses['no-change-track']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user