Ignore:
Timestamp:
10/07/13 16:10:45 (11 years ago)
Author:
pharms
Message:
  • corrected HTML monitor to log only those GUI elements effectively used by the events including their parent hierarchy
Location:
trunk/autoquest-htmlmonitor-test/src/test/java/de/ugoe/cs/autoquest/htmlmonitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-htmlmonitor-test/src/test/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorServerTest.java

    r1245 r1315  
    614614         
    615615        if (parent != null) { 
    616             assertEquals(parent.getId(), element.getParentId()); 
     616            assertNotNull(element.getParent()); 
     617            assertEquals(parent.getId(), element.getParent().getId()); 
    617618        } 
    618619        else { 
    619             assertNull(element.getParentId()); 
     620            assertNull(element.getParent()); 
    620621        } 
    621622         
  • trunk/autoquest-htmlmonitor-test/src/test/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorTest.java

    r1245 r1315  
    421421        nodes = guiModel.getChildren(body); 
    422422        assertNotNull(nodes); 
    423         assertEquals(10, nodes.size()); 
     423         
     424        // wait for only 9 nodes. The directly used GUI elements are 10, but one (the body) is the 
     425        // parent of the others. input9 is unused and must, therefore, not be logged. 
     426        assertEquals(9, nodes.size()); 
    424427         
    425428        // get input nodes 
     
    429432            assertTrue(node instanceof HTMLPageElement); 
    430433            assertEquals("HTML", node.getPlatform()); 
    431              
    432             if (i != 8) { 
    433                 assertTrue(node.isUsed()); 
    434             } 
    435             else { 
    436                 assertFalse(node.isUsed()); 
    437             } 
     434            assertTrue(node.isUsed()); 
    438435 
    439436            assertNotNull(guiModel.getChildren(node)); 
     
    464461        assertEvent(sequence.get(7), 8, MouseClick.class, nodes.get(7), 255, 4); 
    465462        assertEvent(sequence.get(8), 9, Scroll.class, body, 0, 0); 
    466         assertEvent(sequence.get(9), 10, MouseClick.class, nodes.get(9), 516, 154); 
     463        assertEvent(sequence.get(9), 10, MouseClick.class, nodes.get(8), 516, 154); 
    467464 
    468465    } 
Note: See TracChangeset for help on using the changeset viewer.