11import { fixtureSync , nextRender } from '@vaadin/testing-helpers' ;
22import { visualDiff } from '@web/test-runner-visual-regression' ;
33import '@vaadin/aura/aura.css' ;
4+ import '../../not-animated-styles.css' ;
45import '../../../vaadin-crud.js' ;
56
67describe ( 'crud' , ( ) => {
@@ -9,7 +10,7 @@ describe('crud', () => {
910 beforeEach ( async ( ) => {
1011 div = document . createElement ( 'div' ) ;
1112 div . style . height = '100%' ;
12- element = fixtureSync ( '<vaadin-crud></vaadin-crud>' , div ) ;
13+ element = fixtureSync ( '<vaadin-crud style="height: 100%" ></vaadin-crud>' , div ) ;
1314 element . items = [ { name : { first : 'John' , last : 'Doe' } } , { name : { first : 'Jane' , last : 'Doe' } } ] ;
1415 await nextRender ( ) ;
1516 } ) ;
@@ -27,4 +28,25 @@ describe('crud', () => {
2728 element . setAttribute ( 'theme' , 'no-row-borders' ) ;
2829 await visualDiff ( element , 'no-row-borders' ) ;
2930 } ) ;
31+
32+ [ 'default' , 'aside' , 'bottom' ] . forEach ( ( position ) => {
33+ describe ( `editor-position-${ position } ` , ( ) => {
34+ beforeEach ( async ( ) => {
35+ switch ( position ) {
36+ case 'aside' :
37+ case 'bottom' :
38+ element . editorPosition = position ;
39+ await nextRender ( ) ;
40+ break ;
41+ default :
42+ // Do nothing
43+ }
44+ } ) ;
45+
46+ it ( `editor-position-${ position } ` , async ( ) => {
47+ element . editedItem = { } ;
48+ await visualDiff ( div , `editor-position-${ position } ` ) ;
49+ } ) ;
50+ } ) ;
51+ } ) ;
3052} ) ;
0 commit comments