diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json b/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json index 81113ef022..0dbb4c1292 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-autogrow-textarea", - "version": "1.0.10", + "version": "1.0.11", "description": "A textarea element that automatically grows with input", "authors": [ "The Polymer Authors" @@ -29,17 +29,18 @@ }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "polymer/web-component-tester#^3.4.0", + "web-component-tester": "^4.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.10", + "_release": "1.0.11", "_resolution": { "type": "version", - "tag": "v1.0.10", - "commit": "1ba4f97e250dc14e9638d95be582dd62b9083736" + "tag": "v1.0.11", + "commit": "8fe629c9fecb14b76319ab4fbeef7f0237d93004" }, "_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml b/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml index 1929c8ae4c..771bf35d1e 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml @@ -1,22 +1,25 @@ language: node_js sudo: false before_script: - - npm install web-component-tester - - npm install bower - - 'export PATH=$PWD/node_modules/.bin:$PATH' + - npm install -g bower polylint web-component-tester - bower install + - polylint env: global: - secure: lIogwlz5kFUKYy1OWASXxQgZE4YTyjUY0QcEgnqbv6wQ0GX8wRMgbI3zhbAv+xXU5ieYXg6Bd47ZFZZ1kVEWzQynAdd2od14Eu1vfN60/yc/llz62VTYuFsPt8r+Tgw41Iz8plwejK4a+V26Da5tXW+soJQOJKvE/MOiPzKi2m0= - secure: cj3uSCQwLY6pyP3oTdGFjJoTRjv3G1lSe73fMd6i15XnMMxM4DVarfDtK+a0dPPxDY8BBhfr4sFClZuWX71bAHQuqUA84oigbeWt2xfl8d3HUuvr9aEnQxAGe2eQE7atpYJPC9M447sw48QKiUVgQo33DeJ1BGj6SBqkw0BJXO8= -node_js: 4 + - CXX=g++-4.8 +node_js: stable addons: - firefox: '42.0' + firefox: latest apt: sources: - google-chrome + - ubuntu-toolchain-r-test packages: - google-chrome-stable + - g++-4.8 + sauce_connect: true script: - xvfb-run wct - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md index 7b10141565..f147978a3e 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md @@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md If you edit that file, it will get updated everywhere else. If you edit this file, your changes will get overridden :) + +You can however override the jsbin link with one that's customized to this +specific element: + +jsbin=https://jsbin.com/cagaye/edit?html,output --> # Polymer Elements ## Guide for Contributors @@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag 3. Click the `paper-foo` element. ``` - 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. @@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag When submitting pull requests, please provide: - 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: ```markdown (For a single issue) Fixes #20 (For multiple issues) - Fixes #32, #40 + Fixes #32, fixes #40 ``` 2. **A succinct description of the design** used to fix any related issues. For example: diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json b/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json index 61a9c49ac2..b775b23443 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json @@ -1,6 +1,6 @@ { "name": "iron-autogrow-textarea", - "version": "1.0.10", + "version": "1.0.11", "description": "A textarea element that automatically grows with input", "authors": [ "The Polymer Authors" @@ -29,9 +29,10 @@ }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "polymer/web-component-tester#^3.4.0", + "web-component-tester": "^4.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" } diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/demo/index.html b/dashboard-ui/bower_components/iron-autogrow-textarea/demo/index.html index 0c7fdc052e..525d90a43e 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/demo/index.html +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/demo/index.html @@ -18,46 +18,80 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN iron-autogrow-textarea demo + + - + + - - +
-

Updating the value imperatively

- +

Example of updating the value imperatively

