Fix wrong expectation in information texts test

The expectation that there isn't a link with the text "Español" wasn't
updated in commit f7417d647, when the tests were updated after switching
the user interface from a list of links to a select field.

We're also adding an additional expectation after the `visit` to make
sure the request has finished before selecting English from the selector
(which probably doesn't make sense because it's the only option, but
changing it is out of the scope of this commit).
This commit is contained in:
Javi Martín
2025-03-12 14:20:54 +01:00
parent 2c05d7fbe7
commit 5206708c01

View File

@@ -115,9 +115,14 @@ describe "Admin custom information texts", :admin do
click_link "Remove language"
click_button "Save"
expect(page).not_to have_link "Español"
expect(page).to have_content "Translation updated successfully"
expect(page).to have_select "Current language", options: ["English"]
expect(page).not_to have_field "debates.index.featured_debates"
visit admin_site_customization_information_texts_path(tab: "debates")
expect(page).to have_field "debates.index.featured_debates"
select "English", from: "Current language"
expect(page).to have_content "Start a new debate"