diff --git a/e2e/signedIn.e2e.js b/e2e/signedIn.e2e.js index 8c2ce6467..85604a834 100644 --- a/e2e/signedIn.e2e.js +++ b/e2e/signedIn.e2e.js @@ -117,7 +117,22 @@ describe( "Signed in user", () => { await expect( username ).toBeVisible(); /* - / 2. Create two observations + / 2. Switch UI to power user mode + */ + 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 power user mode + const powerUserRadioButton = element( by.id( "all-observation-option" ) ); + await waitFor( powerUserRadioButton ).toBeVisible().withTimeout( 10000 ); + await powerUserRadioButton.tap(); + + /* + / 3. Create two observations */ const uuid = await createAndUploadObservation( { upload: true } ); // Create a second b/c later we want to test that the deleted status text @@ -126,7 +141,7 @@ describe( "Signed in user", () => { await createAndUploadObservation( ); /* - / 3. Update the observation by adding a comment + / 4. Update the observation by adding a comment */ const obsListItem = element( by.id( `MyObservations.obsListItem.${uuid}` ) ); await obsListItem.tap(); @@ -149,7 +164,7 @@ describe( "Signed in user", () => { await waitFor( username ).toBeVisible( ).withTimeout( 10000 ); /* - / 4. Delete the observations + / 5. Delete the observations */ await deleteObservationByUUID( uuid, username, { uploaded: true } ); // TODO test to make sure the exact observation we created was deleted. diff --git a/src/components/Settings/Settings.js b/src/components/Settings/Settings.js index 78fe2cf9a..528f62a2e 100644 --- a/src/components/Settings/Settings.js +++ b/src/components/Settings/Settings.js @@ -108,6 +108,7 @@ const Settings = ( ) => { setIsAdvancedUser( true )} diff --git a/src/components/SharedComponents/RadioButtonRow.js b/src/components/SharedComponents/RadioButtonRow.js index cb56fd934..0cb76a43f 100644 --- a/src/components/SharedComponents/RadioButtonRow.js +++ b/src/components/SharedComponents/RadioButtonRow.js @@ -11,6 +11,7 @@ import React from "react"; import { RadioButton, useTheme } from "react-native-paper"; type Props = { + testID: string, checked: boolean, description: ?string, icon: string, @@ -21,6 +22,7 @@ type Props = { } const RadioButtonRow = ( { + testID, description, checked, label, @@ -40,7 +42,7 @@ const RadioButtonRow = ( { : Body1; return ( - + { icon: "help-circle" }, settings: { + testID: "settings", label: t( "SETTINGS" ), navigation: "Settings", icon: "gear" @@ -194,6 +195,7 @@ const CustomDrawerContent = ( { ...props }: Props ): Node => { return ( { navigation.navigate( drawerItems[item].navigation, drawerItems[item].params );