This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <dom-module id="my-component"> | |
| <template> | |
| <paper-toast text="[[greeting]]"></paper-toast> | |
| </template> | |
| <script> | |
| Polymer({ | |
| is: 'my-component', | |
| properties: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <snippet> | |
| <content><![CDATA[ | |
| <dom-module id="${1:custom-element}"> | |
| <template> | |
| <style> | |
| :host { | |
| display: block; | |
| } | |
| </style> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <svg width="160" height="160" viewBox="0 0 160 160" class="vscode-logo"> | |
| <g> | |
| <path class="p1" d="M 3 115 L 3 115 L 16 120 L 16 120 L 3 115 Z"></path> | |
| <path class="p2" d="M 112 6 L 148 21 L 148 21 L 112 6 L 112 6 Z"></path> | |
| <path class="p3" d="M 148 135 L 112 152 L 112 152 L 148 135 L 148 135 Z"></path> | |
| </g> | |
| </svg> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"lastUpload":"2018-10-27T22:08:26.910Z","extensionVersion":"v3.2.0"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "key": "shift+'", | |
| "command": "editor.action.insertSnippet", | |
| "when": "editorTextFocus && editorLangId == html", | |
| "args": { | |
| "snippet": "\"$1\"" | |
| } | |
| }, | |
| { | |
| "key": "'", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| suite('Setting "opened" as true', () => { | |
| const sut = fixture('someId'); | |
| suiteSetup(() => { | |
| sut.opened = true; | |
| }); | |
| test('opens the modal', () => { | |
| assert.isTrue(isVisible(sut)); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test('calling toggle() method changes the modal visibility', () => { | |
| // Arrange | |
| const initialVisibility = isVisilble(sut); // false | |
| // Act | |
| sut.toggle(); | |
| // Assert | |
| assert.notEqual(isVisilble(sut), initialVisibility); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test('setting "opened" as true opens the modal', () => { | |
| // Act | |
| sut.opened = true; | |
| // Assert | |
| assert.isTrue(isVisilble(sut)); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('<my-modal>', () => { | |
| // context es un alias de describe | |
| context('setting "opened" as true', () => { | |
| // fixture instancia el componente | |
| const sut = fixture('someId'); | |
| // Se ejecuta una vez antes de todos los tests de este bloque | |
| before(() => { | |
| sut.opened = true; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| suite('<my-modal>', () => { | |
| suite('setting "opened" as true', () => { | |
| // fixture instancia el componente | |
| const sut = fixture('someId'); | |
| // Se ejecuta una vez antes de todos los tests de este bloque | |
| suiteSetup(() => { | |
| sut.opened = true; | |
| }); |