Test fixes for UrlParser, HtmlElementCreator
All checks were successful
CI / ci-tests (push) Successful in 15s
All checks were successful
CI / ci-tests (push) Successful in 15s
Also fix old parseQueryString and alias it to getQueryStringParam
This commit is contained in:
@@ -257,6 +257,41 @@ describe("ael", () => {
|
||||
"tag": "div"
|
||||
}
|
||||
);
|
||||
let test_cel = hec.ael(
|
||||
hec.cel('div', 'block-id'),
|
||||
hec.cel('div', 'sub-id'),
|
||||
);
|
||||
expect(hec.ael(test_cel, hec.cel('div', 'new-block'), 'sub-id')).toEqual(
|
||||
{
|
||||
"content": "",
|
||||
"css": [],
|
||||
"id": "block-id",
|
||||
"name": undefined,
|
||||
"options": {},
|
||||
"sub": [
|
||||
{
|
||||
"content": "",
|
||||
"css": [],
|
||||
"id": "sub-id",
|
||||
"name": undefined,
|
||||
"options": {},
|
||||
"sub": [
|
||||
{
|
||||
"content": "",
|
||||
"css": [],
|
||||
"id": "new-block",
|
||||
"name": undefined,
|
||||
"options": {},
|
||||
"sub": [],
|
||||
"tag": "div"
|
||||
}
|
||||
],
|
||||
"tag": "div"
|
||||
}
|
||||
],
|
||||
"tag": "div"
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -640,11 +675,11 @@ describe("phfo", () => {
|
||||
"id": "block test",
|
||||
"in": hec.aelx(hec.cel('div', 'outer-id'),
|
||||
hec.aelx(hec.cel('div', 'inner-id'),
|
||||
hec.cel('input', 'some-id', '', ['abc'], {"type": "button", "onclick": "send()"})
|
||||
|
||||
hec.cel('input', 'some-id', '', ['abc'], {"type": "button", "onclick": "send()"}),
|
||||
hec.cel('div', '', 'content')
|
||||
)
|
||||
),
|
||||
"out": '<div id="outer-id"><div id="inner-id"><input id="some-id" name="some-id" class="abc" type="button" onclick="send()"></div></div>'
|
||||
"out": '<div id="outer-id"><div id="inner-id"><input id="some-id" name="some-id" class="abc" type="button" onclick="send()"><div>content</div></div></div>'
|
||||
}
|
||||
];
|
||||
for (const cel_entry of cel_list) {
|
||||
|
||||
Reference in New Issue
Block a user