Files
iNaturalistReactNative/e2e/sharedFlows/switchPowerMode.js
Amanda Bullington 1c59f89a14 Add functionality for advanced iNaturalist mode (#2591)
* Add functionality for advanced iNaturalist mode

* Fix language settings test by toggling advanced mode on

* Fix e2e tests by adding advanced user toggle

* Fix more tests in Settings with advanced toggle
2024-12-26 21:35:27 -08:00

22 lines
998 B
JavaScript

import {
by, element, waitFor
} from "detox";
export default async function switchPowerMode() {
const drawerButton = element( by.id( "OPEN_DRAWER" ) );
await waitFor( drawerButton ).toBeVisible().withTimeout( 10000 );
await drawerButton.tap();
// Tap the settings drawer menu item
const settingsDrawerMenuItem = element( by.id( "settings" ) );
await waitFor( settingsDrawerMenuItem ).toBeVisible().withTimeout( 10000 );
await settingsDrawerMenuItem.tap();
// Tap the settings radio button for advanced interface mode
const advancedInterfaceRadioButton = element( by.id( "advanced-interface-option" ) );
await waitFor( advancedInterfaceRadioButton ).toBeVisible().withTimeout( 10000 );
await advancedInterfaceRadioButton.tap();
// Tap the settings radio button for power user mode
const powerUserRadioButton = element( by.id( "all-observation-option" ) );
await waitFor( powerUserRadioButton ).toBeVisible().withTimeout( 10000 );
await powerUserRadioButton.tap();
}