UNPKG

@wdio/image-comparison-core

Version:

Image comparison core module for @wdio/visual-service - WebdriverIO visual testing framework

83 lines (55 loc) โ€ข 3.13 kB
# @wdio/image-comparison-core ## 1.0.0 ### Major Changes - 1326e99: ## ๐Ÿ’ฅ Major Release: New @wdio/image-comparison-core Package ### ๐Ÿ—๏ธ Architectural Refactor This release introduces a **completely new core architecture** with the dedicated `@wdio/image-comparison-core` package, replacing the generic `webdriver-image-comparison` module with a WDIO-specific solution. #### What was the problem? - The old `webdriver-image-comparison` package was designed for generic webdriver usage - Complex integration between generic and WDIO-specific code - Limited test coverage (~58%) making maintenance difficult - Mixed responsibilities between core logic and service integration #### What changed? โœ… **New dedicated core package**: `@wdio/image-comparison-core` - purpose-built for WebdriverIO โœ… **Cleaner architecture**: Modular design with clear separation of concerns โœ… **Enhanced test coverage**: Improved from ~58% to ~90% across all metrics โœ… **Better maintainability**: Organized codebase with comprehensive TypeScript interfaces โœ… **WDIO-specific dependencies**: Only depends on `@wdio/logger`, `@wdio/types`, etc. ### ๐Ÿงช Testing Improvements - **100% branch coverage** on critical decision points - **Comprehensive unit tests** for all major functions - **Optimized mocks** for complex scenarios - **Better test isolation** and reliability | Before/After | % Stmts | % Branch | % Funcs | % Lines | | ------------------ | ------- | -------- | ------- | ------- | | **Previous** | 58.59 | 91.4 | 80.71 | 58.59 | | **After refactor** | 90.55 | 96.38 | 93.99 | 90.55 | ### ๐Ÿ”ง Service Integration The `@wdio/visual-service` now imports from the new `@wdio/image-comparison-core` package while maintaining the same public API and functionality for users. ### ๐Ÿ“ˆ Performance & Quality - **Modular architecture**: Easier to maintain and extend - **Type safety**: Comprehensive TypeScript coverage - **Clean exports**: Well-defined public API - **Internal interfaces**: Proper separation of concerns ### ๐Ÿ”„ Backward Compatibility โœ… **No breaking changes** for end users โœ… **Same public API** maintained โœ… **Existing configurations** continue to work โœ… **All existing functionality** preserved ### ๐ŸŽฏ Future Benefits This refactor sets the foundation for: - Easier addition of new features - Better bug fixing capabilities - Enhanced mobile and native app support - More reliable MultiRemote functionality ### ๐Ÿ“ฆ Dependency Updates - Updated most dependencies to their latest versions - Improved security with latest package versions - Better compatibility with current WebdriverIO ecosystem - Enhanced performance through updated dependencies - Remove unused packages *** **Note**: This is an architectural improvement that modernizes the codebase while maintaining full backward compatibility. All existing functionality remains unchanged for users. *** ## Committers: 1 - Wim Selles ([@wswebcreation](https://github.com/wswebcreation))