City elections are a crucial test of parties’ strength and appetite for alliances ahead of 2027 presidential contest