mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
* Update gradle.properties * Update Podfile * Update react-native-mmkv * Update Podfile.lock * Delete useObservationsUpdatesWhenFocused.test.js * Update closeOnboarding.js * Fix failing button tap in e2e tests * Create react-native-sensitive-info+6.0.0-alpha.9.patch * Update bottom-sheets * Refactor e2e timeout to file-wide const * Remove check that fails * Check for entire list item instead of comments count * Longer delay to wait for observation deletion to make UI disappear
20 lines
778 B
JavaScript
20 lines
778 B
JavaScript
import {
|
|
by, element, waitFor
|
|
} from "detox";
|
|
|
|
const TIMEOUT = 10_000;
|
|
|
|
export default async function switchPowerMode() {
|
|
const drawerButton = element( by.id( "OPEN_DRAWER" ) );
|
|
await waitFor( drawerButton ).toBeVisible().withTimeout( TIMEOUT );
|
|
await drawerButton.tap( { x: 0, y: 0 } );
|
|
// Tap the settings drawer menu item
|
|
const settingsDrawerMenuItem = element( by.id( "settings" ) );
|
|
await waitFor( settingsDrawerMenuItem ).toBeVisible().withTimeout( TIMEOUT );
|
|
await settingsDrawerMenuItem.tap();
|
|
// Switch settings to advanced interface mode
|
|
const advancedInterfaceSwitch = element( by.id( "advanced-interface-switch.switch" ) );
|
|
await waitFor( advancedInterfaceSwitch ).toBeVisible().withTimeout( TIMEOUT );
|
|
await advancedInterfaceSwitch.tap();
|
|
}
|