How to use the ember-classy-page-object.triggerable function in ember-classy-page-object

To help you get started, we’ve selected a few ember-classy-page-object examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Addepar / ember-table / addon-test-support / pages / -private / ember-table-body.js View on Github external
},

    toggleCollapse: alias('collapse.click'),

    isSelected: hasClass('is-selected'),

    /**
      Helper function to click with options like the meta key and ctrl key set

      @param {Object} options - click event options
    */
    async clickWith(options) {
      await click(findElement(this), options);
    },

    doubleClick: triggerable('dblclick'),
  }),

  /**
    A shortcut to return cell page object specified by row & column indexes.
  */
  getCell(rowIndex, columnIndex) {
    return this.rows.objectAt(rowIndex).cells.objectAt(columnIndex);
  },
});
github Addepar / ember-table / addon-test-support / pages / -private / ember-table-header.js View on Github external
/**
   * Retrieves selected header cell height.
   */
  get height() {
    return findElement(this).offsetHeight;
  },

  get isLeaf() {
    return findElement(this).dataset.testLeafHeader;
  },

  isFixedLeft: hasClass('is-fixed-left'),
  isFixedRight: hasClass('is-fixed-right'),

  contextMenu: triggerable('contextmenu'),

  /**
   * Resizes this column by dragging right border several pixels.
   */
  async resize(targetSize) {
    let resizeHandle = findElement(this, '.et-header-resize-area');

    if (!resizeHandle) {
      return;
    }

    let box = resizeHandle.getBoundingClientRect();
    let startX = (box.right + box.left) / 2;
    let deltaX = (targetSize - this.width) / getScale(resizeHandle);

    if (this.isFixedRight) {