Skip to content

Commit

Permalink
tests: add non regression UI tests with snapshot comparisons (#78) (#102
Browse files Browse the repository at this point in the history
)

Add UI tests using tool making screenshots / snapshots comparisons

Reviewed-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Co-authored-by: Pierre-Yves Lapersonne <[email protected]>
Co-authored-by: Ludovic Pinel <[email protected]>
  • Loading branch information
ludovic35 and pylapp authored Sep 18, 2024
1 parent c2891bd commit 9b14e75
Show file tree
Hide file tree
Showing 28 changed files with 596 additions and 33 deletions.
24 changes: 24 additions & 0 deletions .github/DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,29 @@ To build the demo application follow those steps:

_To be defined soon_

## Run tests

### Tests for OUDS package

To run these unit tests follow some steps:

1. `cd Showcase`
2. `bundle exec pod install`
3. Open *Showcase.xcworkspace*
4. Select *Showcase* scheme
5. Run tests (Product -> Test)

### UI Tests in demo app

To run these UI tests follow some steps:

1. `cd Showcase`
2. `bundle exec pod install`
3. Open *Showcase.xcworkspace*
4. Select *ShowcaseTests* scheme
5. Select the **iPhone 15 Pro simulator** (for now)
6. Run tests (Product -> Test)

## Build phases

The project contains several custom build phases so as to automatize several steps:
Expand All @@ -65,6 +88,7 @@ The Xcode project contains two targets:

1. _Showcase_ for the demo application
2. _Periphery_ to look for dead code in the source code
3. _ShowcaseTests_ for UI tests in demo app

## Certificates, profiles and identifiers

Expand Down
25 changes: 13 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- [Tests] Add UI regression tests using snapshot comparisons with *swift-snapshot-testing* tool ([#78](https://github.com/Orange-OpenSource/ouds-ios/issues/78))
- [DemoApp] Display fake components for elevation rendering tests
- [Library] A theme can now override the custom font family
- [Library] Add more unit tests for theme overriding and raw tokens controls
- [Tests] Add more unit tests for theme overriding and raw tokens controls
- [Library] Add and update raw and semantic grid tokens ([#40](https://github.com/Orange-OpenSource/ouds-ios/issues/40))
- [Library] Manage regular and compact layouts for sizing and spacing tokens
- [Library] "Box shadow 0" has been defined and "elevation drag" changed
Expand All @@ -29,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Doc] Add more details in release documentation
- [Library] Rename semantic token "opacityEmphasized" to "opacityStrong" ([#94](https://github.com/Orange-OpenSource/ouds-ios/issues/94))
- [Library] Update value of opacity raw token "opacity800" from 0.88 to 0.80 ([#87](https://github.com/Orange-OpenSource/ouds-ios/issues/87))
- [Library] Add missing unit tests for opacity raw tokens
- [Tests] Add missing unit tests for opacity raw tokens
- [Library] "OUDSThemesCommons" product has been renamed to "OUDS"

### Removed
Expand All @@ -47,22 +48,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- [Library] Add simple logger for console outputs
- [Library] Add unit tests for Sosh brand colors raw tokens
- [Library] Add unit tests for Orange brand colors raw tokens
- [Library] Add unit tests for foundations
- [Library] Add unit tests for raw tokens and semantic tokens for colors
- [Tests] Add unit tests for Sosh brand colors raw tokens
- [Tests] Add unit tests for Orange brand colors raw tokens
- [Tests] Add unit tests for foundations
- [Tests] Add unit tests for raw tokens and semantic tokens for colors
- [Library] Add draft of raw tokens and semantic tokens for grids

### Changed

- [Library] Redefine Swift Package with clearer path for sources, tests cases and test plan
- [Library] Expose product "OUDSThemesCommons" instead of "OUDSThemesShared"
- [Library] Improve unit tests for elevation semantic tokens
- [Library] Improve unit tests for typography raw tokens
- [Library] Improve unit tests for opacity raw tokens
- [Library] Improve unit tests for elevations raw tokens
- [Library] Improve unit tests for dimensions raw tokens
- [Library] Improve unit tests for borders raw tokens
- [Tests] Improve unit tests for elevation semantic tokens
- [Tests] Improve unit tests for typography raw tokens
- [Tests] Improve unit tests for opacity raw tokens
- [Tests] Improve unit tests for elevations raw tokens
- [Tests] Improve unit tests for dimensions raw tokens
- [Tests] Improve unit tests for borders raw tokens

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// Software description: A SwiftUI components library with code examples for Orange Unified Design System
//

import Foundation
import OUDS
import SwiftUI

Expand Down
Loading

0 comments on commit 9b14e75

Please sign in to comment.