+ +
+
- - diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html b/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html index e255d79904..8ec9942772 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html @@ -33,6 +33,7 @@ The following custom properties and mixins are available for styling: Custom property | Description | Default ----------------|-------------|---------- `--iron-autogrow-textarea` | Mixin applied to the textarea | `{}` +`--iron-autogrow-textarea-placeholder` | Mixin applied to the textarea placeholder | `{}` @group Iron Elements @hero hero.svg @@ -50,6 +51,7 @@ Custom property | Description | Default padding: 2px; -moz-appearance: textarea; -webkit-appearance: textarea; + overflow: hidden; } .mirror-text { @@ -82,6 +84,21 @@ Custom property | Description | Default box-shadow: none; } + textarea::-webkit-input-placeholder { + @apply(--iron-autogrow-textarea-placeholder); + } + + textarea:-moz-placeholder { + @apply(--iron-autogrow-textarea-placeholder); + } + + textarea::-moz-placeholder { + @apply(--iron-autogrow-textarea-placeholder); + } + + textarea:-ms-input-placeholder { + @apply(--iron-autogrow-textarea-placeholder); + } + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-input/.bower.json b/dashboard-ui/bower_components/paper-input/.bower.json index 0216a6c581..598b2f24c7 100644 --- a/dashboard-ui/bower_components/paper-input/.bower.json +++ b/dashboard-ui/bower_components/paper-input/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.1.5", + "version": "1.1.6", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -33,7 +33,7 @@ "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", "iron-input": "PolymerElements/iron-input#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.1.0", "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" }, "devDependencies": { @@ -47,11 +47,11 @@ "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.1.5", + "_release": "1.1.6", "_resolution": { "type": "version", - "tag": "v1.1.5", - "commit": "0aa8318b5e026688f94c78c7673acabf5bad0f17" + "tag": "v1.1.6", + "commit": "d918956322b733ee7673aec6e1ce9939aadb4c63" }, "_source": "git://github.com/polymerelements/paper-input.git", "_target": "^1.0.9", diff --git a/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md index 7b10141565..f147978a3e 100644 --- a/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md @@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md If you edit that file, it will get updated everywhere else. If you edit this file, your changes will get overridden :) + +You can however override the jsbin link with one that's customized to this +specific element: + +jsbin=https://jsbin.com/cagaye/edit?html,output --> # Polymer Elements ## Guide for Contributors @@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag 3. Click the `paper-foo` element. ``` - 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. @@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag When submitting pull requests, please provide: - 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: ```markdown (For a single issue) Fixes #20 (For multiple issues) - Fixes #32, #40 + Fixes #32, fixes #40 ``` 2. **A succinct description of the design** used to fix any related issues. For example: diff --git a/dashboard-ui/bower_components/paper-input/bower.json b/dashboard-ui/bower_components/paper-input/bower.json index 99a9b83b38..b507f5709c 100644 --- a/dashboard-ui/bower_components/paper-input/bower.json +++ b/dashboard-ui/bower_components/paper-input/bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.1.5", + "version": "1.1.6", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -33,7 +33,7 @@ "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", "iron-input": "PolymerElements/iron-input#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.1.0", "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" }, "devDependencies": { diff --git a/dashboard-ui/bower_components/paper-input/paper-input-behavior.html b/dashboard-ui/bower_components/paper-input/paper-input-behavior.html index 3edbb79ca9..89882be214 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-behavior.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-behavior.html @@ -365,13 +365,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN listeners: { 'addon-attached': '_onAddonAttached', - 'focus': '_onFocus' }, - observers: [ - '_focusedControlStateChanged(focused)' - ], - keyBindings: { 'shift+tab:keydown': '_onShiftTabDown' }, @@ -440,12 +435,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Forward focus to inputElement + * Forward focus to inputElement. Overriden from IronControlState. */ - _onFocus: function() { - if (!this._shiftTabPressed) { + _focusBlurHandler: function(event) { + if (this._shiftTabPressed) + return; + + Polymer.IronControlState._focusBlurHandler.call(this, event); + + // Forward the focus to the nested input. + if (this.focused) this._focusableElement.focus(); - } }, /** @@ -497,24 +497,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN return placeholder || alwaysFloatLabel; }, - _focusedControlStateChanged: function(focused) { - // IronControlState stops the focus and blur events in order to redispatch them on the host - // element, but paper-input-container listens to those events. Since there are more - // pending work on focus/blur in IronControlState, I'm putting in this hack to get the - // input focus state working for now. - if (!this.$.container) { - this.$.container = Polymer.dom(this.root).querySelector('paper-input-container'); - if (!this.$.container) { - return; - } - } - if (focused) { - this.$.container._onFocus(); - } else { - this.$.container._onBlur(); - } - }, - _updateAriaLabelledBy: function() { var label = Polymer.dom(this.root).querySelector('label'); if (!label) { diff --git a/dashboard-ui/bower_components/paper-input/paper-input-char-counter.html b/dashboard-ui/bower_components/paper-input/paper-input-char-counter.html index c0357824f9..ec427e0d9b 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-char-counter.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-char-counter.html @@ -72,13 +72,13 @@ Custom property | Description | Default state.value = state.value || ''; - // Account for the textarea's new lines. - var str = state.value.replace(/(\r\n|\n|\r)/g, '--').length; + var counter = state.value.length; if (state.inputElement.hasAttribute('maxlength')) { - str += '/' + state.inputElement.getAttribute('maxlength'); + counter += '/' + state.inputElement.getAttribute('maxlength'); } - this._charCounterStr = str; + + this._charCounterStr = counter; } }); diff --git a/dashboard-ui/bower_components/paper-input/paper-input-container.html b/dashboard-ui/bower_components/paper-input/paper-input-container.html index d4c71f9ab4..c1b9f66b9c 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-container.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-container.html @@ -10,7 +10,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - @@ -74,8 +73,8 @@ The following custom properties and mixins are available for styling: Custom property | Description | Default ----------------|-------------|---------- `--paper-input-container-color` | Label and underline color when the input is not focused | `--secondary-text-color` -`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--default-primary-color` -`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--google-red-500` +`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--primary-color` +`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--error-color` `--paper-input-container-input-color` | Input foreground color | `--primary-text-color` `--paper-input-container` | Mixin applied to the container | `{}` `--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}` @@ -125,8 +124,9 @@ This element is `display:block` by default, but you can set the `inline` attribu .focused-line { @apply(--layout-fit); - background: var(--paper-input-container-focus-color, --default-primary-color); + background: var(--paper-input-container-focus-color, --primary-color); height: 2px; + -webkit-transform-origin: center center; transform-origin: center center; -webkit-transform: scale3d(0,1,1); @@ -145,7 +145,7 @@ This element is `display:block` by default, but you can set the `inline` attribu } .underline.is-invalid .focused-line { - background: var(--paper-input-container-invalid-color, --google-red-500); + background: var(--paper-input-container-invalid-color, --error-color); -webkit-transform: none; transform: none; -webkit-transition: -webkit-transform 0.25s; @@ -157,8 +157,8 @@ This element is `display:block` by default, but you can set the `inline` attribu .unfocused-line { @apply(--layout-fit); - height: 1px; background: var(--paper-input-container-color, --secondary-text-color); + height: 1px; @apply(--paper-input-container-underline); } @@ -174,6 +174,7 @@ This element is `display:block` by default, but you can set the `inline` attribu .label-and-input-container { @apply(--layout-flex-auto); @apply(--layout-relative); + width: 100%; max-width: 100%; } @@ -194,26 +195,26 @@ This element is `display:block` by default, but you can set the `inline` attribu width: 100%; font: inherit; color: var(--paper-input-container-color, --secondary-text-color); + -webkit-transition: -webkit-transform 0.25s, width 0.25s; + transition: transform 0.25s, width 0.25s; + -webkit-transform-origin: left top; + transform-origin: left top; @apply(--paper-font-common-nowrap); @apply(--paper-font-subhead); @apply(--paper-input-container-label); + @apply(--paper-transition-easing); } .input-content.label-is-floating ::content label, .input-content.label-is-floating ::content .paper-input-label { -webkit-transform: translateY(-75%) scale(0.75); transform: translateY(-75%) scale(0.75); - -webkit-transition: -webkit-transform 0.25s, width 0.25s; - transition: transform 0.25s, width 0.25s; - -webkit-transform-origin: left top; - transform-origin: left top; /* Since we scale to 75/100 of the size, we actually have 100/75 of the original space now available */ width: 133%; - @apply(--paper-transition-easing); @apply(--paper-input-container-label-floating); } @@ -229,14 +230,14 @@ This element is `display:block` by default, but you can set the `inline` attribu .input-content.label-is-highlighted ::content label, .input-content.label-is-highlighted ::content .paper-input-label { - color: var(--paper-input-container-focus-color, --default-primary-color); + color: var(--paper-input-container-focus-color, --primary-color); @apply(--paper-input-container-label-focus); } .input-content.is-invalid ::content label, .input-content.is-invalid ::content .paper-input-label { - color: var(--paper-input-container-invalid-color, --google-red-500); + color: var(--paper-input-container-invalid-color, --error-color); } .input-content.label-is-hidden ::content label, @@ -266,12 +267,14 @@ This element is `display:block` by default, but you can set the `inline` attribu ::content [prefix] { @apply(--paper-font-subhead); + @apply(--paper-input-prefix); @apply(--layout-flex-none); } ::content [suffix] { @apply(--paper-font-subhead); + @apply(--paper-input-suffix); @apply(--layout-flex-none); } @@ -290,11 +293,11 @@ This element is `display:block` by default, but you can set the `inline` attribu } .add-on-content.is-invalid ::content * { - color: var(--paper-input-container-invalid-color, --google-red-500); + color: var(--paper-input-container-invalid-color, --error-color); } .add-on-content.is-highlighted ::content * { - color: var(--paper-input-container-focus-color, --default-primary-color); + color: var(--paper-input-container-focus-color, --primary-color); } diff --git a/dashboard-ui/bower_components/paper-input/paper-input-error.html b/dashboard-ui/bower_components/paper-input/paper-input-error.html index 4b33a332e2..b950910e37 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-error.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-error.html @@ -9,7 +9,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> - @@ -28,7 +27,7 @@ The following custom properties and mixins are available for styling: Custom property | Description | Default ----------------|-------------|---------- -`--paper-input-container-invalid-color` | The foreground color of the error | `--google-red-500` +`--paper-input-container-invalid-color` | The foreground color of the error | `--error-color` `--paper-input-error` | Mixin applied to the error | `{}` --> @@ -39,7 +38,7 @@ Custom property | Description | Default display: inline-block; visibility: hidden; - color: var(--paper-input-container-invalid-color, --google-red-500); + color: var(--paper-input-container-invalid-color, --error-color); @apply(--paper-font-caption); @apply(--paper-input-error); diff --git a/dashboard-ui/bower_components/paper-input/test/paper-input-char-counter.html b/dashboard-ui/bower_components/paper-input/test/paper-input-char-counter.html index 5e7f2800c0..49e1278e96 100644 --- a/dashboard-ui/bower_components/paper-input/test/paper-input-char-counter.html +++ b/dashboard-ui/bower_components/paper-input/test/paper-input-char-counter.html @@ -97,8 +97,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var counter = Polymer.dom(input.root).querySelector('paper-input-char-counter') assert.ok(counter, 'paper-input-char-counter exists'); - // A new line counts as two characters. - assert.equal(counter._charCounterStr, input.value.length + 1, 'character counter shows the value length'); + assert.equal(counter._charCounterStr, input.value.length, 'character counter shows the value length'); }); }); diff --git a/dashboard-ui/bower_components/paper-input/test/paper-input.html b/dashboard-ui/bower_components/paper-input/test/paper-input.html index df7915d2bf..4a43210204 100644 --- a/dashboard-ui/bower_components/paper-input/test/paper-input.html +++ b/dashboard-ui/bower_components/paper-input/test/paper-input.html @@ -196,23 +196,51 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN input = fixture('basic'); }); - test('focus/blur events fired on host element', function() { - var nFocusEvents = 0; - var nBlurEvents = 0; + // At the moment, it is very hard to correctly fire exactly + // one focus/blur events on a paper-input. This is because + // when a paper-input is focused, it needs to focus + // its underlying native input, which will also fire a `blur` + // event. + test('focus events fired on host element', function() { input.addEventListener('focus', function(event) { - nFocusEvents += 1; assert(input.focused, 'input is focused'); - MockInteractions.blur(input.inputElement); }); - input.addEventListener('blur', function() { - nBlurEvents += 1; - assert(!input.focused, 'input is blurred'); - }); - MockInteractions.focus(input.inputElement); - assert.isTrue(nFocusEvents >= 1, 'focus event fired'); - assert.isTrue(nBlurEvents >= 1, 'blur event fired'); + MockInteractions.focus(input); }); + test('focus events fired on host element if nested element is focused', function() { + input.addEventListener('focus', function(event) { + assert(input.focused, 'input is focused'); + }); + MockInteractions.focus(input.inputElement); + }); + + test('blur events fired on host element', function() { + MockInteractions.focus(input); + input.addEventListener('blur', function(event) { + assert(!input.focused, 'input is blurred'); + }); + MockInteractions.blur(input); + }); + + test('blur events fired on host element nested element is blurred', function() { + MockInteractions.focus(input); + input.addEventListener('blur', function(event) { + assert(!input.focused, 'input is blurred'); + }); + MockInteractions.blur(input.inputElement); + }); + + test('focusing then bluring sets the focused attribute correctly', function() { + MockInteractions.focus(input); + assert(input.focused, 'input is focused'); + MockInteractions.blur(input); + assert(!input.focused, 'input is blurred'); + MockInteractions.focus(input.inputElement); + assert(input.focused, 'input is focused'); + MockInteractions.blur(input.inputElement); + assert(!input.focused, 'input is blurred'); + }); }); suite('focused styling (integration test)', function() { diff --git a/dashboard-ui/bower_components/paper-input/test/paper-textarea.html b/dashboard-ui/bower_components/paper-input/test/paper-textarea.html index a63add12f7..254df8f97c 100644 --- a/dashboard-ui/bower_components/paper-input/test/paper-textarea.html +++ b/dashboard-ui/bower_components/paper-input/test/paper-textarea.html @@ -32,12 +32,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - -