Tests and docs for button.setState()