Commit Graph

23 Commits

Author SHA1 Message Date
alexpolo1
8d2db6281c feat: send daily repository status to Discord 2026-08-18 10:07:59 +02:00
alexpolo1
46c0025e49 feat: add AI usage and quote output polish 2026-07-07 21:30:34 +02:00
alexpolo1
01ad8f4a49 feat: consolidate ordrestyring quote workflow 2026-07-05 08:10:59 +00:00
alexpolo1
b096ff55c3 fix: add automatic port cleanup before server start to prevent EADDRINUSE errors 2026-01-21 07:56:56 +00:00
alexpolo1
e736645432 feat: Add task saving to database in Smart Packages + cleanup
Smart Package improvements:
- InlineSmartPackage.js: Add saveTaskToDatabase() to persist tasks
- smartPackagesRoutes.js: Add timeUnit and timePerUnit fields

Fixes:
- package.json: Fix playwright path to use local node_modules

Cleanup:
- .gitignore: Add test-results and playwright-report to ignore
- Remove old backup files from tracking (already in .gitignore)
- Remove test result artifacts from tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 11:04:50 +00:00
alexpolo1
aa69197a2e Add initial test results for carpenter Lars Nielsen's project quote 2025-12-23 02:09:41 +00:00
alexpolo1
c4af45924c feat: Kør alle UI tests mod production environment
 Production Testing Setup
- Ændret Playwright baseURL til https://tilbudsgiveren.alw.dk
- Ændret Selenium baseURL til production
- Alle 14 UI tests kører nu mod live miljø
- Test resultater: 14/14 PASSED (100%)

🎯 Test Coverage på Production
✓ FormField validation virker i prod
✓ LoadingSpinner vises korrekt
✓ Autosave fungerer på live site
✓ Tooltips virker
✓ Performance < 3 sekunder
✓ Accessibility features fungerer
✓ ARIA labels korrekt implementeret
✓ Keyboard navigation virker

🔧 Nye Scripts
- test:pw - Kør Playwright mod production (default)
- test:pw:local - Kør mod localhost hvis nødvendigt
- test:selenium - Kør Selenium mod production
- test:selenium:local - Kør Selenium mod localhost

Nu tester vi samme miljø som kunderne bruger! 🚀
2025-12-22 23:21:26 +00:00
alexpolo1
e38b91255a feat: Complete UI testing setup with Playwright and Selenium
 Playwright Tests Working
- Configured to use system Chrome (/snap/bin/chromium)
- 12 out of 14 tests passing (86% success rate)
- Test coverage: FormField, LoadingSpinner, Autosave, Tooltips
- Performance tests: Page load < 3s, cache validation
- Accessibility tests: ARIA labels, keyboard navigation
- Auto-capture screenshots and videos on failure

 Selenium WebDriver Alternative
- Backup testing framework with Mocha
- Uses same system Chrome binary
- Comprehensive UI component tests
- Cross-platform compatibility

🎯 Test Coverage
- FormField validation (real-time, min length, error clearing)
- LoadingSpinner during form submission
- Autosave indicator (shows 'Gemt' after 2 seconds)
- Tooltip hover/click behavior
- Performance metrics (load time, cache speed)
- Accessibility (ARIA, keyboard navigation, screen readers)

📊 Test Results
✓ Home page loads successfully
✓ FormField validation works
✓ LoadingSpinner appears correctly
✓ Autosave indicator shows
✓ Tooltips display on hover
✓ Full quote creation flow
✓ Performance under 3 seconds
✓ Accessibility features work

🔧 Configuration
- Base URL: http://localhost:4032
- Browser: System Chromium
- Headless mode: Enabled (can run headed with --headed flag)
- Timeout: 60 seconds per test
- Retries: 2 on CI

📝 Documentation
- UI_TESTING_SETUP.md - Complete setup guide
- QUOTE_FLOW_TEST_REPORT.md - API flow validation
- 14 Playwright tests in ui-components.spec.js
- 8 Selenium tests in selenium-ui.test.js

Commands:
  npm run test:ui - Run Playwright tests
  npm run test:pw:headed - Run with visible browser
  npm run test:pw:ui - Interactive test mode
  npm run test:selenium - Run Selenium tests
  npm run test:ui:all - Run all UI tests

This fixes the CachyOS Playwright compatibility issue and enables
comprehensive UI/UX testing for all carpenter features.
2025-12-22 23:03:25 +00:00
alexpolo1
c5c5a70643 tests1 2025-11-24 23:08:04 +00:00
alexpolo1
8773d96e94 feat: Add AI-Powered Visual Testing Suite using Selenium and OpenAI Vision API
- Implemented VisualAITester class for automated UI/UX testing
- Configured environment variables for API keys and paths
- Developed methods for browser setup, login, screenshot capture, and image encoding
- Integrated OpenAI Vision API for visual quality analysis with detailed feedback
- Created tests for various application pages including homepage, project flow, geometry form, and more
- Generated comprehensive HTML report summarizing test results and AI analysis
- Added functionality to copy AI prompts for automated issue resolution
2025-11-14 20:27:19 +00:00
alexpolo1
910b8eb94c Add complete Selenium test suite for Tilbudgivern application
- Implemented authentication tests including valid login and logout
- Developed navigation tests for various sections: Projekt Flow, Planlægning, Materialer, Smart Pakker, Nøgletal, and AI Budget
- Created end-to-end tests for project flow including project creation and geometry input
- Added countdown tests to verify countdown functionality and text format
- Included detailed logging of test results and execution summary
- Configured WebDriver setup with headless option for CI/CD compatibility
- Integrated screenshot functionality for error tracking
2025-11-14 14:16:00 +00:00
alexpolo1
99a31cb3cb fix: Downgrade dependencies for Node.js compatibility and add engines field 2025-11-07 08:08:24 +00:00
alexpolo1
26d3452d59 Add comprehensive tests for API verification, frontend integration, and PDF generation
- Implemented a new test suite for production API verification using curl, ensuring all critical endpoints respond correctly and return valid JSON.
- Added frontend integration tests to check for critical errors in the UI and verify key UI elements are present and functional.
- Created test data for quotes and project calculations to facilitate testing.
- Developed a script to check offers in the Ordrestyring system, including detailed task descriptions.
- Added tests for generating PDFs from quote data, ensuring the output is valid and contains expected information.
- Implemented a test script for the Røsevangen project, integrating with the Ordrestyring API and verifying database entries.
2025-11-07 08:02:07 +00:00
alexpolo1
1d96d69a58 feat(graphql): Implement comprehensive GraphQL queries for hours, hour types, and business hours
feat(graphql): Create a GraphQL client for improved API interaction and error handling

chore(deprecated): Disable deprecated REST endpoints and notify users of changes

feat(mapping): Develop a script to map Bygma products to categories based on varegrp codes

chore(lock): Update lock file for ordrestyring comprehensive sync

test(graphql): Add tests for new GraphQL endpoints and identify unused code

test(migration): Complete migration tests for GraphQL endpoints and cleanup

test(calendar): Implement tests for calendar and hours GraphQL integration

test(offer): Create tests for GraphQL offer creation endpoint

test(work-breakdown): Add tests for work breakdown and case details endpoints
2025-10-23 22:01:33 +00:00
alexpolo1
2d7218d67e feat: Implement TaskDialog component for managing tasks in smart packages
- Added TaskDialog component with functionality to create and edit tasks.
- Integrated form validation and error handling for task inputs.
- Implemented step management within tasks, including adding and deleting steps.
- Styled TaskDialog with CSS for improved user experience.

feat: Create SmartPackagesRoutes for navigation and routing

- Established routing for smart packages, including create and edit functionalities.
- Added loading state management for better user feedback during data fetching.
- Integrated SmartPackagesMenu for navigation within the smart packages section.

feat: Add utility functions for formatting data

- Implemented formatting utilities for currency, time, date, and percentages.
- Ensured consistent formatting across the application for better readability.

chore: Update database schema for smart packages

- Extended material_packages table with new fields for estimated hours, hourly rate, and difficulty level.
- Created smart_package_tasks and smart_package_steps tables for task management.
- Added foreign key relationships and indexes for improved database performance.

test: Add API tests for smart packages functionality

- Created test suite for validating smart packages API endpoints.
- Included tests for CRUD operations on smart packages and retrieval of categories and types.
2025-10-22 19:29:21 +00:00
9f74ec8949 Add initial test suite configuration with Jest and Supertest
- Created package.json for the test suite "tilbudgivern-tests"
- Added scripts for running tests, watching tests, and generating coverage reports
- Included Jest and Supertest as development dependencies
- Configured Jest with a test environment, test match pattern, and coverage collection settings
- Specified coverage output directory
2025-09-26 00:14:38 +02:00
e45aad27db feat: Update file paths in scripts and add LocalOrdrestyringAnalyzer class for database analysis 2025-09-24 15:27:29 +02:00
fc40f65fec Add project data, quotes, and real project details for Kunda a/s
- Created test_project_data.json with project details including customer information, project description, and counts for geometry, labor, materials, and quotes.
- Added test_quote_data.json containing company information, project details, geometry, labor, materials, and calculation summary.
- Introduced test_real_project.json with comprehensive project data including labor, materials, and detailed calculations.
- Generated updated_real_project_quote.pdf reflecting the latest project quote details.
2025-09-17 15:13:52 +02:00
d44cfaabdc Refactor code structure for improved readability and maintainability 2025-09-17 10:29:17 +02:00
8ad6c494fb Add mock server and database for Bygma pricing test
- Implemented a mock Express server in `mock-bygma-test.js` to simulate Bygma's web price search API with sample data.
- Created a new SQL file `standard_material_prices.sql` containing standard market prices for various construction materials.
- Added initial files for frontend server and pricing test components.
2025-09-15 00:13:47 +02:00
185eb7664a fix: resolve React frontend path issue causing white screen
- Problem: __dirname resolved to /data/home/alex/git/tilbudgivern in PM2
- Solution: Use absolute paths for frontend build serving
- Changed from path.join(__dirname, 'frontend/build') to absolute path
- Now serving from /home/alex/git/tilbudgivern/frontend/build
- JavaScript and CSS files load correctly with HTTP 200 status
- Fixes white screen issue in all tabs including tømrer and materiale priser
2025-09-14 22:11:07 +02:00
535ead3c12 Refactor project structure and unify frontend and backend into a single application
- Renamed project to "tilbudgivern-unified" and updated package.json accordingly.
- Created a new frontend server to proxy API requests and serve static files.
- Added SQL scripts for inserting sample data and setting up pricing tables.
- Configured Nginx for both HTTP and HTTPS with security headers and proxy settings.
- Implemented a unified server to handle API requests and serve the frontend application.
- Added endpoints for labor and material pricing management, including CRUD operations.
- Introduced testing script for frontend API interaction.
2025-09-14 21:15:00 +02:00
5f101c61cf feat: Initialize Tilbudgivern project with backend and frontend setup
- Added package.json for project dependencies and scripts
- Created setup_mariadb.sql for database setup and user creation
- Documented project development plan in taskfile.txt
- Implemented test_setup.sh for system requirements and project structure checks
- Configured systemd service files for backend and frontend applications
- Added ubu-deployment-commands.sh for deployment instructions on Ubu server
2025-09-12 00:39:06 +02:00