Skip to content

test: add Badge component tests#534

Merged
netchampfaris merged 4 commits intocypress-component-testingfrom
copilot/sub-pr-533
Jan 8, 2026
Merged

test: add Badge component tests#534
netchampfaris merged 4 commits intocypress-component-testingfrom
copilot/sub-pr-533

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

Added comprehensive Cypress component tests for the Badge component to prevent regressions.

Coverage

  • All themes: gray, blue, green, orange, red
  • All variants: solid, subtle, outline, ghost
  • All sizes: sm, md, lg
  • Label prop (string and numeric)
  • Prefix/suffix slots with size constraints
  • Layout classes

Implementation

Uses .inline-flex.rounded-full selectors for robust DOM targeting, consistent with existing Button and TextEditor test patterns.

it('renders different themes with subtle variant', () => {
  cy.mount(Badge, { props: { theme: 'blue', label: 'Blue' } })
  cy.get('.inline-flex.rounded-full').should('have.class', 'text-ink-blue-2')
  cy.get('.inline-flex.rounded-full').should('have.class', 'bg-surface-blue-1')
})

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 8, 2026 13:44
Co-authored-by: netchampfaris <9355208+netchampfaris@users.noreply.github.com>
Co-authored-by: netchampfaris <9355208+netchampfaris@users.noreply.github.com>
Co-authored-by: netchampfaris <9355208+netchampfaris@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 8, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /usr/local/bin/node node dist/index.js --exec install (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node dist/index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add tests for Badge component test: add Badge component tests Jan 8, 2026
Copilot AI requested a review from netchampfaris January 8, 2026 13:51
@netchampfaris netchampfaris marked this pull request as ready for review January 8, 2026 14:00
@netchampfaris netchampfaris merged commit 7acaacb into cypress-component-testing Jan 8, 2026
1 check passed
@netchampfaris netchampfaris deleted the copilot/sub-pr-533 branch January 8, 2026 14:00
siduck pushed a commit that referenced this pull request Jan 27, 2026
Co-authored-by: netchampfaris <9355208+netchampfaris@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants