Skip to content

Commit

Permalink
Merge pull request #156 from vaadin/feature/material-visual-test
Browse files Browse the repository at this point in the history
Added visual tests for Material theme.
  • Loading branch information
manolo committed Aug 28, 2018
2 parents dd4ff38 + 206ba48 commit c55328c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
9 changes: 6 additions & 3 deletions test/visual/dropdown-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
<title>Drop down menu tests</title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../polymer/polymer.html">
<link rel="import" href="../../../vaadin-list-box/vaadin-list-box.html">
<link rel="import" href="../../../vaadin-item/vaadin-item.html">
<link rel="import" href="../../vaadin-dropdown-menu.html">
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-dropdown-menu.html">`);
document.write(`<link rel="import" href="../../../vaadin-list-box/theme/${theme}/vaadin-list-box.html">`);
document.write(`<link rel="import" href="../../../vaadin-item/theme/${theme}/vaadin-item.html">`);
</script>
</head>

<body>
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.
12 changes: 7 additions & 5 deletions test/visual/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ gemini.suite('vaadin-dropdown-menu', function(rootSuite) {
.before(wait)
.after(goToAboutBlank);

gemini.suite('default-tests', function(suite) {
suite
.setUrl('dropdown-menu.html')
.setCaptureElements('#dropdown-menu')
.capture('dropdown-menu');
['lumo', 'material'].forEach(theme => {
gemini.suite(`default-tests-${theme}`, function(suite) {
suite
.setUrl(`dropdown-menu.html?theme=${theme}`)
.setCaptureElements('#dropdown-menu')
.capture('dropdown-menu');
});
});

});

0 comments on commit c55328c

Please sign in to comment.