Files
flights_web_raw/e2e/cypress/integration/components/button.cy.ts
T
gnezim 14bcc960b4 feat: create shared component stubs and fix SCSS circular imports
- 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
2026-04-06 00:07:38 +03:00

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')
})
})