Skip to content

Commit

Permalink
Merge pull request #47 from LucasWerey/fix/20
Browse files Browse the repository at this point in the history
fix(dslib): fix build
  • Loading branch information
LucasWerey authored Jan 20, 2024
2 parents cf53040 + 6836a6e commit 2f320fb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucaswerey/dslib-pfe",
"version": "0.0.66",
"version": "0.0.67",
"private": false,
"main": "./lib/index.umd.js",
"module": "./lib/index.mjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,25 @@ describe('RankingContainer', () => {
})
await scrollContainer.trigger('mouseup')
})
it('emits the correct events', async () => {
const wrapper = mount(RankingContainer, {
props: {
title: 'Test Title',
labels: [],
topRank: false,
isDraggable: true
}
})

const containerElement = wrapper.find('[data-test="container"]')

await containerElement.trigger('dragstart')
expect(wrapper.emitted()).toHaveProperty('dragstart')

await containerElement.trigger('dragover')
expect(wrapper.emitted()).toHaveProperty('dragover')

await containerElement.trigger('drop')
expect(wrapper.emitted()).toHaveProperty('drop')
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
:topRank="controls.topRank"
:draggable="controls.draggable"
:is-draggable="controls.draggable"
@dragstart="event => console.log('dragstart', event)"
@dragover="event => console.log('dragover', event)"
@drop="event => console.log('drop', event)"
/>
</Variant>
<Variant title="MultipleContainers" auto-props-disabled>
Expand All @@ -44,9 +41,9 @@
:topRank="container.topRank"
draggable="true"
isDraggable
@dragstart="event => handleDragStart(event, index)"
@dragstart="(event: DragEvent) => handleDragStart(event, index)"
@dragover="handleDragOver"
@drop="event => handleDrop(event, index)"
@drop="(event: DragEvent) => handleDrop(event, index)"
/>
</div>
</Variant>
Expand Down

0 comments on commit 2f320fb

Please sign in to comment.