Issue #3370222 by Lendude, solideogloria: Grouped filters with a value of zero do not show when editing the filter
parent
be366aec48
commit
08bde872c0
|
@ -1166,7 +1166,7 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($this->options['group_info']['group_items'][$item_id]['value'][$child])) {
|
||||
if (isset($this->options['group_info']['group_items'][$item_id]['value'][$child])) {
|
||||
$row['value'][$child]['#default_value'] = $this->options['group_info']['group_items'][$item_id]['value'][$child];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,6 +111,23 @@ class GroupedExposedFilterTest extends WebDriverTestBase {
|
|||
$this->assertNotEmpty($weight->find('named', ['option', $value]));
|
||||
}
|
||||
$this->assertEmpty($weight->find('named', ['option', 5]));
|
||||
|
||||
// Set the date value to a zero value and make sure it's stored.
|
||||
$between_from = $page->findField('options[group_info][group_items][1][value][min]');
|
||||
$between_from->setValue('0');
|
||||
$apply_button = $page->find('css', '.views-ui-dialog button.button--primary');
|
||||
$this->assertNotEmpty($apply_button);
|
||||
$apply_button->press();
|
||||
$web_assert->assertWaitOnAjaxRequest();
|
||||
|
||||
// Open the dialog for the grouped filter.
|
||||
$page->clickLink('Content: Authored on (grouped)');
|
||||
$web_assert->assertWaitOnAjaxRequest();
|
||||
|
||||
// Test that the 'min' field is shown and that it contains the right value.
|
||||
$between_from = $page->findField('options[group_info][group_items][1][value][min]');
|
||||
$this->assertNotEmpty($between_from->isVisible());
|
||||
$this->assertEquals('0', $between_from->getValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue