Update test of text with position:absolute

The following code:

```
<span class="show-for-sr">You're on page</span> 1
```

Will generate an element with `position: absolute`. When reading the
contents, it's not clear whether this element is supposed to be in the
 same paragraph or in a different one. Currently Capybara treats it as
if it were part of a different paragraph.

Since this could be the way screen readers read the text, I'm changing
the test to reflect this fact. We might change our minds in the future.
This commit is contained in:
Javi Martín
2019-11-18 16:14:47 +01:00
parent 971571b54b
commit fe20688d47

View File

@@ -72,12 +72,12 @@ describe "Legislation Proposals" do
click_link "Next"
expect(page).to have_content "You're on page 2"
expect(page).to have_content "You're on page\n2"
expect(first_page_proposals_order & legislation_proposals_order).to eq([])
click_link "Previous"
expect(page).to have_content "You're on page 1"
expect(page).to have_content "You're on page\n1"
expect(legislation_proposals_order).to eq(first_page_proposals_order)
end