Commit 22c1362c authored by alexpott's avatar alexpott
Browse files

Issue #2337897 by damiankloip: Fixed ManyToOne filter should not display...

Issue #2337897 by damiankloip: Fixed ManyToOne filter should not display ManyToOneHelper valueForm when exposed.
parent f070288c
......@@ -55,6 +55,14 @@ function testUserAdmin() {
$link = l(t('Edit'), "user/" . $user_a->id() . "/edit", array('query' => array('destination' => 'admin/people')));
$this->assertRaw($link, 'Found user A edit link on admin users page');
// Test exposed filter elements.
foreach (array('user', 'role', 'permission', 'status') as $field) {
$this->assertField("edit-$field", "$field exposed filter found.");
}
// Make sure the reduce duplicates element from the ManyToOneHelper is not
// displayed.
$this->assertNoField('edit-reduce-duplicates', 'Reduce duplicates form element not found in exposed filters.');
// Filter the users by name/email.
$this->drupalGet('admin/people', array('query' => array('user' => $user_a->getUsername())));
$result = $this->xpath('//table/tbody/tr');
......
......@@ -111,7 +111,7 @@ function operators() {
protected function valueForm(&$form, FormStateInterface $form_state) {
parent::valueForm($form, $form_state);
if ($form_state->get('exposed')) {
if (!$form_state->get('exposed')) {
$this->helper->buildOptionsForm($form, $form_state);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment