Skip to content

Commit

Permalink
test: updated kcodeblock test case [KHCP-14752]
Browse files Browse the repository at this point in the history
  • Loading branch information
afrzhussain committed Jan 17, 2025
1 parent bade86d commit 4073f5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/KCodeBlock/KCodeBlock.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ describe('KCodeBlock', () => {
renderComponent({ id: 'code-block' })

cy.get('.line').should('have.length', 5)
cy.get('[data-testid="code-block-copy-button"]').should('exist')
cy.get('[data-testid="code-block-copy-button-code-block"]').should('exist')
cy.get('[data-testid="highlighted-code-block"]').contains(code)
})

it('has no copy button when props.showCopyButton is false', () => {
renderComponent({ id: 'code-block', showCopyButton: false })

cy.get('[data-testid="code-block-copy-button"]').should('not.exist')
cy.get('[data-testid="code-block-copy-button-code-block"]').should('not.exist')
})

it('can be searched to highlight matching lines', () => {
Expand Down

0 comments on commit 4073f5b

Please sign in to comment.