The outcome is set to test the strength of the separatist movement and the popularity of Prime Minister Pedro Sánchez.