Tests: Added test which check whether undo and redo buttons are in proper state, after undo command.
Fixed issue with wrong UI buttons state.