make all the dropdowns & the country select work again
This commit is contained in:
parent
b21aa010c2
commit
b9958389b8
@ -293,33 +293,38 @@ const activateAppellationDropdown = {
|
|||||||
/**@type Stage */
|
/**@type Stage */
|
||||||
const enterAppellationAndActivateTitleDropdown = {
|
const enterAppellationAndActivateTitleDropdown = {
|
||||||
name: "enterAppellationAndActivateTitleDropdown",
|
name: "enterAppellationAndActivateTitleDropdown",
|
||||||
match: node => node.classList.contains("db-web-dropdown-outer-container") && node.querySelector(".db-web-select-list") !== null,
|
expects: "mutation",
|
||||||
execute: node => {
|
match: mut => matchDropdown(mut, "test-name-anrede", "open"),
|
||||||
|
/**@param {MutationRecord} mut */
|
||||||
|
execute: mut => {
|
||||||
ensureSettingsProp("addr__appellation", v => {
|
ensureSettingsProp("addr__appellation", v => {
|
||||||
const selectList = $$(node, "ul");
|
getDropdownList(mut).querySelector(`[data-value=${v}]`).dispatchEvent(_clickEv());
|
||||||
selectList.querySelector(`[data-value=${foundKeys.addr__appellation}]`).dispatchEvent(_clickEv());
|
|
||||||
}, () => {
|
|
||||||
node.parentElement.parentElement.parentElement.querySelector("button").dispatchEvent(_clickEv());
|
|
||||||
});
|
|
||||||
$('.test-name-titel.db-web-select button').dispatchEvent(_clickEv());
|
$('.test-name-titel.db-web-select button').dispatchEvent(_clickEv());
|
||||||
|
}, () => {
|
||||||
|
getDropdownCloseButton(mut).dispatchEvent(_clickEv());
|
||||||
|
$('.test-name-titel.db-web-select button').dispatchEvent(_clickEv());
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**@type Stage */
|
||||||
const enterTitleAndActivateCountryDropdown = {
|
const enterTitleAndActivateCountryDropdown = {
|
||||||
name: "enterTitle",
|
name: "enterTitle",
|
||||||
/**@param {Element} node */
|
expects: "mutation",
|
||||||
match: node => node.classList.contains("db-web-dropdown-outer-container") && node.querySelector(".db-web-select-list") !== null,
|
/**@param {MutationRecord} mut */
|
||||||
/**@param {Element} node */
|
match: mut => matchDropdown(mut, "test-name-titel", "open"),
|
||||||
execute: node => {
|
/**@param {MutationCallback} mut */
|
||||||
|
execute: mut => {
|
||||||
ensureSettingsProp("addr__title", v => {
|
ensureSettingsProp("addr__title", v => {
|
||||||
const selectList = $$(node, "ul");
|
const selectList = getDropdownList(mut);
|
||||||
selectList.querySelector(`[data-value=${foundKeys.addr__title}]`).dispatchEvent(_clickEv());
|
selectList.querySelector(`[data-value=${v}]`).dispatchEvent(_clickEv());
|
||||||
|
$(".test-adresse-land.db-web-select button").dispatchEvent(_clickEv());
|
||||||
}, () => {
|
}, () => {
|
||||||
node.parentElement.parentElement.parentElement.querySelector("button").dispatchEvent(_clickEv());
|
getDropdownCloseButton(mut).dispatchEvent(_clickEv());
|
||||||
|
$(".test-adresse-land.db-web-select button").dispatchEvent(_clickEv());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
document.querySelector(".test-adresse-land.db-web-select button").dispatchEvent(_clickEv());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
- Open form on "Personal details" section
|
- Open form on "Personal details" section
|
||||||
- Open country select dropdown
|
- Open country select dropdown
|
||||||
- Execute:
|
- Execute:
|
||||||
d="";document.querySelectorAll(".test-adresse-land ul li").forEach(e=>d=d.concat('<option value="',e.dataset.value,'">',e.querySelector("span.db-web-select-list-item__value").innerHTML,'</option>\n'));
|
d="";document.querySelectorAll(".test-adresse-land ul li").forEach(e=>d=d.concat('<option value="',e.dataset.value,'">',e.textContent,'</option>\n'));
|
||||||
-->
|
-->
|
||||||
<option value="AFG">Afghanistan</option>
|
<option value="AFG">Afghanistan</option>
|
||||||
<option value="ALA">Åland Islands</option>
|
<option value="ALA">Åland Islands</option>
|
||||||
|
Loading…
Reference in New Issue
Block a user