1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-14 11:23:02 +02:00
ferret/e2e/tests/dynamic/element/inner_html/get_by_css.fql
Tim Voronov 90427cd537
Feature/new selector type (#657)
* 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
2021-09-16 21:40:20 -04:00

34 lines
2.5 KiB
Plaintext

LET url = @lab.cdn.dynamic + "/#/lists"
LET doc = DOCUMENT(url, true)
LET expected = [
{"details":'<h5 class="track-artist">Lil Tecca</h5><small class="track-name">Ransom</small>'},
{"details":'<h5 class="track-artist">NLE Choppa</h5><small class="track-name">Shotta Flow (Feat. Blueface) [Remix]</small>'},
{"details":'<h5 class="track-artist">Baby Jesus (DaBaby)</h5><small class="track-name">Suge</small>'},
{"details":'<h5 class="track-artist">NLE Choppa</h5><small class="track-name">Shotta Flow 3</small>'},
{"details":'<h5 class="track-artist">Lil Tecca </h5><small class="track-name">Lil Tecca - Did It Again</small>'},
{"details":'<h5 class="track-artist">NLE Choppa</h5><small class="track-name">Shotta Flow</small>'},
{"details":'<h5 class="track-artist">Ynw Melly</h5><small class="track-name">Dangerously In Love (772 Love Pt. 2)</small>'},
{"details":'<h5 class="track-artist">POLO G</h5><small class="track-name">Polo G feat. Lil TJay - Pop Out</small>'},
{"details":`<h5 class="track-artist">MUSTARD</h5><small class="track-name">Ballin' (feat. Roddy Ricch)</small>`},
{"details":'<h5 class="track-artist">Lil Nas X</h5><small class="track-name">Panini</small>'},
{"details":'<h5 class="track-artist">Juice WRLD</h5><small class="track-name">Juice Wrld - RUN</small>'},
{"details":'<h5 class="track-artist">Shordie Shordie</h5><small class="track-name">Betchua (Bitchuary)</small>'},
{"details":'<h5 class="track-artist">Post Malone</h5><small class="track-name">Goodbyes (feat. Young Thug)</small>'},
{"details":'<h5 class="track-artist">LIL UZI VERT</h5><small class="track-name">Sanguine Paradise</small>'},
{"details":'<h5 class="track-artist">Calboy</h5><small class="track-name">Envy Me</small>'},
{"details":'<h5 class="track-artist">Ambjaay</h5><small class="track-name">Uno</small>'},
{"details":'<h5 class="track-artist">Lil Tecca</h5><small class="track-name">Lil Tecca - Bossanova</small>'},
{"details":'<h5 class="track-artist">Lil Baby</h5><small class="track-name">Baby</small>'},
{"details":'<h5 class="track-artist">Lil Tjay</h5><small class="track-name">Lil Tjay - Brothers (Prod by JDONTHATRACK &amp; Protegebeatz)</small>'},
{"details":'<h5 class="track-artist">YK Osiris</h5><small class="track-name">Worth It</small>'}
]
LET actual = (
FOR item IN ELEMENTS(doc, '.track-list li')
RETURN {
details: INNER_HTML(item, '.track-details'),
}
)
RETURN T::EQ(actual, expected)