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 */
|
||||
const enterAppellationAndActivateTitleDropdown = {
|
||||
name: "enterAppellationAndActivateTitleDropdown",
|
||||
match: node => node.classList.contains("db-web-dropdown-outer-container") && node.querySelector(".db-web-select-list") !== null,
|
||||
execute: node => {
|
||||
expects: "mutation",
|
||||
match: mut => matchDropdown(mut, "test-name-anrede", "open"),
|
||||
/**@param {MutationRecord} mut */
|
||||
execute: mut => {
|
||||
ensureSettingsProp("addr__appellation", v => {
|
||||
const selectList = $$(node, "ul");
|
||||
selectList.querySelector(`[data-value=${foundKeys.addr__appellation}]`).dispatchEvent(_clickEv());
|
||||
}, () => {
|
||||
node.parentElement.parentElement.parentElement.querySelector("button").dispatchEvent(_clickEv());
|
||||
});
|
||||
getDropdownList(mut).querySelector(`[data-value=${v}]`).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;
|
||||
}
|
||||
}
|
||||
|
||||
/**@type Stage */
|
||||
const enterTitleAndActivateCountryDropdown = {
|
||||
name: "enterTitle",
|
||||
/**@param {Element} node */
|
||||
match: node => node.classList.contains("db-web-dropdown-outer-container") && node.querySelector(".db-web-select-list") !== null,
|
||||
/**@param {Element} node */
|
||||
execute: node => {
|
||||
expects: "mutation",
|
||||
/**@param {MutationRecord} mut */
|
||||
match: mut => matchDropdown(mut, "test-name-titel", "open"),
|
||||
/**@param {MutationCallback} mut */
|
||||
execute: mut => {
|
||||
ensureSettingsProp("addr__title", v => {
|
||||
const selectList = $$(node, "ul");
|
||||
selectList.querySelector(`[data-value=${foundKeys.addr__title}]`).dispatchEvent(_clickEv());
|
||||
const selectList = getDropdownList(mut);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@
|
||||
- Open form on "Personal details" section
|
||||
- Open country select dropdown
|
||||
- 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="ALA">Åland Islands</option>
|
||||
|
Loading…
Reference in New Issue
Block a user