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.
This commit is contained in:
@@ -205,6 +205,7 @@ shared_examples "remotely_translatable" do |factory_name, path_name, path_argume
|
|||||||
|
|
||||||
click_button "Traducir página"
|
click_button "Traducir página"
|
||||||
|
|
||||||
|
expect(page).not_to have_button "Traducir página"
|
||||||
expect(RemoteTranslation.count).to eq(0)
|
expect(RemoteTranslation.count).to eq(0)
|
||||||
expect(resource.translations.count).to eq(2)
|
expect(resource.translations.count).to eq(2)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user