Skip to content

Commit de647bc

Browse files
committed
Remove exact option from selectors in specs
The :exact option only has an effect on queries using the XPath#is method, and just raises a warning otherwise. I've verified that these tests do fail if the text is not in the expected plural form. As the :exact option not having any effect on this test, we don't need it, and can remove it.
1 parent cb4e222 commit de647bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

spec/components/page_list_component/view_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
end
197197

198198
it "renders the route summary list key as a singular route" do
199-
expect(page).to have_css("dt.govuk-summary-list__key", text: /Question #{first_page.position}’s route$/, exact: true)
199+
expect(page).to have_css("dt.govuk-summary-list__key", text: /Question #{first_page.position}’s route$/)
200200
end
201201

202202
it "renders the condition description" do
@@ -221,7 +221,7 @@
221221
end
222222

223223
it "renders the route summary list key as plural routes" do
224-
expect(page).to have_css("dt.govuk-summary-list__key", text: /Question #{first_page.position}’s routes$/, exact: true)
224+
expect(page).to have_css("dt.govuk-summary-list__key", text: /Question #{first_page.position}’s routes$/)
225225
end
226226

227227
it "renders the condition description" do

0 commit comments

Comments
 (0)