Skip to content

Commit

Permalink
Should use HTML comments in test placeholder text
Browse files Browse the repository at this point in the history
It actually doesn't matter because nothing we are testing will even
take the comments into consideration, but for general correctness, we
should probably be using proper comments as not to confuse others
looking at the tests in the future.
  • Loading branch information
facelessuser committed Jan 3, 2022
1 parent 0baf35b commit 094d265
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_level4/test_placeholder_shown.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ def test_placeholder_shown(self):
"""Test placeholder shown."""

markup = """
/* These have a placeholder. */
<!-- These have a placeholder. -->
<input id="0" placeholder="This is some text">
<textarea id="1" placeholder="This is some text"></textarea>
/* These do not have a placeholder. */
<!-- These do not have a placeholder. -->
<input id="2" placeholder="">
<input id="3">
/* All types that should register has having a placeholder. */
<!-- All types that should register has having a placeholder. -->
<input id="4" type="email" placeholder="This is some text">
<input id="5" type="number" placeholder="This is some text">
<input id="6" type="password" placeholder="This is some text">
Expand All @@ -28,7 +28,7 @@ def test_placeholder_shown(self):
<input id="11" type="" placeholder="This is some text">
<input id="12" type placeholder="This is some text">
/* Types that should not register has having a placeholder. */
<!-- Types that should not register has having a placeholder. -->
<input id="13" type="button" placeholder="This is some text">
<input id="14" type="checkbox" placeholder="This is some text">
<input id="15" type="color" placeholder="This is some text">
Expand All @@ -45,20 +45,20 @@ def test_placeholder_shown(self):
<input id="26" type="time" placeholder="This is some text">
<input id="27" type="week" placeholder="This is some text">
/* Value will not override this instance as value is empty. */
<!-- Value will not override this instance as value is empty. -->
<input id="28" type placeholder="This is some text" value="">
/* Value will override this input */
<!-- Value will override this input -->
<input id="29" type placeholder="This is some text" value="Actual value">
/* Text area content overrides the placeholder
<!-- Text area content overrides the placehold-->
<textarea id="30" placeholder="This is some text">Value</textarea>
<textarea id="31" placeholder="This is some text">
</textarea>
/* Text area is still considered empty with a single new line (does not include carriage return). */
<!-- Text area is still considered empty with a single new line (does not include carriage return). -->
<textarea id="32" placeholder="This is some text">
</textarea>
"""
Expand Down

0 comments on commit 094d265

Please sign in to comment.