14bcc960b4
- Created 8 core shared components: Card, PageLayout, PageTabs, DayTabs, CalendarInput, TimeSelector, CityAutocomplete, SearchHistory, PageLoader, PageEmptyList - Fixed SCSS circular dependency: removed self-imports in components/modules-components/index.scss and modules-pages/index.scss - Updated page exports to use feature-based implementations - Added City interface to CityAutocomplete with mock city data - App now loads at localhost:3001 without SCSS errors
28 lines
718 B
TypeScript
28 lines
718 B
TypeScript
describe('Button Component', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/')
|
|
})
|
|
|
|
it('should render button with text', () => {
|
|
cy.get('[data-testid="button"]').should('exist')
|
|
})
|
|
|
|
it('should have correct styling', () => {
|
|
cy.get('[data-testid="button"]')
|
|
.should('have.css', 'padding')
|
|
.should('have.css', 'border-radius')
|
|
})
|
|
|
|
it('should support variant classes', () => {
|
|
cy.get('[data-testid="button"]').should('have.class', 'button')
|
|
})
|
|
|
|
it('should support size classes', () => {
|
|
cy.get('[data-testid="button"]').should('have.class', 'button--medium')
|
|
})
|
|
|
|
it('should handle disabled state', () => {
|
|
cy.get('[data-testid="button"]').should('not.be.disabled')
|
|
})
|
|
})
|