From 8abc52997fde031be4f8e58a9a77b437a7bc5688 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 26 Apr 2016 19:21:04 -0400 Subject: [PATCH] test(button): add e2e test for dynamic button styles and colors references #6202 --- ionic/components/button/test/dynamic/e2e.ts | 4 ++ ionic/components/button/test/dynamic/index.ts | 49 +++++++++++++++++++ .../components/button/test/dynamic/main.html | 19 +++++++ 3 files changed, 72 insertions(+) create mode 100644 ionic/components/button/test/dynamic/e2e.ts create mode 100644 ionic/components/button/test/dynamic/index.ts create mode 100644 ionic/components/button/test/dynamic/main.html diff --git a/ionic/components/button/test/dynamic/e2e.ts b/ionic/components/button/test/dynamic/e2e.ts new file mode 100644 index 00000000000..47146173b6e --- /dev/null +++ b/ionic/components/button/test/dynamic/e2e.ts @@ -0,0 +1,4 @@ + +it('should unify buttons', function() { + element(by.css('.e2eButtonDynamicUnify')).click(); +}); diff --git a/ionic/components/button/test/dynamic/index.ts b/ionic/components/button/test/dynamic/index.ts new file mode 100644 index 00000000000..48d055eb669 --- /dev/null +++ b/ionic/components/button/test/dynamic/index.ts @@ -0,0 +1,49 @@ +import {App, IonicApp} from 'ionic-angular'; + + +@App({ + templateUrl: 'main.html' +}) +class E2EApp { + isDestructive: boolean; + isSecondary: boolean; + isCustom: boolean; + isOutline: boolean; + isClear: boolean; + isClicked: boolean; + myColor1: string; + myColor2: string; + multiColor: Array; + + constructor() { + this.reset(); + } + + unify() { + this.isDestructive = false; + this.isSecondary = false; + this.isCustom = false; + this.isOutline = false; + this.isClear = false; + this.isClicked = false; + this.myColor1 = 'primary'; + this.myColor2 = 'primary'; + this.multiColor = ['primary']; + } + + reset() { + this.isDestructive = true; + this.isSecondary = true; + this.isCustom = true; + this.isOutline = true; + this.isClear = true; + this.isClicked = false; + this.myColor1 = 'custom1'; + this.myColor2 = 'custom2'; + this.multiColor = ['primary','secondary']; + } + + toggle() { + this.isClicked = !this.isClicked; + } +} diff --git a/ionic/components/button/test/dynamic/main.html b/ionic/components/button/test/dynamic/main.html new file mode 100644 index 00000000000..c864beb4566 --- /dev/null +++ b/ionic/components/button/test/dynamic/main.html @@ -0,0 +1,19 @@ + + + Default Buttons + + + +

Button Attributes Test

+ + + + + + + + +
+ + +