-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Serhii Kulykov <[email protected]>
- Loading branch information
1 parent
2ada66f
commit d214578
Showing
3 changed files
with
111 additions
and
1 deletion.
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
77 changes: 77 additions & 0 deletions
77
packages/details/test/dom/__snapshots__/details.test.snap.js
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,77 @@ | ||
/* @web/test-runner snapshot v1 */ | ||
export const snapshots = {}; | ||
|
||
snapshots["vaadin-crud host default"] = | ||
`<vaadin-details tabindex="0"> | ||
<div slot="summary"> | ||
Summary | ||
</div> | ||
<input> | ||
</vaadin-details> | ||
`; | ||
/* end snapshot vaadin-crud host default */ | ||
|
||
snapshots["vaadin-crud shadow default"] = | ||
`<div role="heading"> | ||
<div | ||
aria-controls="vaadin-details-content-1" | ||
aria-expanded="false" | ||
part="summary" | ||
role="button" | ||
tabindex="0" | ||
> | ||
<span | ||
aria-hidden="true" | ||
part="toggle" | ||
> | ||
</span> | ||
<span part="summary-content"> | ||
<slot name="summary"> | ||
</slot> | ||
</span> | ||
</div> | ||
</div> | ||
<section | ||
aria-hidden="true" | ||
id="vaadin-details-content-1" | ||
part="content" | ||
style="max-height: 0px;" | ||
> | ||
<slot> | ||
</slot> | ||
</section> | ||
`; | ||
/* end snapshot vaadin-crud shadow default */ | ||
|
||
snapshots["vaadin-crud shadow opened"] = | ||
`<div role="heading"> | ||
<div | ||
aria-controls="vaadin-details-content-2" | ||
aria-expanded="true" | ||
part="summary" | ||
role="button" | ||
tabindex="0" | ||
> | ||
<span | ||
aria-hidden="true" | ||
part="toggle" | ||
> | ||
</span> | ||
<span part="summary-content"> | ||
<slot name="summary"> | ||
</slot> | ||
</span> | ||
</div> | ||
</div> | ||
<section | ||
aria-hidden="false" | ||
id="vaadin-details-content-2" | ||
part="content" | ||
style="" | ||
> | ||
<slot> | ||
</slot> | ||
</section> | ||
`; | ||
/* end snapshot vaadin-crud shadow opened */ | ||
|
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,33 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
import { fixtureSync } from '@vaadin/testing-helpers'; | ||
import '../../vaadin-details.js'; | ||
|
||
describe('vaadin-crud', () => { | ||
let details; | ||
|
||
beforeEach(() => { | ||
details = fixtureSync(` | ||
<vaadin-details> | ||
<div slot="summary">Summary</div> | ||
<input> | ||
</vaadin-details> | ||
`); | ||
}); | ||
|
||
describe('host', () => { | ||
it('default', async () => { | ||
await expect(details).dom.to.equalSnapshot(); | ||
}); | ||
}); | ||
|
||
describe('shadow', () => { | ||
it('default', async () => { | ||
await expect(details).shadowDom.to.equalSnapshot(); | ||
}); | ||
|
||
it('opened', async () => { | ||
details.opened = true; | ||
await expect(details).shadowDom.to.equalSnapshot(); | ||
}); | ||
}); | ||
}); |