-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Import buttons to run tests more easily (#6216)
## Summary ![image](https://github.com/user-attachments/assets/304f53ba-5a9c-47ad-a5ff-1d0480175644) ## Android Header Fix This PR should fix problem with additional value added to "top" property on Android. It fixes test cases similar to: withSequence -> Cascade of callbacks -> Test that all callbacks have been called a correct number of times, this test case includes snapshot including top property. ## Test plan I've run all tests on paper, on both IOS and Anroid and didn't notice any unexpected failures. Several failures of layout transition tests were expected, as their timing was updated after test creation.
- Loading branch information
Showing
4 changed files
with
188 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
101 changes: 76 additions & 25 deletions
101
apps/common-app/src/examples/RuntimeTests/RuntimeTestsExample.tsx
This file contains 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,30 +1,81 @@ | ||
import React from 'react'; | ||
import RuntimeTestsRunner from './ReanimatedRuntimeTestsRunner/RuntimeTestsRunner'; | ||
|
||
// load tests | ||
import './tests/TestsOfTestingFramework.test'; | ||
|
||
import './tests/animations'; | ||
|
||
import './tests/core/cancelAnimation.test'; | ||
|
||
import './tests/utilities/relativeCoords.test'; | ||
|
||
import './tests/layoutAnimations/entering/enteringColors.test'; | ||
import './tests/layoutAnimations/entering/predefinedEntering.test'; | ||
|
||
import './tests/layoutAnimations/exiting/predefinedExiting.test'; | ||
|
||
import './tests/layoutAnimations/layout/predefinedLayoutPosition.test'; | ||
|
||
import './tests/advancedAPI/useFrameCallback.test'; | ||
// import './tests/advancedAPI/measure.test'; crash on Android | ||
|
||
import './tests/core/useSharedValue.test'; | ||
import './tests/core/useAnimatedStyle/reuseAnimatedStyle.test'; | ||
import './tests/core/useDerivedValue/basic.test'; | ||
import './tests/core/useDerivedValue/chain.test'; | ||
import { describe } from './ReanimatedRuntimeTestsRunner/RuntimeTestsApi'; | ||
|
||
export default function RuntimeTestsExample() { | ||
return <RuntimeTestsRunner />; | ||
return ( | ||
<RuntimeTestsRunner | ||
importButtons={[ | ||
{ | ||
skipByDefault: true, | ||
testSuiteName: 'Tests of testing framework', | ||
importTest: () => { | ||
require('./tests/TestsOfTestingFramework.test'); | ||
}, | ||
}, | ||
{ | ||
testSuiteName: 'animations', | ||
importTest: () => { | ||
describe('*****withTiming***** ⏰', () => { | ||
require('./tests/animations/withTiming/arrays.test'); | ||
require('./tests/animations/withTiming/basic.test'); | ||
require('./tests/animations/withTiming/objects.test'); | ||
require('./tests/animations/withTiming/colors.test'); | ||
require('./tests/animations/withTiming/easing.test'); | ||
require('./tests/animations/withTiming/transformMatrices.test'); | ||
}); | ||
describe('*****withSpring*****', () => { | ||
require('./tests/animations/withSpring/variousConfig.test'); | ||
}); | ||
describe('*****withDecay*****', () => { | ||
require('./tests/animations/withDecay/basic.test'); | ||
}); | ||
describe('*****withSequence*****', () => { | ||
require('./tests/animations/withSequence/callbackCascade.test'); | ||
require('./tests/animations/withSequence/cancelAnimation.test'); | ||
require('./tests/animations/withSequence/numbers.test'); | ||
require('./tests/animations/withSequence/arrays.test'); | ||
require('./tests/animations/withSequence/colors.test'); | ||
}); | ||
describe('*****withDelay*****', () => { | ||
require('./tests/animations/withDelay/keepSnapshot.test'); | ||
require('./tests/animations/withDelay/addDelays.test'); | ||
}); | ||
}, | ||
}, | ||
{ | ||
testSuiteName: 'core', | ||
importTest: () => { | ||
require('./tests/core/cancelAnimation.test'); | ||
require('./tests/core/useSharedValue.test'); | ||
require('./tests/core/useAnimatedStyle/reuseAnimatedStyle.test'); | ||
require('./tests/core/useDerivedValue/basic.test'); | ||
require('./tests/core/useDerivedValue/chain.test'); | ||
}, | ||
}, | ||
{ | ||
testSuiteName: 'utilities', | ||
importTest: () => { | ||
require('./tests/utilities/relativeCoords.test'); | ||
}, | ||
}, | ||
{ | ||
testSuiteName: 'layoutAnimations', | ||
importTest: () => { | ||
require('./tests/layoutAnimations/entering/enteringColors.test'); | ||
require('./tests/layoutAnimations/entering/predefinedEntering.test'); | ||
require('./tests/layoutAnimations/exiting/predefinedExiting.test'); | ||
require('./tests/layoutAnimations/layout/predefinedLayoutPosition.test'); | ||
}, | ||
}, | ||
{ | ||
testSuiteName: 'advancedAPI', | ||
importTest: () => { | ||
require('./tests/advancedAPI/useFrameCallback.test'); | ||
// require('./tests/advancedAPI/measure.test'); // crash on Android | ||
}, | ||
}, | ||
]} | ||
/> | ||
); | ||
} |
This file contains 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
29 changes: 0 additions & 29 deletions
29
apps/common-app/src/examples/RuntimeTests/tests/animations/index.tsx
This file was deleted.
Oops, something went wrong.