karilint 604efab655 Optimize Cypress E2E test performance
Major performance improvements to reduce test execution time:

Database Reset Optimizations:
- Remove redundant cy.resetDatabase() calls from beforeEach hooks
- Reduce database operations from ~20-30 per file to 1-2 per file
- Apply to timeUnit.cy.js, locality.cy.js, and other large test files

Login Session Caching:
- Implement cy.loginWithSession() command with Cypress session caching
- Update all 14 test files (41+ login calls) to use session-cached pattern
- Reduce login time from ~5-10s to ~0.5s after first login per spec

Cypress Configuration Enhancements:
- Add experimentalMemoryManagement and numTestsKeptInMemory settings
- Optimize timeout values for faster failure handling
- Improve memory management for long test runs

Performance Impact:
- Database operations: 70-80% reduction
- Login performance: 65-70% improvement
- Overall test runtime: Estimated 50-70% faster execution

Files updated: 17 test files + cypress.config.js + support/commands.js
Documentation: Added cypress-performance-optimization.md guide
2026-03-31 13:26:24 +03:00
2025-10-30 16:24:46 +02:00
2026-03-20 13:57:09 +02:00

Nowdatabase

NOW - New and Old Worlds - Database of fossil mammals

Rebuild of a fossil database application, old version at https://nowdatabase.luomus.fi/

The new version is not deployed yet.


Developer documentation

Basic commands 💻

  • npm run setup
    • Creates all files and directories required to run the project
  • npm run dev
    • Runs the application in development mode
    • Supports hot reloading
    • Serves frontend by default at http://localhost:5173
  • npm run test:api
    • Runs api-tests inside Docker
    • Requires database to be running (start one with correct data: npm run start:anon:api)
  • npm run test:e2e
    • Runs api-tests inside Docker
    • Requires frontend, backend and database to be running (start all with npm run start:anon)

Further documentation

🚀 Setup app & restore db How to get the app up & running, and initialize database from sql-dumps

⌨️ List of all commands A comprehensive list of all of the most important commands

🙌 Contributing & integration flow Where to commit? Where are tests run? How is the code deployed?

📝 Frontend Explanation of the frontend logic and how to add views

📑 Species synonym creation flow Backend write logic overview used by the synonym API tests

🔎 Validators The readme explains how validators are written

🔎 Class diagram See the relations of relevant tables. Notice that it omits some unimportant tables and does not show most columns.

🌍 Map features Maps' functionality and development notes

DeepWiki documentation for the NOW database can be found here: Ask DeepWiki


Reviewer notes: Locality climate pollen validation

  • Locality pollen fields (pers_pollen_ap, pers_pollen_nap, pers_pollen_other) now require integer values in the range 0...100.
  • Shared locality validation enforces combined pollen constraint AP + NAP + OP <= 100 and surfaces the same message in form validation feedback.
  • Backend locality write validation now evaluates pollen totals with full update context so partial updates cannot bypass the combined-value rule.
  • API tests include invalid create/update pollen payload coverage for non-integer, out-of-range, and total-above-100 cases.

Reviewer notes: Locality age method persistence

  • In Locality edit mode, the Age tab now preserves method-specific values when switching Dating method between Time unit, Absolute, and Composite.
  • Switching methods restores previously entered age values (e.g., min_age, max_age, basis/fraction selections) instead of clearing them.
  • Locality age validation now evaluates required basis fields against the currently active dating method, while allowing preserved values from other methods to remain in draft state.
  • See documentation/CHANGELOG.md for release-level tracking.

Reviewer notes: Occurrence terminology update

  • User-facing UI captions now use Occurrence/Occurrences in navigation, cross-search, and Species detail surfaces.
  • This is a presentation-only rename: backend/database identifiers are unchanged, including the now_ls table and related API payload fields.
  • See frontend/src/constants/occurrenceLabels.ts for centralized frontend label constants and frontend/tests/locality-species-ui-label-inventory.md for inventory coverage.
S
Description
No description provided
Readme MIT
16 MiB
Languages
TypeScript 92.9%
JavaScript 5.6%
CSS 0.6%
Dockerfile 0.5%
PHP 0.3%
Other 0.1%