Feature: Pagination Fix Relative Links
Scenario: By default, existing relative URLs on the page should be fixed for paginated pages
Given I have a "source/index.html" file with the content:
"""
"""
When I run Pagebreak
Then I should see a selector 'link' in "output/index.html" with the attributes:
| href | styles.css |
| rel | stylesheet |
Then I should see a selector 'a' in "output/index.html" with the attributes:
| href | contact |
| innerText | Contact |
Then I should see a selector 'link' in "output/2/index.html" with the attributes:
| href | ../styles.css |
| rel | stylesheet |
Then I should see a selector 'a' in "output/2/index.html" with the attributes:
| href | ../contact |
| innerText | Contact |
Scenario: Absolute URLs should remain unchanged in paginated pages
Given I have a "source/index.html" file with the content:
"""
ContactContract
Item 1
Item 2
"""
When I run Pagebreak
Then I should see a selector 'link' in "output/index.html" with the attributes:
| href | /styles.css |
| rel | stylesheet |
Then I should see a selector 'a' in "output/index.html" with the attributes:
| href | https://placekitten.com/1142/1600 |
| innerText | Contact |
Then I should see a selector 'a' in "output/index.html" with the attributes:
| href | http://placekitten.com/1142/1600 |
| innerText | Contract |
Then I should see a selector 'link' in "output/2/index.html" with the attributes:
| href | /styles.css |
| rel | stylesheet |
Then I should see a selector 'a' in "output/2/index.html" with the attributes:
| href | https://placekitten.com/1142/1600 |
| innerText | Contact |
Then I should see a selector 'a' in "output/2/index.html" with the attributes:
| href | http://placekitten.com/1142/1600 |
| innerText | Contract |