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 authored and manolo committed Aug 28, 2018
1 parent 6aeea19 commit ede98de
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 14 deletions.
5 changes: 4 additions & 1 deletion test/visual/customized.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<head lang="en">
<meta charset="UTF-8">
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link href="../../vaadin-split-layout.html" rel="import">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-split-layout.html">`);
</script>
</head>

<body>
Expand Down
5 changes: 4 additions & 1 deletion test/visual/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<head lang="en">
<meta charset="UTF-8">
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link href="../../vaadin-split-layout.html" rel="import">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-split-layout.html">`);
</script>

<style is="custom-style">
vaadin-split-layout {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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.
25 changes: 13 additions & 12 deletions test/visual/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ gemini.suite('vaadin-split-layout', function(rootSuite) {
rootSuite
.before(wait)
.after(goToAboutBlank);
['lumo', 'material'].forEach(theme => {
gemini.suite(`default-${theme}`, function(suite) {
suite
.setUrl(`default.html?theme=${theme}`)
.setCaptureElements('#default')
.capture('default');
});

gemini.suite('default', function(suite) {
suite
.setUrl('default.html')
.setCaptureElements('#default')
.capture('default');
});

gemini.suite('customized', function(suite) {
suite
.setUrl('customized.html')
.setCaptureElements('#customized')
.capture('customized');
gemini.suite(`customized-${theme}`, function(suite) {
suite
.setUrl(`customized.html?theme=${theme}`)
.setCaptureElements('#customized')
.capture('customized');
});
});

});

0 comments on commit ede98de

Please sign in to comment.