forked from MapComplete/MapComplete
Add fakedom to test UI code, replace all 'innerText' with 'textContent' as it is not compatible with fakedom
This commit is contained in:
parent
b0b674b2fb
commit
0f66d7f8cc
17 changed files with 281 additions and 20 deletions
2
Utils.ts
2
Utils.ts
|
@ -310,7 +310,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
|
||||
if (v.InnerConstructElement !== undefined) {
|
||||
console.warn("SubstituteKeys received a BaseUIElement to substitute in - this is probably a bug and will be downcast to a string\nThe key is", key, "\nThe value is", v)
|
||||
v = (<HTMLElement>v.InnerConstructElement())?.innerText
|
||||
v = (<HTMLElement>v.InnerConstructElement())?.textContent
|
||||
}
|
||||
|
||||
if (typeof v !== "string") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue