@uuv/dictionary
This package provides a built-in set of Cucumber sentences for writing end-to-end tests with UUV. It includes translations in English and French, along with accessibility role-based sentence generation.
Features
- Built-in Cucumber sentences for E2E testing
- Support for multiple languages (English and French)
- Role-based sentence generation for accessibility
- Integration-ready with Cypress, Playwright, and Testing Library
Installation
npm install @uuv/dictionary
Usage
Import the dictionary in your test files:
import { getDefinedDictionary } from '@uuv/dictionary';
const dictionary = getDefinedDictionary('en'); // or 'fr' for French
Available Dictionaries
- English (
en) - French (
fr)
Structure
The package contains:
- Base Sentences: General sentences for common actions
- Role-based Sentences: Context-specific sentences based on accessibility roles
- Language Support: Translations in English and French
- Accessibility Integration: Role-based sentence generation
Development
Building
Run nx build dictionary to build the library.
Running Unit Tests
Run nx test dictionary to execute the unit tests via Jest.
Linting
Run nx lint dictionary to lint the codebase.