add missing testID to MenuItem, remove drawer layer in signIn test

This commit is contained in:
Abbey Campbell
2025-12-10 12:56:52 -08:00
parent f05d79be24
commit 9c42d64676
3 changed files with 3 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ export default async function signIn() {
const loginButton = element( by.id( "Login.loginButton" ) );
await expect( loginButton ).toBeVisible();
await element( by.id( "Login.loginButton" ) ).tap();
const username = element( by.text( `${Config.E2E_TEST_USERNAME}` ) ).atIndex( 1 );
const username = element( by.text( `${Config.E2E_TEST_USERNAME}` ) );
await waitFor( username ).toBeVisible().withTimeout( TIMEOUT );
await expect( username ).toBeVisible();

View File

@@ -1,18 +1,13 @@
import {
by, device,
element, waitFor
by, element, waitFor
} from "detox";
const TIMEOUT = 10_000;
export default async function switchPowerMode() {
const menuButton = element( by.id( "OPEN_MENU" ) );
// Temporarily disable synchronization to work around fade animation timing
// issues that can cause Detox to wait indefinitely for animations to complete
await device.disableSynchronization();
await waitFor( menuButton ).toBeVisible().withTimeout( TIMEOUT );
await menuButton.tap( { x: 0, y: 0 } );
await device.enableSynchronization();
// Tap the settings menu item
const settingsMenuItem = element( by.id( "settings" ) );
await waitFor( settingsMenuItem ).toBeVisible().withTimeout( TIMEOUT );