Skip to content

Commit

Permalink
Merge pull request #153 from wizelineacademy/prueba-button
Browse files Browse the repository at this point in the history
fix: Fixed secondary button test
  • Loading branch information
JulioEmmmanuel authored Jun 12, 2024
2 parents 77c20a3 + 6e13175 commit d8f6709
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
15 changes: 15 additions & 0 deletions src/components/buttons/SecondaryButton.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// src/components/buttons/SecondaryButton.test.tsx

import React from 'react'
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom'
import { Button } from './secondaryButton'
import { expect } from 'vitest'

describe('SecondaryButton Component', () => {
it('renders the button with the correct label', () => {
render(<Button variant='secondary'>Click Me</Button>)

expect(screen.getByText('Click Me')).toBeInTheDocument()
})
})
3 changes: 1 addition & 2 deletions src/components/buttons/secondaryButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { cn } from '../../lib/utils'
import * as React from 'react'
import { Slot } from '@radix-ui/react-slot'
import { cva, type VariantProps } from 'class-variance-authority'

import { cn } from '@/src/lib/utils'

const buttonVariants = cva(
'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
{
Expand Down

0 comments on commit d8f6709

Please sign in to comment.