-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add in-app test runner #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
08b7c6e
feat: add in-app test runner with viewModel tests
mfazekas 0f5ce2a
docs: add attribution comments to testing utilities
mfazekas dcbca12
feat: add react-native-harness CI integration for iOS
mfazekas b2af7df
fix: update iOS simulator version to 18.5 for CI
mfazekas 73fb718
chore: remove build-ios dependency for faster iteration
mfazekas 84fa1d8
fix: follow Nitro's harness CI approach with explicit xcodebuild
mfazekas aff207d
fix: update harness tests for CI compatibility
mfazekas aa23ed0
fix: lint formatting
mfazekas 1e9e132
chore: add debug steps to harness CI for timeout investigation
mfazekas f42b6b2
fix: add enhanced log capture for harness CI debugging
mfazekas f2ef930
chore: remove debug logging from harness CI
mfazekas 2715304
fix: add stabilization delay before harness test and add source link
mfazekas 0b0494b
refactor: move assertion backends to backends/ folder to match Nitro …
mfazekas 0f79fa5
debug: restore full debug logging to diagnose CI flakiness
mfazekas c67823e
debug: remove app launch step, keep only Metro check
mfazekas 70487a7
debug: swap Metro check for app launch to confirm which step helps
mfazekas 37d3798
fix: combine Metro and app warmup into single step
mfazekas bf0e3d6
refactor: use official react-native-harness GitHub Action
mfazekas 1e0d1c7
fix: correct app path relative to projectRoot
mfazekas 1c13b3f
fix: install pnpm for harness action
mfazekas a73c45d
refactor: use react-native-harness expect directly
mfazekas 973b144
style: fix lint errors
mfazekas 17b6dc7
refactor: remove duplicate in-app test runner
mfazekas 6d73602
refactor: share test definitions between harness and in-app runner
mfazekas a1f7e66
fix: use static test registration for harness CI compatibility
mfazekas 9633a25
ci: run harness with yarn instead of pnpm action for debugging
mfazekas d34038c
ci: add debug flags and increase timeout for harness tests
mfazekas e78a05d
ci: disable harness tests temporarily due to timeout issues
mfazekas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { describe, it, beforeAll } from 'react-native-harness'; | ||
| import { RiveFileFactory } from '@rive-app/react-native'; | ||
| import type { RiveFile } from '@rive-app/react-native'; | ||
| import { | ||
| testViewModelBasicFunctionality, | ||
| testReplaceViewModelSharesState, | ||
| } from '../src/testing/suites/viewModelTests'; | ||
|
|
||
| const ASSET_URL = | ||
| 'http://localhost:8081/assets/assets/rive/viewmodelproperty.riv'; | ||
|
|
||
| describe('ViewModel', () => { | ||
| let file: RiveFile; | ||
|
|
||
| beforeAll(async () => { | ||
| file = await RiveFileFactory.fromURL(ASSET_URL, undefined); | ||
| }); | ||
|
|
||
| it('viewModel() basic functionality', () => { | ||
| testViewModelBasicFunctionality(file); | ||
| }); | ||
|
|
||
| it('replaceViewModel() replaces and shares state', () => { | ||
| testReplaceViewModelSharesState(file); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| module.exports = { | ||
| preset: 'react-native', | ||
| preset: 'react-native-harness', | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { androidPlatform, androidEmulator } from '@react-native-harness/platform-android'; | ||
| import { applePlatform, appleSimulator } from '@react-native-harness/platform-apple'; | ||
|
|
||
| // Allow CI to override device/version via environment variables | ||
| const deviceModel = process.env.DEVICE_MODEL || 'iPhone 16 Pro'; | ||
| const iosVersion = process.env.IOS_VERSION || '18.6'; | ||
|
|
||
| export default { | ||
| entryPoint: './index.js', | ||
| appRegistryComponentName: 'RiveExample', | ||
| runners: [ | ||
| androidPlatform({ | ||
| name: 'android', | ||
| device: androidEmulator('Pixel_8_API_35'), | ||
| bundleId: 'rive.example', | ||
| }), | ||
| applePlatform({ | ||
| name: 'ios', | ||
| device: appleSimulator(deviceModel, iosVersion), | ||
| bundleId: 'rive.example', | ||
| }), | ||
| ], | ||
| defaultRunner: 'ios', | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update our runners to use Cirrus: