Skip to content

Commit

Permalink
Merge 8a1f6f2 into 03a9819
Browse files Browse the repository at this point in the history
  • Loading branch information
sosa-vaadin committed Feb 23, 2021
2 parents 03a9819 + 8a1f6f2 commit 7b8ecb6
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,7 +1,7 @@
sudo: false
dist: xenial
language: node_js
node_js: 8.11
node_js: 10.23

cache:
directories:
Expand Down
24 changes: 24 additions & 0 deletions test/visual/no-padding.html
@@ -0,0 +1,24 @@
<!DOCTYPE html>

<head lang="en">
<meta charset="UTF-8" />
<title>Dialog tests</title>
<script>
window.polymerSkipLoadingFontRoboto = true;
</script>
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<script>
const theme = window.location.search.replace(/.*theme=(\w+).*/, '$1') || 'lumo';
document.write(`<link rel="import" href="../../theme/${theme}/vaadin-dialog.html">`);
</script>
</head>

<body style="height: 600px">
<vaadin-dialog theme="no-padding" opened>
<template>
<div>A very simple dialog with no padding</div>
<button>OK</button>
</template>
</vaadin-dialog>

</body>
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.
9 changes: 9 additions & 0 deletions test/visual/test.js
Expand Up @@ -14,13 +14,22 @@ gemini.suite('vaadin-dialog', function(rootSuite) {
.before(wait)
.after(goToAboutBlank);

const locator = 'body[data-ready]';

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

it(`${theme}-no-padding`, function() {
return this.browser
.url(`no-padding.html?theme=${theme}`)
.waitForVisible(locator, 15000)
.assertView(`${theme}-no-padding`, locator);
});
});

});
5 changes: 5 additions & 0 deletions theme/lumo/vaadin-dialog-styles.html
Expand Up @@ -27,6 +27,11 @@
padding: var(--lumo-space-l);
}

/* No padding */
:host([theme~='no-padding']) [part='content'] {
padding: 0;
}

/* Animations */

:host([opening]),
Expand Down
5 changes: 5 additions & 0 deletions theme/material/vaadin-dialog-styles.html
Expand Up @@ -15,6 +15,11 @@
[part="content"] {
padding: 24px;
}

/* No padding */
:host([theme~='no-padding']) [part='content'] {
padding: 0;
}
</style>
</template>
</dom-module>

0 comments on commit 7b8ecb6

Please sign in to comment.