mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
Merge pull request #3271 from inaturalist/mob-963-change-slideover-menu-to-be-a-static-page
Mob 963 change slideover menu to be a static page
This commit is contained in:
@@ -13,18 +13,18 @@ export default async function signIn() {
|
||||
*/
|
||||
await switchPowerMode();
|
||||
// Find the Menu item from tabs
|
||||
const openDrawerMenuItem = element( by.id( "OPEN_DRAWER" ) );
|
||||
await waitFor( openDrawerMenuItem ).toBeVisible().withTimeout( TIMEOUT );
|
||||
await expect( openDrawerMenuItem ).toBeVisible();
|
||||
await element( by.id( "OPEN_DRAWER" ) ).tap( { x: 0, y: 0 } );
|
||||
const menuButton = element( by.id( "Menu" ) );
|
||||
await waitFor( menuButton ).toBeVisible().withTimeout( TIMEOUT );
|
||||
await expect( menuButton ).toBeVisible();
|
||||
await element( by.id( "Menu" ) ).tap( { x: 0, y: 0 } );
|
||||
// Tap the Log-In menu item
|
||||
// TODO: consider this a temporary solution as it only checks for the drawer-top-banner
|
||||
// TODO: consider this a temporary solution as it only checks for the menu-header
|
||||
// which can be a login prompt or the logged in user's details. If the user is already
|
||||
// logged in, this should fail instead.
|
||||
const loginMenuItem = element( by.id( "drawer-top-banner" ) );
|
||||
const loginMenuItem = element( by.id( "menu-header" ) );
|
||||
await waitFor( loginMenuItem ).toBeVisible().withTimeout( TIMEOUT );
|
||||
await expect( loginMenuItem ).toBeVisible();
|
||||
await element( by.id( "drawer-top-banner" ) ).tap();
|
||||
await element( by.id( "menu-header" ) ).tap();
|
||||
const usernameInput = element( by.id( "Login.email" ) );
|
||||
await waitFor( usernameInput ).toBeVisible().withTimeout( TIMEOUT );
|
||||
await expect( usernameInput ).toBeVisible();
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ import {
|
||||
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();
|
||||
const menuButton = element( by.id( "Menu" ) );
|
||||
await waitFor( menuButton ).toBeVisible().withTimeout( TIMEOUT );
|
||||
await menuButton.tap( { x: 0, y: 0 } );
|
||||
// Tap the settings menu item
|
||||
const settingsMenuItem = element( by.id( "settings" ) );
|
||||
await waitFor( settingsMenuItem ).toBeVisible().withTimeout( TIMEOUT );
|
||||
await settingsMenuItem.tap();
|
||||
// Switch settings to advanced interface mode
|
||||
const advancedInterfaceSwitch = element( by.id( "advanced-interface-switch.switch" ) );
|
||||
await waitFor( advancedInterfaceSwitch ).toBeVisible().withTimeout( TIMEOUT );
|
||||
|
||||
Reference in New Issue
Block a user