github.com/MontFerret/ferret@v0.18.0/e2e/tests/dynamic/element/inner_text/set_by_css.fql (about)

     1  LET url = @lab.cdn.dynamic + "/#/lists"
     2  LET doc = DOCUMENT(url, true)
     3  
     4  LET expected = [
     5      {
     6          "artist":'MEDUZA',
     7          "track": 'Piece Of Your Heart (feat. Goodboys)'
     8      },
     9      {
    10          "artist": 'Metanoia Music',
    11          "track": 'Che Crozz x Orbis - Lift Me Up'
    12      }
    13  ]
    14  
    15  LET f = (
    16      FOR item, idx IN ELEMENTS(doc, '.track-list li')
    17      LIMIT 2
    18          LET value = expected[idx]
    19  
    20          INNER_HTML_SET(item, '.track-artist', value.artist)
    21          INNER_HTML_SET(item, '.track-name', value.track)
    22  
    23          RETURN NONE
    24  )
    25  
    26  LET list = ELEMENT(doc, '.track-list')
    27  
    28  LET actual = (
    29      FOR item IN ELEMENTS(doc, '.track-list li')
    30          LIMIT 2
    31          RETURN {
    32              artist: TRIM(INNER_TEXT(item, '.track-artist')),
    33              track: TRIM(INNER_TEXT(item, '.track-name'))
    34          }
    35  )
    36  
    37  RETURN T::EQ(actual, expected)