Skip to content

Commit 376e210

Browse files
committed
fix(ldapselectfield): use of uninitialized var
1 parent 536edbf commit 376e210

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/4-functional/Glpi/Plugin/Formcreator/Field/LdapSelectField.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public function testCreateForm() {
7373
$this->client->waitForVisibility('form[data-itemtype="PluginFormcreatorQuestion"] select[name="show_empty"]');
7474
$this->client->waitForVisibility('form[data-itemtype="PluginFormcreatorQuestion"] input[name="ldap_filter"]');
7575
$this->client->waitForVisibility('form[data-itemtype="PluginFormcreatorQuestion"] select[name="ldap_attribute"]');
76+
$this->client->waitForVisibility('form[data-itemtype="PluginFormcreatorQuestion"] select[name="ldap_auth"]');
7677

7778
$authLdap = new \AuthLDAP();
7879
$ldaps = $authLdap->find([], [], 1);

tests/src/CommonBrowsing.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ public function selectInDropdown($selector, $value, $name = '') {
101101
var exists = $('$slashSelector option[value=\"$htmlValue\"]');
102102
if (exists.length < 1) {
103103
var newOption = new Option('$slashName', '$slashValue', true, true);
104+
$('$slashSelector').append(newOption)
104105
} else {
105106
$('$slashSelector').val('$slashValue');
106107
}
107-
$('$slashSelector').append(newOption).trigger('change');
108+
$('$slashSelector').trigger('change');
108109
";
109110
$this->test->client->executeScript($js);
110111
}

0 commit comments

Comments
 (0)