Package

Source Code of SS_054_Test

import org.zkoss.ztl.JQuery;

import com.google.common.base.Objects;


public class SS_054_Test extends SSAbstractTestCase {

  /**
   * Paste (value only)
   */
    @Override
    protected void executeTest() {
      JQuery srcFormulaCell = focusOnCell(5, 14);
      String formulaBarValue = jq("$formulaEditor").val();
      String srcCellText = getCellText(srcFormulaCell);
      verifyTrue("Shall select formula cell as paste source",
        formulaBarValue.startsWith("=") && !Objects.equal(srcFormulaCell, srcCellText));
      verifyTrue("Shall select format cell as paste source", srcCellText.indexOf(",") >= 0);
      click("$copyBtn");
     
      //paste value
      focusOnCell(12, 14);
      clickDropdownButtonMenu("$fastIconBtn $pasteDropdownBtn", "Values");
      String targetFormulaBarValue = jq("$formulaEditor").val();
      /**
       * Paste value, no style, no format
       */
      verifyFalse("paste value: shall not be formula", targetFormulaBarValue.indexOf("=") >= 0);
      srcCellText = srcCellText.replace(",", "");
      verifyEquals("paste value, no format", srcCellText, targetFormulaBarValue);
    }
}
TOP

Related Classes of SS_054_Test

TOP
Copyright © 2018 www.massapi.com. 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.