Sha256: dfc61182a410c2a341f65fbfcbc652393f83036b91cbdd071db7b96e70d74d0f

Contents?: true

Size: 1020 Bytes

Versions: 4

Compression:

Stored size: 1020 Bytes

Contents

module("elementmembers");

// We ought to have test coverage for all members of all DOM objects, but
// until then, add test cases here for members as they are created

test("attributes common to all HTML elements", function() {
    expect(4);

    // tests for .innerText
    var mtch = document.getElementById('dl').innerText.match(
        /^See this blog entry for more information.\s+Here are/);
    try{ ok(mtch && mtch.length > 0,
        "dl.innerText returns the correct content");
    }catch(e){print(e);}

    mtch = document.getElementById('sndp').innerText.match(/^Everything insid/);
    try{ ok(mtch && mtch.length > 0,
        "p.innerText returns the correct content");
    }catch(e){print(e);}

    try{ ok(document.getElementById('sndp').innerText = "test text" || true,
        "p.innerText= operates without exception");
    }catch(e){print(e);}

    try{ ok(document.getElementById('sndp').innerText == "test text",
        "p.innerText= changes content of element");
    }catch(e){print(e);}
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
smparkes-envjs-0.0.6 test/unit/elementmembers.js
smparkes-envjs-0.0.5 test/unit/elementmembers.js
smparkes-envjs-0.0.4 test/unit/elementmembers.js
smparkes-envjs-0.0.3 test/unit/elementmembers.js