Merge "Revert "Don't display tooltips on touch devices""
This commit is contained in:
@@ -430,45 +430,5 @@ limitations under the License.
|
||||
MockInteractions.tap(element.$$('.send'));
|
||||
});
|
||||
});
|
||||
|
||||
test('don"t display tooltips on touch devices', function() {
|
||||
element.labels = {
|
||||
Verified: {
|
||||
values: {
|
||||
'-1': 'Fails',
|
||||
' 0': 'No score',
|
||||
'+1': 'Verified'
|
||||
},
|
||||
default_value: 0
|
||||
},
|
||||
'Code-Review': {
|
||||
values: {
|
||||
'-2': 'Do not submit',
|
||||
'-1': 'I would prefer that you didn\'t submit this',
|
||||
' 0': 'No score',
|
||||
'+1': 'Looks good to me, but someone else must approve',
|
||||
'+2': 'Looks good to me, approved'
|
||||
},
|
||||
default_value: 0
|
||||
}
|
||||
};
|
||||
var verifiedBtn = element.$$(
|
||||
'iron-selector[data-label="Verified"] > ' +
|
||||
'gr-button[data-value="-1"]');
|
||||
|
||||
// On touch devices, tooltips should not be shown
|
||||
verifiedBtn._isTouchDevice = true;
|
||||
verifiedBtn._handleShowTooltip();
|
||||
assert.isNotOk(verifiedBtn._tooltip);
|
||||
verifiedBtn._handleHideTooltip();
|
||||
assert.isNotOk(verifiedBtn._tooltip);
|
||||
|
||||
// On other devices, tooltips should be shown.
|
||||
verifiedBtn._isTouchDevice = false;
|
||||
verifiedBtn._handleShowTooltip();
|
||||
assert.isOk(verifiedBtn._tooltip);
|
||||
verifiedBtn._handleHideTooltip();
|
||||
assert.isNotOk(verifiedBtn._tooltip);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user