Skip to content

Commit

Permalink
issue #859: fixing the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gullerya committed May 31, 2021
1 parent 0074c32 commit 4fa625e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions __snapshots__/vwc-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#### `should have internal contents`

```html
<mwc-menu-surface
<vwc-surface
class="mdc-menu mdc-menu-surface"
hidden=""
>
Expand All @@ -14,7 +14,7 @@
<slot>
</slot>
</mwc-list>
</mwc-menu-surface>
</vwc-surface>

```

11 changes: 2 additions & 9 deletions components/datepicker/test/datepicker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ describe('datepicker', () => {
);
});

// it('should have internal contents', async () => {
// const [actualElement] = addElement(
// textToDomToParent(`<${COMPONENT_NAME}></${COMPONENT_NAME}>`)
// );
// await actualElement.onReady;
// expect(actualElement.shadowRoot.innerHTML).to.equalSnapshot();
// });

it('should have lit-flatpickr instance in DOM', async () => {
const [actualElement] = addElement(
textToDomToParent(`<${COMPONENT_NAME}></${COMPONENT_NAME}>`)
Expand Down Expand Up @@ -75,7 +67,8 @@ describe('datepicker', () => {
await waitNextTask();

const vwcMenu = actualElement.shadowRoot.querySelector('vwc-menu');
const mwcMenuSurface = vwcMenu.shadowRoot.querySelector('mwc-menu-surface');
console.log(vwcMenu.shadowRoot);
const mwcMenuSurface = vwcMenu.shadowRoot.querySelector('vwc-surface');
const menuSurface = mwcMenuSurface.shadowRoot.querySelector('.mdc-menu-surface');

assertComputedStyle(menuSurface, { position: 'fixed' });
Expand Down

0 comments on commit 4fa625e

Please sign in to comment.