-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add testing radio button with listener #6
base: master
Are you sure you want to change the base?
Conversation
Two mockups modified for testing mouse clicking with metakeys pressed.
radioButtons[5].setText("Choice 5"); | ||
|
||
radioButtons[5].addSelectionListener(new SelectionAdapter() { | ||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
private void selectionChange() { | ||
boolean buttonSelected = radioButtons[5].getSelection(); | ||
radioButtons[1].setEnabled(!buttonSelected); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unintended side-effect. We are testing, that a button received deselection event, if listener itself produces more events, this may lead to false negatives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
private void selectionChange() { | ||
boolean buttonSelected = radioButtons[5].getSelection(); | ||
text.setText(buttonSelected ? "selected" : ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A would recommend not use empty string here. "unselected" would be better visible on screenshots and easier to assert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -6,8 +6,8 @@ Element-Type: testcase | |||
Element-Version: 3.0 | |||
External-Reference: | |||
Id: _UPfZgJa6EeK184kZHmPTQQ | |||
Runtime-Version: 1.5.6.qualifier | |||
Save-Time: 4/1/15 12:04 PM | |||
Runtime-Version: 2.5.1.202004201035 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the test for text change when a button is deselected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
No description provided.