Package org.zkoss.ztl

Examples of org.zkoss.ztl.JQuery


   * 3. keyin "2", can not edit cell value. value remain "1"
   */
  @Override
  protected void executeTest() {
   
    JQuery A0 = getSpecifiedCell(0, 0);
    clickCell(A0);
    clickCell(A0);
    typeKeys(A0, "1");
    keyPressEnter(jq(".zsedit"));
   
    click(jq("$fastIconBtn $protectSheet input"));
    waitResponse();
   
    clickCell(A0);
    typeKeys(A0, "2");
    keyPressEnter(jq(".zsedit"));
    waitResponse();
    verifyEquals("1", A0.text());
  }
View Full Code Here


public class SS_182_Test extends SSAbstractTestCase {

    @Override
    protected void executeTest() {
        // Select source cell
        JQuery cell_J_13 = getSpecifiedCell(9, 12);
        clickCell(cell_J_13);
        clickCell(cell_J_13);
       
        // Ctrl + C
        keyDownNative(CTRL);
        waitResponse();
        keyDownNative(C);
        waitResponse();
        keyUpNative(C);
        waitResponse();
        keyUpNative(CTRL);
        waitResponse();
       
        // Right click target cell
        JQuery cell_L_13 = loadTargetCell();
        clickCell(cell_L_13);
        rightClickCell(cell_L_13);
        waitResponse();
       
        // Click Paste Special on the context menu
        click(jq("$pasteSpecial"));
        waitResponse();
       
        // Choose Formulas and number formats
        click(jq("$formulaWithNum input[id*=real]"));
        waitResponse();
        click(jq("$okBtn"));
        waitResponse();
       
        // Verify -- formula
        String formulaBarValue = jq("$formulaEditor").val();
        verifyEquals("Incorrect value: " + formulaBarValue, "=+K13", formulaBarValue);
       
        // Verify -- Number format
        String targetCellValue = cell_L_13.text();
        verifyEquals("Incorrect value: " + targetCellValue, "$0", targetCellValue);
    }
View Full Code Here

  /**
   * Font color
   */
    @Override
    protected void executeTest() {
        JQuery cell_B_8 = getSpecifiedCell(1, 7);
        clickCell(cell_B_8);
        clickCell(cell_B_8);

      click(jq("$formatMenu"));
      waitResponse();
      click(jq("$backgroundColorMenu"));
      waitResponse();

      JQuery color = jq("$backgroundColorMenu .z-colorpalette div.z-colorpalette-colorbox:nth-child(98)");
      mouseOver(color);
      click(color);
      waitResponse();
      String selectedColor = color.first().text();

        //Verify
        cell_B_8 = getSpecifiedCell(1, 7);
        String bgB8 = cell_B_8.parent().css("background-color");
        String style = ColorVerifingHelper.transform(bgB8);
View Full Code Here

      waitResponse();
      click(jq("$freezeRow7"));
      waitResponse();
      // TODO: Verify correct row is frozen
      verifyTrue(jq("div.zstopblock").width() != 0);
      JQuery p = jq("div.zstopblock");
      int clen = p.children().length();
      JQuery c = p.children("div:nth-child(7)");
      int width = c.width();
      verifyTrue("no. of children=" + clen + ", widht=" + width, clen == 7 && jq("div.zstopblock").children("div:nth-child(7)").width() != 0);
    }
View Full Code Here

public class SS_087_Test extends SSAbstractTestCase {

    @Override
    protected void executeTest() {
        JQuery cell_B_19 = getSpecifiedCell(1, 18);
        clickCell(cell_B_19);
        clickCell(cell_B_19);
       
        // Select - B19 ~ I22
        selectCells(1, 18, 8, 21);
View Full Code Here

public class SS_072_Test extends SSAbstractTestCase {

    @Override
    protected void executeTest() {
        // Select cell
        JQuery cell_L_13 = loadTargetCell();
        clickCell(cell_L_13);
        clickCell(cell_L_13);
       
        // Click Border icon
        JQuery borderIcon = jq("$fastIconBtn $borderBtn:visible");
        mouseOver(borderIcon);
        waitResponse();
        clickAt(borderIcon, "30,0");
        waitResponse();
       
View Full Code Here

//merge k6:L6
public class SS_084_Test extends SSAbstractTestCase {

    @Override
    protected void executeTest() {
        JQuery cell_K_6 = loadCellK6();
        int cellK6Width = cell_K_6.width();
        selectCells(10, 5, 11, 5);
     
        // Merge cells
        click(jq("$mergeCellBtn"));
       
        // Verify
        cell_K_6 = loadCellK6();
        int currentCellWidth = cell_K_6.width();
        verifyTrue("Unexcepted result: original width = " +
                cellK6Width + ", merged cell width = " + currentCellWidth,
                cellK6Width < currentCellWidth);
    }
View Full Code Here

public class SS_183_Test extends SSAbstractTestCase {

    @Override
    protected void executeTest() {
        // Select source cell
        JQuery cell_J_13 = getSpecifiedCell(9, 12);
        clickCell(cell_J_13);
        clickCell(cell_J_13);
        String orgVal = numberOnly(getSpecifiedCell(9, 12).text());
        // Ctrl + C
        keyDownNative(CTRL);
        waitResponse();
        keyDownNative(C);
        waitResponse();
        keyUpNative(C);
        waitResponse();
        keyUpNative(CTRL);
        waitResponse();
       
        // Right click target cell
        JQuery cell_L_13 = loadTargetCell();
        clickCell(cell_L_13);
        rightClickCell(cell_L_13);
        waitResponse();
       
        // Click Paste Special on the context menu
        click(jq("$pasteSpecial"));
        waitResponse();
       
        // Choose Values
        click(jq("$value input[id*=real]"));
        waitResponse();
        click(jq("$okBtn"));
        waitResponse();
       
        // Verify
        cell_L_13 = loadTargetCell();
        verifyEquals("Incorrect result! L13=" + cell_L_13.text(), orgVal, cell_L_13.text());
    }
View Full Code Here

      waitResponse();
      click(jq("$freezeRow9"));
      waitResponse();
      // TODO: Verify correct row is frozen
      verifyTrue(jq("div.zstopblock").width() != 0);
      JQuery p = jq("div.zstopblock");
      int clen = p.children().length();
      JQuery c = p.children("div:nth-child(9)");
      int width = c.width();
      verifyTrue("no. of children=" + clen + ", widht=" + width, clen == 9 && jq("div.zstopblock").children("div:nth-child(9)").width() != 0);
    }
View Full Code Here

public class SS_019_Test extends SSAbstractTestCase {

  @Override
  protected void executeTest() {
    JQuery cell_B_12 = getSpecifiedCell(1, 11);
    String origValue = getCellText(cell_B_12);
    JQuery cell_B_13 = getSpecifiedCell(1, 12);
    String downCellValue = getCellText(cell_B_13);
    clickCell(cell_B_12);
    clickCell(cell_B_12);
    click("$editMenu");
    waitResponse();
View Full Code Here

TOP

Related Classes of org.zkoss.ztl.JQuery

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.