Skip to content

Commit

Permalink
Added visual tests for Material theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
sohrabtaee committed Aug 23, 2018
1 parent b6ab6b2 commit 49b4e10
Show file tree
Hide file tree
Showing 135 changed files with 54 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules
package-lock.json
yarn.lock
coverage

analysis.json
7 changes: 5 additions & 2 deletions test/visual/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
<meta charset="UTF-8">
<title></title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/form-layout.html">`);
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-form-item.html">`);
</script>
<link rel="import" href="../../../polymer/polymer-element.html">
<link rel="import" href="../../vaadin-form-layout.html">
<link rel="import" href="../../vaadin-form-item.html">
<script>
window.addEventListener('WebComponentsReady', function() {
setTimeout(function() {
Expand Down
7 changes: 5 additions & 2 deletions test/visual/br.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
<title></title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../polymer/polymer-element.html">
<link rel="import" href="../../vaadin-form-layout.html">
<link rel="import" href="../../vaadin-form-item.html">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/form-layout.html">`);
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-form-item.html">`);
</script>
<script>
window.addEventListener('WebComponentsReady', function() {
setTimeout(function() {
Expand Down
7 changes: 5 additions & 2 deletions test/visual/colspan.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
<title></title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../polymer/polymer-element.html">
<link rel="import" href="../../vaadin-form-layout.html">
<link rel="import" href="../../vaadin-form-item.html">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/form-layout.html">`);
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-form-item.html">`);
</script>
<script>
window.addEventListener('WebComponentsReady', function() {
setTimeout(function() {
Expand Down
7 changes: 5 additions & 2 deletions test/visual/css-properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
<title></title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../polymer/polymer-element.html">
<link rel="import" href="../../vaadin-form-layout.html">
<link rel="import" href="../../vaadin-form-item.html">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/form-layout.html">`);
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-form-item.html">`);
</script>
<script>
window.addEventListener('WebComponentsReady', function() {
setTimeout(function() {
Expand Down
7 changes: 5 additions & 2 deletions test/visual/responsive-steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
<title></title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../polymer/polymer-element.html">
<link rel="import" href="../../vaadin-form-layout.html">
<link rel="import" href="../../vaadin-form-item.html">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/form-layout.html">`);
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-form-item.html">`);
</script>
<script>
window.addEventListener('WebComponentsReady', function() {
setTimeout(function() {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
7 changes: 5 additions & 2 deletions test/visual/single-column.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
<title></title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../polymer/polymer-element.html">
<link rel="import" href="../../vaadin-form-layout.html">
<link rel="import" href="../../vaadin-form-item.html">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/form-layout.html">`);
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-form-item.html">`);
</script>
<script>
window.addEventListener('WebComponentsReady', function() {
setTimeout(function() {
Expand Down
7 changes: 5 additions & 2 deletions test/visual/styling.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
<title></title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../polymer/polymer-element.html">
<link rel="import" href="../../vaadin-form-layout.html">
<link rel="import" href="../../vaadin-form-item.html">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/form-layout.html">`);
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-form-item.html">`);
</script>
<script>
window.addEventListener('WebComponentsReady', function() {
setTimeout(function() {
Expand Down
35 changes: 18 additions & 17 deletions test/visual/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,24 @@ gemini.suite('vaadin-form-layout', function(rootSuite) {
rootSuite
.before(wait)
.after(goToAboutBlank);

[
'basic',
'single-column',
'responsive-steps',
'colspan',
'br',
'css-properties',
'styling'
].forEach(testName => {
gemini.suite(testName, function(suite) {
suite
.setUrl(`${testName}.html`)
.setCaptureElements('#capture')
.capture('default')
.capture('20em', setBodyWidth('20em'))
.capture('10em', setBodyWidth('10em'));
['lumo', 'material'].forEach(theme => {
[
'basic',
'single-column',
'responsive-steps',
'colspan',
'br',
'css-properties',
'styling'
].forEach(testName => {
gemini.suite(`${testName}-${theme}`, function(suite) {
suite
.setUrl(`${testName}.html?theme=${theme}`)
.setCaptureElements('#capture')
.capture('default')
.capture('20em', setBodyWidth('20em'))
.capture('10em', setBodyWidth('10em'));
});
});
});
});

0 comments on commit 49b4e10

Please sign in to comment.