Package org.noos.xing.mydoggy.itest

Examples of org.noos.xing.mydoggy.itest.InteractiveMouse


    public String getDescription() {
        return "TODO";
    }

    public void interactiveTest(InteractiveUI interactiveUI) {
        InteractiveMouse mouse = interactiveUI.getInteractiveMouse();

        mouse.click("toolWindow.rb.Tool 1", InteractiveMouse.Type.LEFT, 1000)
                .click("toolWindow.rb.Tool 3", InteractiveMouse.Type.LEFT, 1000);
    }
View Full Code Here


    public String toString() {
        return getName();
    }

    protected void moveToolTo(InteractiveUI interactiveUI, String toolId, ToolWindowAnchor anchor) {
        InteractiveMouse mouse = interactiveUI.getInteractiveMouse();

        mouse.moveTo("toolWindow.rb." + toolId);
        interactiveUI.delay(500);
        mouse.press(InteractiveMouse.Type.LEFT);

        mouse.moveTo("toolWindowManager.bar." + anchor.toString(), 10, 15);
        interactiveUI.delay(500);
        mouse.release();
        interactiveUI.delay(500);
    }
View Full Code Here

    public String getDescription() {
        return "TODO";
    }

    public void interactiveTest(InteractiveUI interactiveUI) {
        InteractiveMouse mouse = interactiveUI.getInteractiveMouse();

        mouse.moveTo("toolWindow.rb.Tool 1", 500)
                .press(InteractiveMouse.Type.LEFT)
                .moveTo("toolWindowManager.bar.RIGHT", 10, 80, 500)
                .release(500)
                .moveTo("toolWindow.rb.Tool 1")
                .press(InteractiveMouse.Type.LEFT)
View Full Code Here

    public String getDescription() {
        return "TODO";
    }

    public void interactiveTest(InteractiveUI interactiveUI) {
        InteractiveMouse mouse = interactiveUI.getInteractiveMouse();

        mouse.click("toolWindow.rb.Tool 1", InteractiveMouse.Type.LEFT);
    }
View Full Code Here

        public void dispose() {
            myDoggySet.dispose();
        }

        protected void moveToolTo(InteractiveUI interactiveUI, String toolId, ToolWindowAnchor anchor) {
            InteractiveMouse mouse = interactiveUI.getInteractiveMouse();

            mouse.moveTo("toolWindow.rb." + toolId);
            interactiveUI.delay(500);
            mouse.press(InteractiveMouse.Type.LEFT);

            mouse.moveTo("toolWindowManager.bar." + anchor.toString(), 10, 15);
            interactiveUI.delay(500);
            mouse.release();
            interactiveUI.delay(500);
        }
View Full Code Here

    }

    public static class PreviewInteractiveTest extends MyDoggyInteractiveTest {

        public void interactiveTest(InteractiveUI interactiveUI) {
            InteractiveMouse mouse = interactiveUI.getInteractiveMouse();
            InteractiveAssertor assertor = interactiveUI.getInteractiveAssertor();

            ToolWindow toolWindow = myDoggySet.getToolWindowManager().getToolWindow("Tool 1");

            moveToolTo(interactiveUI, "Tool 7", ToolWindowAnchor.BOTTOM);

            DockedTypeDescriptor descriptor = (DockedTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.DOCKED);
            descriptor.setPreviewEnabled(true);
            descriptor.setPreviewDelay(1000);

            mouse.moveTo("toolWindow.rb.Tool 6");
            interactiveUI.delay(1100);

            assertor.askForConfirm("Is preview visible?");

            moveToolTo(interactiveUI, "Tool 1", ToolWindowAnchor.RIGHT);
            moveToolTo(interactiveUI, "Tool 3", ToolWindowAnchor.RIGHT);

            mouse.moveTo("toolWindow.rb.Tool 1");
            interactiveUI.delay(1100);

            assertor.askForConfirm("Is preview visible?");

            mouse.moveTo("toolWindowManager.mainContainer");

            interactiveUI.delay(1000);

            assertor.askForConfirm("Is preview not visible?");
        }
View Full Code Here

    }

    public static class ToolVisisbleInteractiveTest extends MyDoggyInteractiveTest {

        public void interactiveTest(InteractiveUI interactiveUI) {
            InteractiveMouse mouse = interactiveUI.getInteractiveMouse();
            InteractiveAssertor assertor = interactiveUI.getInteractiveAssertor();

            mouse.click("toolWindow.rb.Tool 1", InteractiveMouse.Type.LEFT);
            interactiveUI.delay(1000);

            mouse.click("toolWindow.rb.Tool 3", InteractiveMouse.Type.LEFT);
            interactiveUI.delay(1000);

            assertor.askForConfirm("Is behaviuor correct?");
        }
View Full Code Here

    }

    public static class DragInteractiveTest extends MyDoggyInteractiveTest {

        public void interactiveTest(InteractiveUI interactiveUI) {
            InteractiveMouse mouse = interactiveUI.getInteractiveMouse();
            InteractiveAssertor assertor = interactiveUI.getInteractiveAssertor();

            mouse.moveTo("toolWindow.rb.Tool 1");
            interactiveUI.delay(500);
            mouse.press(InteractiveMouse.Type.LEFT);

            mouse.moveTo("toolWindowManager.bar.RIGHT", 10, 80);
            interactiveUI.delay(500);
            mouse.release();

            interactiveUI.delay(500);

            mouse.moveTo("toolWindow.rb.Tool 1");
            mouse.press(InteractiveMouse.Type.LEFT);

            mouse.moveTo("toolWindowManager.bar.LEFT", 10, 80);
            interactiveUI.delay(500);
            mouse.release();

            assertor.askForConfirm("Is behaviuor correct?");
        }
View Full Code Here

    }

    public static class SlidingTypeInteractiveTest extends MyDoggyInteractiveTest {

        public void interactiveTest(InteractiveUI interactiveUI) {
            InteractiveMouse mouse = interactiveUI.getInteractiveMouse();
            InteractiveAssertor assertor = interactiveUI.getInteractiveAssertor();

            // Validate initiale state...
            assertor.assertTrue("Invalid state",
                                     myDoggySet.getToolWindowManager().getToolWindow("Tool 1").getType() != ToolWindowType.SLIDING);

            mouse.moveTo("toolWindow.rb.Tool 1");
            mouse.click(InteractiveMouse.Type.LEFT);
            interactiveUI.delay(1000);

            mouse.moveTo("toolWindow.dockButton.Tool 1");
            mouse.click(InteractiveMouse.Type.LEFT);
            interactiveUI.delay(1000);

            assertor.assertTrue("Invalid state",
                                     myDoggySet.getToolWindowManager().getToolWindow("Tool 1").getType() == ToolWindowType.SLIDING);
        }
View Full Code Here

    }

    public static class FloatingMoveInteractiveTest extends MyDoggyInteractiveTest {

        public void interactiveTest(InteractiveUI interactiveUI) {
            InteractiveMouse mouse = interactiveUI.getInteractiveMouse();
            InteractiveAssertor assertor = interactiveUI.getInteractiveAssertor();

            // Validate initiale state...
            mouse.moveTo("toolWindow.rb.Tool 1");
            mouse.click(InteractiveMouse.Type.LEFT);
            interactiveUI.delay(1000);

            mouse.moveTo("toolWindow.floatingButton.Tool 1");
            mouse.click(InteractiveMouse.Type.LEFT);
            interactiveUI.delay(1000);

            interactiveUI.importRoot("toolWindow.floating.window.Tool 1");

            mouse.moveTo("toolWindow.bar.Tool 1");
            mouse.press(InteractiveMouse.Type.LEFT);
            interactiveUI.delay(1000);

            Point wLocation = ((FloatingTypeDescriptor) myDoggySet.getToolWindowManager().getToolWindow("Tool 1").getTypeDescriptor(ToolWindowType.FLOATING)).getLocation();
            wLocation.x -= 50;
            wLocation.y -= 50;

            mouse.moveTo(wLocation.x, wLocation.y);
            mouse.release();
            interactiveUI.delay(1000);

            assertor.askForConfirm("Is behaviuor correct?");
        }
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.itest.InteractiveMouse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.