From f18d114dbe8e7796a65b5d12be57fc02fb26c057 Mon Sep 17 00:00:00 2001
From: Adam Bradley
Date: Thu, 8 Oct 2015 21:48:04 -0500
Subject: [PATCH] test(button): add block button icon e2e
---
ionic/components/button/button.ts | 10 +++++-----
ionic/components/button/test/block/main.html | 5 +++++
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ionic/components/button/button.ts b/ionic/components/button/button.ts
index 346c6f0546..9a56fff577 100644
--- a/ionic/components/button/button.ts
+++ b/ionic/components/button/button.ts
@@ -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;
diff --git a/ionic/components/button/test/block/main.html b/ionic/components/button/test/block/main.html
index e440bc75de..b99513a59d 100644
--- a/ionic/components/button/test/block/main.html
+++ b/ionic/components/button/test/block/main.html
@@ -10,6 +10,11 @@
+
+ a[button][block] icon
+
+
+
a[button][block][outline][secondary]