diff --git a/tests/integration/data/hello4.txt b/tests/integration/data/hello4.txt new file mode 100644 index 000000000..a31ec61e8 --- /dev/null +++ b/tests/integration/data/hello4.txt @@ -0,0 +1 @@ +Hello World 4! diff --git a/tests/integration/data/hints/link.html b/tests/integration/data/hints/link.html index ec4f9f38c..2dc96b280 100644 --- a/tests/integration/data/hints/link.html +++ b/tests/integration/data/hints/link.html @@ -3,8 +3,52 @@ A link to use hints on + - Follow me! +

+ Simple test: + Follow me! +

+ +

+ Test <a> containing formatting tags (<br>, <em>, <strong>, <i>, <b>): +
+ + link 2
+ link 2
+ link 2
+ link 2
+ link 2
+ link 2 +
+

+ +

+ Test <a> containing <span style="display: block;">: + + + link 3 + + +

+ +

+ Test <a> containing <span style="display: table;">: + + + link 4 + + +

+ +
+

Test links wrapped across multiple lines:

+
+ 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 nostrud exercitation 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. +
+
diff --git a/tests/integration/features/hints.feature b/tests/integration/features/hints.feature index d95cdf868..ad4cde293 100644 --- a/tests/integration/features/hints.feature +++ b/tests/integration/features/hints.feature @@ -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