Skip to content

Commit

Permalink
Add cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
george-aidonidis committed Nov 13, 2024
1 parent e048b5d commit 8d9d494
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 17 additions & 0 deletions cypress/component/Input.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,21 @@ describe('Input', () => {
variant: 'error-status/after-focused',
})
})

it('shows the `X` when hover over the input', () => {
cy.mount(
<Container padded='small'>
<Input
enableReset
value='Text'
testIds={{ resetButton: 'reset-button' }}
/>
</Container>
)

cy.getByTestId('reset-button').should('not.be.visible')
// making sure that we hover over the very end of the input not just the text of the input
cy.getByTestId('reset-button').realHover()
cy.getByTestId('reset-button').should('be.visible')
})
})
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
"webpack": "^5.0.0",
"yaml": "2",
"micromatch": "^4.0.8"

},
"devDependencies": {
"@actions/core": "^1.10.0",
Expand Down

0 comments on commit 8d9d494

Please sign in to comment.