- Added unit and end-to-end testing scripts to package.json. - Included detox for end-to-end testing and jest-circus for improved test execution. feat: add testID to LandingScreen logo for better testing - Added testID attribute to the logo image in LandingScreen for easier identification in tests. feat: create tokens.ts to re-export design tokens - Introduced tokens.ts to re-export shared design tokens from lightTheme for consistent imports.
49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
/**
|
|
* Detox configuration with both attached-device and emulator options.
|
|
* A helper script (e2e/run-detox.js) will pick the attached device if present,
|
|
* otherwise fall back to the emulator configuration.
|
|
*/
|
|
module.exports = {
|
|
testRunner: {
|
|
$0: 'jest',
|
|
args: {
|
|
config: 'e2e/jest.config.js',
|
|
_: ['e2e']
|
|
}
|
|
},
|
|
devices: {
|
|
'android.attached': {
|
|
type: 'android.attached',
|
|
device: {
|
|
adbName: '.*' // match any attached device
|
|
}
|
|
},
|
|
'android.emulator': {
|
|
type: 'android.emulator',
|
|
device: {
|
|
avdName: 'Pixel_3a_API_30_x86'
|
|
}
|
|
}
|
|
},
|
|
apps: {
|
|
'android.debug': {
|
|
type: 'android.apk',
|
|
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
|
|
build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..',
|
|
testBinaryPath: 'android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk',
|
|
reversePorts: [8081],
|
|
launchTimeout: 120000 // wait up to 2 min for the app to connect (Metro must be running)
|
|
}
|
|
},
|
|
configurations: {
|
|
'android.attached+android.debug': {
|
|
device: 'android.attached',
|
|
app: 'android.debug'
|
|
},
|
|
'android.emu.debug+android.debug': {
|
|
device: 'android.emulator',
|
|
app: 'android.debug'
|
|
}
|
|
}
|
|
};
|