src/androidTest/java/de/blau/android/osm/WikiTest.java
/**
     * Display map feature page for a feature with a page
     */
Display map feature page for a feature with a page
Display map feature page for a feature with a page
@Test
    public void existingPage() {
        Node n = (Node) App.getDelegator().getOsmElement(Node.NAME, 101792984L);
        assertNotNull(n);
        main.performTagEdit(n, null, false, false);
        ActivityMonitor monitor = instrumentation.addMonitor(PropertyEditor.class.getName(), null, false);
        Activity propertyEditor = instrumentation.waitForMonitorWithTimeout(monitor, 30000);
        assertTrue(propertyEditor instanceof PropertyEditor);
        assertTrue(TestUtils.clickOverflowButton(device));
        mockServer.enqueue("wiki_language_failed");
        mockServer.enqueue("wiki_language_successful");
        mockServer.enqueue("dummy_page");
        assertTrue(TestUtils.clickText(device, false, main.getString(R.string.tag_menu_mapfeatures), true));
        assertTrue(TestUtils.findText(device, false, "Dummy page", 60000));
        try {
            mockServer.takeRequest();
            RecordedRequest request = mockServer.takeRequest();
            assertTrue(request.getPath().endsWith("EN:Tag:place=village"));
        } catch (InterruptedException e) {
            fail(e.getMessage());
        }
    }
@ Test public void existingPage ( ) { Node n = ( Node ) App . getDelegator ( ) . getOsmElement ( Node . NAME , 101792984L ) ; assertNotNull ( n ) ; main . performTagEdit ( n , null , false , false ) ; ActivityMonitor monitor = instrumentation . addMonitor ( PropertyEditor . class . getName ( ) , null , false ) ; Activity propertyEditor = instrumentation . waitForMonitorWithTimeout ( monitor , 30000 ) ; assertTrue ( propertyEditor instanceof PropertyEditor ) ; assertTrue ( TestUtils . clickOverflowButton ( device ) ) ; mockServer . enqueue ( "wiki_language_failed" ) ; mockServer . enqueue ( "wiki_language_successful" ) ; mockServer . enqueue ( "dummy_page" ) ; assertTrue ( TestUtils . clickText ( device , false , main . getString ( R . string . tag_menu_mapfeatures ) , true ) ) ; assertTrue ( TestUtils . findText ( device , false , "Dummy page" , 60000 ) ) ; try { mockServer . takeRequest ( ) ; RecordedRequest request = mockServer . takeRequest ( ) ; assertTrue ( request . getPath ( ) . endsWith ( "EN:Tag:place=village" ) ) ; } catch ( InterruptedException e ) { fail ( e . getMessage ( ) ) ; } }
Display map feature page for a feature with a page
Display map feature page for a feature with a page