Skip to content

Commit

Permalink
Moved visual test to its own file. Update screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo committed Oct 11, 2017
1 parent b21fdcf commit bc0e19d
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 5 deletions.
3 changes: 0 additions & 3 deletions demo/icons-basic-demos.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ <h3>All Icons</h3>
ready() {
super.ready();
this.iconsets = new Polymer.IronMeta({type: 'iconset'}).list.filter(i => i.name == 'vaadin');

// Checked in gemini before capture callback
window.webComponentsAreReady = true;
}

getIconNames(iconset, search) {
Expand Down
70 changes: 70 additions & 0 deletions test/visual/icons.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>

<style>
body {
font-family: sans-serif;
}
</style>
</head>

<body>
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../vaadin-icons.html">
<link rel="import" href="../../../iron-meta/iron-meta.html">
<link rel="import" href="../../../vaadin-text-field/vaadin-text-field.html">


<dom-bind id="binder">
<template>
<style>
.iconset-container {
width: 800px;
font-size: 10px;
}
.icon-container {
display: inline-flex;
flex-direction: column;
width: 110px;
align-items: center;
margin-top: 6px;
}
span {
white-space: nowrap;
overflow: hidden;
}
</style>
<div class="iconset-container">
<dom-repeat items="[[iconsets]]">
<template>
<dom-repeat id="wrapper" items="[[getIconNames(item)]]">
<template is="dom-repeat" >
<div class="icon-container">
<iron-icon icon="[[item]]"></iron-icon>
<span>[[item]]</span>
</div>
</template>
</dom-repeat>
</template>
</dom-repeat>
</div>
</template>
</dom-bind>

<script>
window.addEventListener('WebComponentsReady', function() {
const binder = document.getElementById('binder');
binder.getIconNames = function(iconset) {
return iconset.getIconNames();
}
binder.iconsets = new Polymer.IronMeta({type: 'iconset'}).list.filter(i => i.name == 'vaadin');
window.webComponentsAreReady = true;
});
</script>

</body>
</html>
Binary file modified test/visual/screens/vaadin-icons/default/default/chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/visual/screens/vaadin-icons/default/default/edge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/visual/screens/vaadin-icons/default/default/firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/visual/screens/vaadin-icons/default/default/ie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions test/visual/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ gemini.suite('vaadin-icons', function(rootSuite) {

gemini.suite('default', function(suite) {
suite
.setUrl('../../demo/index.html')
.setUrl('icons.html')
.before(function(actions) {
actions.waitForJSCondition(function(window) {
return window.webComponentsAreReady;
}, 120000).wait(10000);
})
.setCaptureElements('body')
.setCaptureElements('.iconset-container')
.capture('default');
});

Expand Down

0 comments on commit bc0e19d

Please sign in to comment.