Exemplo n.º 1
0
  private void testShapesTool() {
    window.toggleButton("Shapes Tool Button").click();
    randomAltClick();

    setupEffectsDialog();
    boolean stokeSettingsSetup = false;

    for (ShapeType shapeType : ShapeType.values()) {
      window.comboBox("shapeTypeCB").selectItem(shapeType.toString());
      for (ShapesAction shapesAction : ShapesAction.values()) {
        window.comboBox("actionCB").selectItem(shapesAction.toString());
        window.pressAndReleaseKeys(KeyEvent.VK_R);

        if (shapesAction == ShapesAction.STROKE) { // stroke settings will be enabled here
          if (!stokeSettingsSetup) {
            setupStrokeSettingsDialog();
            stokeSettingsSetup = true;
          }
        }

        moveRandom();
        dragRandom();

        if (shapesAction == ShapesAction.SELECTION
            || shapesAction == ShapesAction.SELECTION_FROM_STROKE) {
          keyboardDeselect();
        }
      }
    }

    keyboardUndoRedo();
    keyboardUndo();
  }
Exemplo n.º 2
0
  private void testBrushStrokes() {
    randomAltClick();

    for (BrushType brushType : BrushType.values()) {
      window.comboBox("brushTypeSelector").selectItem(brushType.toString());
      for (Symmetry symmetry : Symmetry.values()) {
        window.comboBox("symmetrySelector").selectItem(symmetry.toString());
        window.pressAndReleaseKeys(KeyEvent.VK_R);
        moveRandom();
        dragRandom();
      }
    }
    keyboardUndoRedo();
  }
Exemplo n.º 3
0
  private void testSelectionToolAndMenus() {
    window.toggleButton("Selection Tool Button").click();
    randomAltClick();

    move(200, 200);
    drag(400, 400);
    keyboardNudge();
    keyboardUndo();

    // window.button("brushTraceButton").click();
    findButtonByText(window, "Stroke with Current Brush").click();

    keyboardDeselect();
    keyboardUndo(); // keyboardUndo deselection
    keyboardUndo(); // keyboardUndo tracing
    window.comboBox("selectionTypeCombo").selectItem("Ellipse");
    move(200, 200);
    drag(400, 400);
    window.comboBox("selectionInteractionCombo").selectItem("Add");
    move(400, 200);
    drag(500, 300);

    // window.button("eraserTraceButton").click();
    findButtonByText(window, "Stroke with Current Eraser").click();

    // crop from this selection tool
    findButtonByText(window, "Crop").click();
    keyboardUndo();

    // crop from the menu
    runMenuCommand("Crop");
    keyboardUndo();

    testSelectionModifyMenu();

    runMenuCommand("Invert Selection");
    runMenuCommand("Stroke with Current Brush");
    runMenuCommand("Stroke with Current Eraser");
    runMenuCommand("Deselect");
  }
Exemplo n.º 4
0
  private void testGradientTool() {
    window.toggleButton("Gradient Tool Button").click();
    randomAltClick();

    for (GradientType gradientType : GradientType.values()) {
      window.comboBox("gradientTypeSelector").selectItem(gradientType.toString());
      for (String cycleMethod : GradientTool.CYCLE_METHODS) {
        window.comboBox("gradientCycleMethodSelector").selectItem(cycleMethod);
        GradientColorType[] gradientColorTypes = GradientColorType.values();
        for (GradientColorType colorType : gradientColorTypes) {
          window.comboBox("gradientColorTypeSelector").selectItem(colorType.toString());
          window.checkBox("gradientInvert").uncheck();
          move(200, 200);
          drag(400, 400);
          window.checkBox("gradientInvert").check();
          move(200, 200);
          drag(400, 400);
        }
      }
    }
    keyboardUndoRedo();
  }