Package org.zkoss.ztl

Examples of org.zkoss.ztl.JQuery


  /**
   * Clear Content
   */
    @Override
    protected void executeTest() {
        JQuery cell_F_21 = getSpecifiedCell(5, 20);
        String origValue = getCellText(cell_F_21);
        clickCell(cell_F_21);
        clickCell(cell_F_21);
      click("$editMenu");
      waitResponse();
View Full Code Here


   * 1. toggle on autofilter
   * 2. toggle off autofilter
   */
  @Override
  protected void executeTest() {
    JQuery F11 = getSpecifiedCell(5, 11);
    clickCell(F11);
    clickCell(F11);
   
    //click filter menu
    clickDropdownButtonMenu("$fastIconBtn $sortDropdownBtn", "Filter");
View Full Code Here

public class SS_021_Test extends SSAbstractTestCase {

  @Override
  protected void executeTest() {
    JQuery cell_F_11 = getSpecifiedCell(5, 10);
    String origValue = getCellText(cell_F_11);
    JQuery cell_G_11 = getSpecifiedCell(6, 10);
    String rightCellValue = getCellText(cell_G_11);
    JQuery cell_H_11 = getSpecifiedCell(7, 10);
    String rightRightCellValue = getCellText(cell_H_11);
    clickCell(cell_F_11);
    clickCell(cell_F_11);
    click("$editMenu");
    waitResponse();
View Full Code Here

public class SS_184_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 Values and number formats
        click(jq("$valueWithNumFmt input[id*=real]"));
        waitResponse();
        click(jq("$okBtn"));
        waitResponse();
       
        // Verify
        cell_L_13 = loadTargetCell();
        verifyEquals("Incorrect result! J13=" + cell_J_13.text() + ", L13=" + cell_L_13.text(),
                cell_J_13.text(), cell_L_13.text());
    }
View Full Code Here

      waitResponse();
      click(jq("$freezeRow4"));
      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(4)");
      int width = c.width();
      verifyTrue("no. of children=" + clen + ", widht=" + width, clen == 4 && jq("div.zstopblock").children("div:nth-child(4)").width() != 0);
    }
View Full Code Here

      waitResponse();
      click(jq("$freezeRow10"));
      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(10)");
      int width = c.width();
      verifyTrue("no. of children=" + clen + ", widht=" + width, clen == 10 && jq("div.zstopblock").children("div:nth-child(10)").width() != 0);
    }
View Full Code Here

public class SS_185_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);
        System.out.println(getCellStyleMap(getSpecifiedCell(14, 5)));

        // 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
View Full Code Here

  /**
   * Shift cell up
   */
  @Override
  protected void executeTest() {
    JQuery cell_F_11 = getSpecifiedCell(5, 10);
    String origValue = getCellText(cell_F_11);
    JQuery cell_F_12 = getSpecifiedCell(5, 11);
    String downCellValue = getCellText(cell_F_12);
    JQuery cell_F_13 = getSpecifiedCell(5, 12);
    String downDownCellValue = getCellText(cell_F_13);
    clickCell(cell_F_11);
    clickCell(cell_F_11);
    click("$editMenu");
    waitResponse();
View Full Code Here

      mouseOver(jq("$freezeCols"));
      waitResponse();
      click(jq("$freezeCol7"));
      waitResponse();
      // TODO: Verify correct row is frozen
      JQuery p = jq("div.zsleftblock");
      verifyTrue(p.width() != 0);
      JQuery r = p.children("div:nth-child(7)");
      int numOfCells = r.children().length();
      int width = r.width();
      verifyTrue("numOfCells=" + numOfCells + ", widht=" + width, r.width() != 0 && numOfCells == 7);
    }
View Full Code Here

//select cell B6, align top, align center, align bottom
public class SS_235_Test extends SSAbstractTestCase {

    @Override
    protected void executeTest() {
        JQuery cell_B_6 = getSpecifiedCell(1, 5);
        clickCell(cell_B_6);
        clickCell(cell_B_6);
       
    click(jq("@dropdownbutton$valignBtn div.z-dpbutton-arrow:eq(0)"));
    waitResponse();
    click(jq("@menuitem[label=\"Top Align\"]").first());
    waitResponse();
       
    cell_B_6 = getSpecifiedCell(1, 5);
        String textAlign = cell_B_6.parent().css("vertical-align");
       
        //TODO: verify
//        if (textAlign != null) {
//            verifyTrue("Unexcepted result: " + textAlign, textAlign.equalsIgnoreCase("top"));
//        } else {
//            verifyTrue("Cannot get style of specified cell!", false);
//        }
       
        clickCell(cell_B_6);
        clickCell(cell_B_6);
       
    click(jq("@dropdownbutton$valignBtn div.z-dpbutton-arrow:eq(0)"));
    waitResponse();
    click(jq("@menuitem[label=\"Middle Align\"]").first());
    waitResponse();
       
    cell_B_6 = getSpecifiedCell(1, 5);
        textAlign = cell_B_6.parent().css("vertical-align");
        System.out.println("");
       
        //TODO: verify
//        if (textAlign != null) {
//            verifyTrue("Unexcepted result: " + textAlign, textAlign.equalsIgnoreCase("middle"));
//        } else {
//            verifyTrue("Cannot get style of specified cell!", false);
//        }

        clickCell(cell_B_6);
        clickCell(cell_B_6);
       
    click(jq("@dropdownbutton$valignBtn div.z-dpbutton-arrow:eq(0)"));
    waitResponse();
    click(jq("@menuitem[label=\"Bottom Align\"]").first());
    waitResponse();
       
    cell_B_6 = getSpecifiedCell(1, 5);
        textAlign = cell_B_6.parent().css("vertical-align");
       
        //TODO: verify
//        if (textAlign != null) {
//            verifyTrue("Unexcepted result: " + textAlign, textAlign.equalsIgnoreCase("bottom"));
//        } else {
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.