Add some more tests.
This commit is contained in:
parent
7edfdaa271
commit
2775f2b2ee
5
tests/javascript/position_caret/invisible.html
Normal file
5
tests/javascript/position_caret/invisible.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<p style="{{style}}">This line is hidden.</p>
|
||||
<p>MARKER this should be the paragraph the caret is on.</p>
|
||||
{% endblock %}
|
9
tests/javascript/position_caret/scrolled_down_img.html
Normal file
9
tests/javascript/position_caret/scrolled_down_img.html
Normal file
@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. </p>
|
||||
|
||||
<a id="anchor" /><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wUMEQsSoCNVVgAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAFklEQVQoz2P8z0AaYGIY1TCqYdhqAABALgEfsZDCTQAAAABJRU5ErkJggg==" />
|
||||
|
||||
<p>MARKER this should be the paragraph the caret is on.</p>
|
||||
<p>Some more text</p>
|
||||
{% endblock %}
|
@ -83,3 +83,12 @@ def test_invisible(caret_tester, style):
|
||||
"""Test with hidden text elements."""
|
||||
caret_tester.js.load('position_caret/invisible.html', style=style)
|
||||
caret_tester.check()
|
||||
|
||||
|
||||
def test_scrolled_down_img(caret_tester):
|
||||
"""Test with an image at the top with the viewport scrolled down."""
|
||||
caret_tester.js.load('position_caret/scrolled_down_img.html')
|
||||
caret_tester.js.scroll_anchor('anchor')
|
||||
caret_tester.check_scrolled()
|
||||
caret_tester.check()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user