hints: add tests for links known to cause troubles
This commit is contained in:
parent
a546933516
commit
748ec043fb
1
tests/integration/data/hello4.txt
Normal file
1
tests/integration/data/hello4.txt
Normal file
@ -0,0 +1 @@
|
||||
Hello World 4!
|
@ -3,8 +3,52 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>A link to use hints on</title>
|
||||
<style>
|
||||
body > p {border: 1px solid silver;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="/data/hello.txt">Follow me!</a>
|
||||
<p>
|
||||
Simple test:
|
||||
<a href="/data/hello.txt">Follow me!</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Test <code><a></code> containing formatting tags (<code><br></code>, <code><em></code>, <code><strong></code>, <code><i></code>, <code><b></code>):
|
||||
<br>
|
||||
<a href="/data/hello2.txt">
|
||||
link 2<br>
|
||||
<em>link 2</em><br>
|
||||
<strong>link 2</strong><br>
|
||||
<i>link 2</i><br>
|
||||
<b>link 2</b><br>
|
||||
link 2
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Test <code><a></code> containing <code><span style="display: block;"></code>:
|
||||
<a href="/data/hello3.txt">
|
||||
<span style="display: block;">
|
||||
link 3
|
||||
</span>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Test <code><a></code> containing <code><span style="display: table;"></code>:
|
||||
<a href="/data/hello4.txt">
|
||||
<span style="display: table;">
|
||||
link 4
|
||||
</span>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div style="border: 1px solid silver;">
|
||||
<p>Test links wrapped across multiple lines:</p>
|
||||
<div style="width: 20em;">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis <a href="/data/hello.txt">nostrud exercitation</a> ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,3 +18,51 @@ Feature: Using hints
|
||||
And I run :hint links normal
|
||||
And I run :follow-hint xyz
|
||||
Then the error "No hint xyz!" should be shown
|
||||
|
||||
### Hinting problematic links
|
||||
|
||||
Scenario: Following a hint (link containing formatting tags)
|
||||
When I open data/hints/link.html
|
||||
# bypass Qt cache
|
||||
And I run :reload --force
|
||||
And I run :hint links normal
|
||||
And I run :follow-hint s
|
||||
And I wait until data/hello2.txt is loaded
|
||||
Then the requests should be:
|
||||
data/hints/link.html
|
||||
data/hello2.txt
|
||||
|
||||
Scenario: Following a hint (link containing tag with display:block style)
|
||||
When I open data/hints/link.html
|
||||
# bypass Qt cache
|
||||
And I run :reload --force
|
||||
And I run :hint links normal
|
||||
And I run :follow-hint d
|
||||
And I wait until data/hello3.txt is loaded
|
||||
Then the requests should be:
|
||||
data/hints/link.html
|
||||
data/hello3.txt
|
||||
|
||||
Scenario: Following a hint (link containing tag with display:table style)
|
||||
When I open data/hints/link.html
|
||||
# bypass Qt cache
|
||||
And I run :reload --force
|
||||
And I run :hint links normal
|
||||
And I run :follow-hint f
|
||||
And I wait until data/hello4.txt is loaded
|
||||
Then the requests should be:
|
||||
data/hints/link.html
|
||||
data/hello4.txt
|
||||
|
||||
Scenario: Following a link wrapped across multiple lines.
|
||||
When I open data/hints/link.html
|
||||
# bypass Qt cache
|
||||
And I run :reload --force
|
||||
And I run :hint links normal
|
||||
And I run :follow-hint g
|
||||
And I wait until data/hello.txt is loaded
|
||||
# bypass Qt cache
|
||||
And I run :reload --force
|
||||
Then the requests should be:
|
||||
data/hints/link.html
|
||||
data/hello.txt
|
||||
|
Loading…
Reference in New Issue
Block a user