mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-04-20 23:10:53 -04:00
* 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
22 lines
998 B
JavaScript
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();
|
|
}
|