The cap with the sensor for the brakefluid reservoir is a usual problem at British Cars.
It‘s also fitted at old Minis. For a test undo one of both wires. The light must switch off. If you put the wires together ist must switch on.
You can buy a new cap cheap at Mini Spares.
Greets and Good luck
René