-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure correct alignment, add visual tests (#25)
- Loading branch information
1 parent
2006e3c
commit 5c46456
Showing
19 changed files
with
214 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!DOCTYPE html> | ||
|
||
<head lang="en"> | ||
<meta charset="UTF-8"> | ||
<title></title> | ||
<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-custom-field.html"> | ||
<link rel="import" href="../../../vaadin-combo-box/theme/${theme}/vaadin-combo-box.html"> | ||
<link rel="import" href="../../../vaadin-date-picker/theme/${theme}/vaadin-date-picker.html"> | ||
<link rel="import" href="../../../vaadin-select/theme/${theme}/vaadin-select.html"> | ||
<link rel="import" href="../../../vaadin-text-field/theme/${theme}/vaadin-email-field.html"> | ||
<link rel="import" href="../../../vaadin-text-field/theme/${theme}/vaadin-number-field.html"> | ||
<link rel="import" href="../../../vaadin-text-field/theme/${theme}/vaadin-password-field.html"> | ||
<link rel="import" href="../../../vaadin-text-field/theme/${theme}/vaadin-text-field.html"> | ||
<link rel="import" href="../../../vaadin-time-picker/theme/${theme}/vaadin-time-picker.html"> | ||
`); | ||
|
||
window.addEventListener('WebComponentsReady', function() { | ||
customElements.whenDefined('vaadin-custom-field').then(() => { | ||
window.ShadyDOM && window.ShadyDOM.flush(); // Force DOM composition | ||
window.webComponentsAreReady = true; // Checked in gemini before capture callback | ||
}); | ||
}); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<div id="alignment-tests" style="padding: 10px;"> | ||
<vaadin-custom-field invalid error-message="Invalid"> | ||
<vaadin-number-field value="1"></vaadin-number-field> | ||
<vaadin-password-field value="password"></vaadin-password-field> | ||
</vaadin-custom-field> | ||
<vaadin-text-field invalid error-message="Invalid"></vaadin-text-field> | ||
<vaadin-time-picker value="09:00"></vaadin-time-picker> | ||
<br> | ||
<br> | ||
<vaadin-custom-field label="Custom field"> | ||
<vaadin-select value="+358"> | ||
<template> | ||
<vaadin-list-box> | ||
<vaadin-item>+358</vaadin-item> | ||
<vaadin-item>+46</vaadin-item> | ||
<vaadin-item>+34</vaadin-item> | ||
</vaadin-list-box> | ||
</template> | ||
</vaadin-select> | ||
<vaadin-text-field></vaadin-text-field> | ||
</vaadin-custom-field> | ||
<vaadin-text-field label="Text field" value="Text"></vaadin-text-field> | ||
<vaadin-select label="Plain select" value="Option one"> | ||
<template> | ||
<vaadin-list-box> | ||
<vaadin-item>Option one</vaadin-item> | ||
<vaadin-item>Option two</vaadin-item> | ||
</vaadin-list-box> | ||
</template> | ||
</vaadin-select> | ||
<br> | ||
<br> | ||
<vaadin-custom-field label="Custom field" invalid error-message="Invalid"> | ||
<vaadin-email-field value="[email protected]"></vaadin-email-field> | ||
<vaadin-date-picker value="1980-08-14"></vaadin-date-picker> | ||
</vaadin-custom-field> | ||
<vaadin-number-field label="Number" value="2" invalid error-message="Invalid"></vaadin-number-field> | ||
<vaadin-date-picker label="Date" invalid error-message="Invalid"></vaadin-date-picker> | ||
<br> | ||
<br> | ||
<vaadin-custom-field label="Custom field" invalid error-message="Invalid"> | ||
<vaadin-combo-box value="Combo item" allow-custom-value></vaadin-combo-box> | ||
<vaadin-time-picker value="09:00"></vaadin-time-picker> | ||
</vaadin-custom-field> | ||
<vaadin-combo-box label="Combo" value="Combo item" allow-custom-value></vaadin-combo-box> | ||
<vaadin-password-field value="password"></vaadin-password-field> | ||
</div> | ||
|
||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
|
||
<head lang="en"> | ||
<meta charset="UTF-8"> | ||
<title></title> | ||
<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-custom-field.html"> | ||
<link rel="import" href="../../../vaadin-text-field/theme/${theme}/vaadin-text-field.html"> | ||
<link rel="import" href="../../../vaadin-form-layout/theme/${theme}/vaadin-form-layout.html"> | ||
`); | ||
|
||
window.addEventListener('WebComponentsReady', function() { | ||
customElements.whenDefined('vaadin-custom-field').then(() => { | ||
window.ShadyDOM && window.ShadyDOM.flush(); // Force DOM composition | ||
window.webComponentsAreReady = true; // Checked in gemini before capture callback | ||
}); | ||
}); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<div id="form-layout-tests"> | ||
<vaadin-form-layout style="width: 60em"> | ||
<vaadin-text-field label="Text field" invalid error-message="Error"></vaadin-text-field> | ||
<vaadin-custom-field label="Custom field" invalid error-message="Error"> | ||
<vaadin-text-field></vaadin-text-field> | ||
</vaadin-custom-field> | ||
</vaadin-form-layout> | ||
<br> | ||
<vaadin-form-layout style="width: 60em"> | ||
<vaadin-text-field label="Text field" theme="always-float-label"></vaadin-text-field> | ||
<vaadin-custom-field label="Custom field"> | ||
<vaadin-text-field></vaadin-text-field> | ||
</vaadin-custom-field> | ||
</vaadin-form-layout> | ||
</div> | ||
|
||
</body> |
Binary file added
BIN
+33.2 KB
test/visual/screens/vaadin-custom-field/alignment-tests-lumo/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 added
BIN
+17.8 KB
test/visual/screens/vaadin-custom-field/alignment-tests-lumo/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 added
BIN
+20.4 KB
.../visual/screens/vaadin-custom-field/alignment-tests-material/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 added
BIN
+15.7 KB
...visual/screens/vaadin-custom-field/alignment-tests-material/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
BIN
-121 Bytes
(98%)
test/visual/screens/vaadin-custom-field/default-tests-lumo/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
BIN
-19 Bytes
(100%)
test/visual/screens/vaadin-custom-field/default-tests-lumo/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
BIN
+139 Bytes
(100%)
test/visual/screens/vaadin-custom-field/default-tests-material/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
BIN
+196 Bytes
(100%)
test/visual/screens/vaadin-custom-field/default-tests-material/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 added
BIN
+6.6 KB
test/visual/screens/vaadin-custom-field/form-layout-tests-lumo/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 added
BIN
+4.61 KB
test/visual/screens/vaadin-custom-field/form-layout-tests-lumo/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 added
BIN
+4.49 KB
...isual/screens/vaadin-custom-field/form-layout-tests-material/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 added
BIN
+3.85 KB
...sual/screens/vaadin-custom-field/form-layout-tests-material/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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters