fix: update routing to show online board at /, fix component tests

- Changed root route (/) to show OnlineBoardStartPage directly instead of redirecting
- Updated component tests to visit /components route
- Fixed button component test assertions (CSS checks and disabled state verification)
This commit is contained in:
gnezim
2026-04-06 00:31:58 +03:00
parent f08a86c453
commit 483e034e63
12 changed files with 20 additions and 13 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import { defineConfig } from 'cypress'
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:3001',
baseUrl: 'http://127.0.0.1:3001',
supportFile: 'cypress/support/index.ts',
specPattern: ['cypress/integration/**/*.cy.ts', 'cypress/integration/**/*.spec.ts'],
viewportWidth: 1440,
@@ -1,6 +1,6 @@
describe('Button Component', () => {
beforeEach(() => {
cy.visit('/')
cy.visit('/components')
})
it('should render button with text', () => {
@@ -8,9 +8,10 @@ describe('Button Component', () => {
})
it('should have correct styling', () => {
cy.get('[data-testid="button"]')
.should('have.css', 'padding')
.should('have.css', 'border-radius')
cy.get('[data-testid="button"]').should(($btn) => {
expect($btn).to.have.css('padding')
expect($btn).to.have.css('border-radius')
})
})
it('should support variant classes', () => {
@@ -22,6 +23,7 @@ describe('Button Component', () => {
})
it('should handle disabled state', () => {
cy.get('[data-testid="button"]').should('not.be.disabled')
cy.get('[data-testid="button"]').first().should('not.be.disabled')
cy.get('[data-testid="button-showcase"] button').last().should('be.disabled')
})
})
@@ -3,7 +3,7 @@ import { dataHelpers } from '../../support/helpers/data-helpers'
describe('DatePicker Component Tests', () => {
beforeEach(() => {
cy.visit('/')
cy.visit('/components')
})
describe('DatePicker Display', () => {
@@ -2,7 +2,7 @@ import { uiHelpers } from '../../support/helpers/ui-helpers'
describe('Input Component Tests', () => {
beforeEach(() => {
cy.visit('/')
cy.visit('/components')
})
describe('Input Display', () => {
@@ -2,7 +2,7 @@ import { uiHelpers } from '../../support/helpers/ui-helpers'
describe('Modal Component Tests', () => {
beforeEach(() => {
cy.visit('/')
cy.visit('/components')
})
describe('Modal Display', () => {
@@ -2,7 +2,7 @@ import { uiHelpers } from '../../support/helpers/ui-helpers'
describe('Tabs Component Tests', () => {
beforeEach(() => {
cy.visit('/')
cy.visit('/components')
})
describe('Tabs Display', () => {