From 5f5ef3ec5c228c0fbf297830c465046a33004c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 2 Apr 2021 22:05:39 +0200 Subject: [PATCH] Check request finishes in remote translations spec That way we make sure the request is finished before the test finishes. We were getting a failure in GitHub Actions because an unrelated test executed after this one had its locale set to Spanish (just for one test, though), and one possible explanation could be that a previous request which changed I18n.locale was still being executed. --- spec/shared/system/remotely_translatable.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/shared/system/remotely_translatable.rb b/spec/shared/system/remotely_translatable.rb index 0b277b22f..904143116 100644 --- a/spec/shared/system/remotely_translatable.rb +++ b/spec/shared/system/remotely_translatable.rb @@ -205,6 +205,7 @@ shared_examples "remotely_translatable" do |factory_name, path_name, path_argume click_button "Traducir página" + expect(page).not_to have_button "Traducir página" expect(RemoteTranslation.count).to eq(0) expect(resource.translations.count).to eq(2) end