Ignore:
Timestamp:
03/11/15 16:53:03 (10 years ago)
Author:
pharms
Message:
  • corrected test to run through with optimized parser
File:
1 edited

Legend:

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

    r1496 r1911  
    1919import java.io.File; 
    2020import java.util.Collection; 
     21import java.util.HashMap; 
    2122import java.util.Iterator; 
    2223import java.util.List; 
     24import java.util.Map; 
    2325 
    2426import org.apache.http.HttpEntity; 
     
    425427        assertEquals(10, nodes.size()); 
    426428         
     429        Map<String, IGUIElement> inputs = new HashMap<>(); 
     430         
    427431        // get input nodes 
    428432        for (int i = 0; i < nodes.size(); i++) { 
     
    438442                assertFalse(node.isUsed()); 
    439443            } 
     444             
     445            inputs.put(((HTMLPageElement) node).getHtmlId(), node); 
    440446 
    441447            assertNotNull(guiModel.getChildren(node)); 
     
    457463        assertEquals(10, sequence.size()); 
    458464         
    459         assertEvent(sequence.get(0), 1, MouseClick.class, nodes.get(0), 194, 7); 
    460         assertEvent(sequence.get(1), 2, MouseDoubleClick.class, nodes.get(1), 194, 7); 
    461         assertEvent(sequence.get(2), 3, KeyboardFocusChange.class, nodes.get(2), 0, 0); 
    462         assertEvent(sequence.get(3), 4, MouseClick.class, nodes.get(3), 125, 14); 
    463         assertEvent(sequence.get(4), 5, KeyboardFocusChange.class, nodes.get(4), 0, 0); 
    464         assertEvent(sequence.get(5), 6, KeyboardFocusChange.class, nodes.get(5), 0, 0); 
    465         assertEvent(sequence.get(6), 7, KeyboardFocusChange.class, nodes.get(6), 0, 0); 
    466         assertEvent(sequence.get(7), 8, MouseClick.class, nodes.get(7), 255, 4); 
     465        assertEvent(sequence.get(0), 1, MouseClick.class, inputs.get("input1"), 194, 7); 
     466        assertEvent(sequence.get(1), 2, MouseDoubleClick.class, inputs.get("input2"), 194, 7); 
     467        assertEvent(sequence.get(2), 3, KeyboardFocusChange.class, inputs.get("input3"), 0, 0); 
     468        assertEvent(sequence.get(3), 4, MouseClick.class, inputs.get("input4"), 125, 14); 
     469        assertEvent(sequence.get(4), 5, KeyboardFocusChange.class, inputs.get("input5"), 0, 0); 
     470        assertEvent(sequence.get(5), 6, KeyboardFocusChange.class, inputs.get("input6"), 0, 0); 
     471        assertEvent(sequence.get(6), 7, KeyboardFocusChange.class, inputs.get("input7"), 0, 0); 
     472        assertEvent(sequence.get(7), 8, MouseClick.class, inputs.get("input8"), 255, 4); 
    467473        assertEvent(sequence.get(8), 9, Scroll.class, body, 0, 0); 
    468         assertEvent(sequence.get(9), 10, MouseClick.class, nodes.get(9), 516, 154); 
     474        assertEvent(sequence.get(9), 10, MouseClick.class, inputs.get("input10"), 516, 154); 
    469475 
    470476    } 
Note: See TracChangeset for help on using the changeset viewer.