Skip to content

Commit

Permalink
Adding atom tests for handling text-transform property
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Nov 27, 2017
1 parent 6337d90 commit 70c1bfb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions javascript/atoms/test/text_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,15 @@
});
}

function testGetVisibleTextShouldHandleTextTransformProperty() {
var text = getVisibleTextByElementId("capitalized");
assertEquals("Hello, World! Bla-bla-BLA", text);
text = getVisibleTextByElementId("lowercased");
assertEquals("hello, world! bla-bla-bla", text);
text = getVisibleTextByElementId("uppercased");
assertEquals("HELLO, WORLD! BLA-BLA-BLA", text);
}

function getVisibleTextByElementId(id) {
var e = bot.locators.findElement({id: id});
return bot.dom.getVisibleText(e);
Expand Down Expand Up @@ -388,5 +397,11 @@

<span id="zerowidth">This line has a bunch of ze&#8203;ro-width&lrm; characters&rlm; in it.</span>

<div>
<a id="capitalized" style="text-transform: capitalize">Hello, world! bla-bla-BLA</a><br/>
<a id="lowercased" style="text-transform: lowercase">Hello, world! bla-bla-BLA</a><br/>
<a id="uppercased" style="text-transform: uppercase">Hello, world! bla-bla-BLA</a><br/>
</div>

</body>
</html>

0 comments on commit 70c1bfb

Please sign in to comment.