src/androidTest/java/de/blau/android/layer/LayerDialogTest.java
/**
     * Find grid layer, move up and switch to imperial
     */
Find grid layer, move up and switch to imperial
Find grid layer move up and switch to imperial
@Test
    public void gridLayer() {
        TestUtils.unlock(device); 
        assertNotNull(main.getMap().getLayer(LayerType.SCALE));
        Preferences prefs = App.getLogic().getPrefs();
        assertEquals(main.getString(R.string.scale_metric), prefs.scaleLayer());
        UiObject2 menuButton = TestUtils.getLayerButton(device, main.getString(R.string.layer_grid), MENU_BUTTON - 1);
        menuButton.clickAndWait(Until.newWindow(), 1000);
        assertTrue(TestUtils.clickText(device, false, main.getString(R.string.menu_layers_configure), true, false));
        assertTrue(TestUtils.clickText(device, false, main.getString(R.string.scale_imperial_entry), false, false));
        assertTrue(TestUtils.clickText(device, false, main.getString(R.string.okay), true, false));
        assertTrue(TestUtils.clickText(device, false, main.getString(R.string.done), true, false));
        prefs = App.getLogic().getPrefs();
        assertEquals(main.getString(R.string.scale_imperial), prefs.scaleLayer());
    }
@ Test public void gridLayer ( ) { TestUtils . unlock ( device ) ; assertNotNull ( main . getMap ( ) . getLayer ( LayerType . SCALE ) ) ; Preferences prefs = App . getLogic ( ) . getPrefs ( ) ; assertEquals ( main . getString ( R . string . scale_metric ) , prefs . scaleLayer ( ) ) ; UiObject2 menuButton = TestUtils . getLayerButton ( device , main . getString ( R . string . layer_grid ) , MENU_BUTTON - 1 ) ; menuButton . clickAndWait ( Until . newWindow ( ) , 1000 ) ; assertTrue ( TestUtils . clickText ( device , false , main . getString ( R . string . menu_layers_configure ) , true , false ) ) ; assertTrue ( TestUtils . clickText ( device , false , main . getString ( R . string . scale_imperial_entry ) , false , false ) ) ; assertTrue ( TestUtils . clickText ( device , false , main . getString ( R . string . okay ) , true , false ) ) ; assertTrue ( TestUtils . clickText ( device , false , main . getString ( R . string . done ) , true , false ) ) ; prefs = App . getLogic ( ) . getPrefs ( ) ; assertEquals ( main . getString ( R . string . scale_imperial ) , prefs . scaleLayer ( ) ) ; }
Find grid layer, move up and switch to imperial
Find grid layer move up and switch to imperial
// so that grid gets displayed // note grid has no extent button