test(button): add block button icon e2e

This commit is contained in:
Adam Bradley
2015-10-08 21:48:04 -05:00
parent 18519d1576
commit f18d114dbe
2 changed files with 10 additions and 5 deletions

View File

@ -20,11 +20,7 @@ export class Button {
let element = elementRef.nativeElement;
if (config.get('hoverCSS') === false) {
element.classList.add('disable-hover');
}
if (type) {
renderer.setElementAttribute(elementRef, type, '');
renderer.setElementClass(elementRef, 'disable-hover', true);
}
if (element.hasAttribute('ion-item')) {
@ -32,6 +28,10 @@ export class Button {
return;
}
if (type) {
renderer.setElementAttribute(elementRef, type, '');
}
// figure out if and where the icon lives in the button
let childNodes = element.childNodes;
let childNode;

View File

@ -10,6 +10,11 @@
<button block>button[block]</button>
</p>
<p>
<a button block href="#"><icon help-circle></icon> a[button][block] icon</a>
<button block><icon help-circle></icon> button[block] icon</button>
</p>
<p>
<a button block outline secondary href="#">a[button][block][outline][secondary]</a>
<button block outline secondary>button[block][outline][secondary]</button>