mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-14 11:23:02 +02:00
90427cd537
* Added remote type reference resolver * Added support of XPath query selector * Added CDP e2e testss covering XPath integration * Added additional CDP e2e tests covering XPath integration * Added type check to QuerySelector casting function * Fixed XPath e2e tests * Fixed vuln issue * Added support of XPath selectors to http driver * Added e2e tests for XPAth
25 lines
745 B
Plaintext
25 lines
745 B
Plaintext
LET url = @lab.cdn.dynamic + "/#/lists"
|
|
LET doc = DOCUMENT(url, true)
|
|
|
|
LET expected = [
|
|
{"details":'<h5 class="track-artist">MEDUZA</h5><small class="track-name">Piece Of Your Heart (feat. Goodboys)</small>'},
|
|
{"details":'<h5 class="track-artist">Metanoia Music</h5><small class="track-name">Che Crozz x Orbis - Lift Me Up</small>'}
|
|
]
|
|
|
|
LET html = (
|
|
FOR t IN expected
|
|
RETURN '<li><div class="track-details">' + t.details + '</div></li>'
|
|
)
|
|
|
|
INNER_HTML_SET(doc, '.track-list', CONCAT_SEPARATOR('\n', html))
|
|
|
|
LET list = ELEMENT(doc, '.track-list')
|
|
|
|
LET actual = (
|
|
FOR item IN ELEMENTS(doc, '.track-list li')
|
|
RETURN {
|
|
details: INNER_HTML(item, '.track-details'),
|
|
}
|
|
)
|
|
|
|
RETURN T::EQ(actual, expected) |