diff --git a/src/components/KInput/KInput.cy.ts b/src/components/KInput/KInput.cy.ts index a9fbfb4b81..196b74b701 100644 --- a/src/components/KInput/KInput.cy.ts +++ b/src/components/KInput/KInput.cy.ts @@ -82,7 +82,9 @@ describe('KInput', () => { cy.get('.k-input-label .kong-icon-infoFilled').should('exist').and('be.visible') }) - it.skip('renders label with required symbol when `required` attribute is set', () => { }) + it.skip('renders label with required symbol when `required` attribute is set', () => { + // TODO: implement when KLabel component is reskinned + }) it('renders help when value is passed', () => { const helpText = 'I am helpful' @@ -108,7 +110,7 @@ describe('KInput', () => { cy.get('.k-input-wrapper .over-char-limit').should('not.exist') cy.get('.k-input-wrapper input.k-input').type(`This input has ${textCharCount} characters`) - cy.get('.k-input-wrapper.error .help-text').should('contain.text', `${textCharCount} / ${charLimit}`) + cy.get('.k-input-wrapper.has-error .help-text').should('contain.text', `${textCharCount} / ${charLimit}`) }) it('reacts to text changes', () => { @@ -130,7 +132,27 @@ describe('KInput', () => { }) }) - it.skip('renders before slot when passed', () => { }) + it('renders before slot when passed', () => { + const beforeSlot = 'before-slot' + + mount(KInput, { + slots: { + before: `Before slot`, + }, + }) + + cy.get('.k-input-wrapper').find(`[data-testid="${beforeSlot}"]`).should('be.visible') + }) - it.skip('renders after slot when passed', () => { }) + it('renders after slot when passed', () => { + const afterSlot = 'after-slot' + + mount(KInput, { + slots: { + before: `After slot`, + }, + }) + + cy.get('.k-input-wrapper').find(`[data-testid="${afterSlot}"]`).should('be.visible') + }) })