From fe20688d47f1d28bcdba1032493f8a56acefd156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 18 Nov 2019 16:14:47 +0100 Subject: [PATCH] Update test of text with `position:absolute` The following code: ``` You're on page 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. --- spec/features/legislation/proposals_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/legislation/proposals_spec.rb b/spec/features/legislation/proposals_spec.rb index f1e27dedf..130d41d91 100644 --- a/spec/features/legislation/proposals_spec.rb +++ b/spec/features/legislation/proposals_spec.rb @@ -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