mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-06 14:46:20 -04:00
* Bump detox * Update detox * Disable one test for now * Bump detox * Increase test timeouts * Collect more logs * Increase run timeout * Comment * Increase timeout * Replace password autofill workaround * Move workaround after launchApp * Upgrade github actions workflows * Forgot one action * Update test.yml * Testing concurrency * Use concurrency for e2e as well * Remove previous concurrency code * Testing different Slack action * Change slack msg * Try different msg * Revert "Try different msg" This reverts commitddaad331d1. * Revert "Change slack msg" This reverts commit852204b074. * Revert "Testing different Slack action" This reverts commitfb072e65e3. * Testing some more notify * Testing notification * Revert "Testing notification" This reverts commit974dfcb32f. * Revert "Testing some more notify" This reverts commit39b3d668e2.
37 lines
1.6 KiB
JavaScript
37 lines
1.6 KiB
JavaScript
import { execSync } from "child_process";
|
|
|
|
export async function iNatE2eBeforeAll( device ) {
|
|
if ( device.getPlatform() === "android" ) {
|
|
await device.launchApp( {
|
|
newInstance: true,
|
|
permissions: { location: "always" }
|
|
} );
|
|
}
|
|
}
|
|
|
|
export async function iNatE2eBeforeEach( device ) {
|
|
// device.launchApp would be preferred for an app of our complexity. It does work locally
|
|
// for both, but on CI for Android it does not work. So we use reloadReactNative for Android.
|
|
if ( device.getPlatform() === "android" ) {
|
|
await device.reloadReactNative();
|
|
} else {
|
|
await device.launchApp( {
|
|
newInstance: true,
|
|
permissions: { location: "always" }
|
|
} );
|
|
// disable password autofill
|
|
execSync(
|
|
// eslint-disable-next-line max-len
|
|
`plutil -replace restrictedBool.allowPasswordAutoFill.value -bool NO ~/Library/Developer/CoreSimulator/Devices/${device.id}/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles/UserSettings.plist`
|
|
);
|
|
execSync(
|
|
// eslint-disable-next-line max-len
|
|
`plutil -replace restrictedBool.allowPasswordAutoFill.value -bool NO ~/Library/Developer/CoreSimulator/Devices/${device.id}/data/Library/UserConfigurationProfiles/EffectiveUserSettings.plist`
|
|
);
|
|
execSync(
|
|
// eslint-disable-next-line max-len
|
|
`plutil -replace restrictedBool.allowPasswordAutoFill.value -bool NO ~/Library/Developer/CoreSimulator/Devices/${device.id}/data/Library/UserConfigurationProfiles/PublicInfo/PublicEffectiveUserSettings.plist`
|
|
);
|
|
}
|
|
}
|