Skip to content

Commit

Permalink
test for .viewport modifier added
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred Lau committed Aug 23, 2024
1 parent 2b32333 commit bc30e61
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/cypress/integration/directives/x-on.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ test('.window modifier',
}
)

test('.viewport modifier',
html`
<div x-data="{ foo: 'bar' }">
<div x-on:resize.visual="foo = window.visualViewport.width"></div>
<span x-text="foo"></span>
</div>
`,
({ get, viewport }) => {
get('span').should(haveText('bar'))
viewport('iphone-6')
get('span').should(haveText('375'))
}
)

test('expressions can start with if',
html`
<div x-data="{ foo: 'bar' }">
Expand Down

0 comments on commit bc30e61

Please sign in to comment.