From aff102325a0ede8c01303a941dae3f6b5cf85d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 11 Apr 2021 20:20:42 +0200 Subject: [PATCH] Fix expectations for already existing content We were checking content which was already present/absent before making a certain request, so the expectations were not checking the request had already finished. Our intention here is to check the page contents after the request has finished. --- spec/system/admin/site_customization/information_texts_spec.rb | 3 ++- spec/system/admin/translatable_spec.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/site_customization/information_texts_spec.rb b/spec/system/admin/site_customization/information_texts_spec.rb index 5ee3d0e5f..ddd27f4e6 100644 --- a/spec/system/admin/site_customization/information_texts_spec.rb +++ b/spec/system/admin/site_customization/information_texts_spec.rb @@ -12,7 +12,8 @@ describe "Admin custom information texts", :admin do expect(page).to have_content "Help with participatory budgets" within("#information-texts-tabs") { click_link "Debates" } - expect(page).to have_content "Help about debates" + + expect(page).to have_content "Edit debate" within("#information-texts-tabs") { click_link "Community" } expect(page).to have_content "Access the community" diff --git a/spec/system/admin/translatable_spec.rb b/spec/system/admin/translatable_spec.rb index f83acf7ab..491efcf5d 100644 --- a/spec/system/admin/translatable_spec.rb +++ b/spec/system/admin/translatable_spec.rb @@ -321,7 +321,7 @@ describe "Admin edit translatable records", :admin do click_button "Save changes" - expect(page).not_to have_css "#error_explanation" + expect(page).to have_content "Process updated successfully" visit edit_admin_legislation_process_path(translatable)