test('the composition of pages containing a getter based attribute is supported', async function(assert) {
    let inputPage = create({
      foo: value('input')
    });

    let page = create({
      scope: '.container',
      input: inputPage
    });
    await this.adapter.createTemplate(this, page, '<div class="container"><input value="Lorem ipsum"></div>');

    assert.equal(page.input.foo, 'Lorem ipsum');
  });
      label: text(".label")
    }
  }),

  openQuickMenu: clickable(".debug_navs_orders-nav .debug_ui_popup-menu .trigger"),

  stubOrders: clickable(".stubOrders"),
  createOrder: clickable(".createOrder"),

  // createOrder(){
  //   $(".createOrder").click();
  // },

  selectLocation(location) {
    return selectChoose(".locationContainer", location.get("label"));
  },

  toggleFilterOptions: clickable(".titleBar .action"),
  toggleIncludeDraft: clickable(".includeUnpublished input"),
  toggleIncludePublished: clickable(".includePublished input"),
  inputFilterQuery: value(".filterQuery input"),
  selectFilterItem(item) {
    return selectChoose(".itemFilterContainer", item.get("name"));
  },

  bannerIsVisible: isVisible(".debug_ui_alert-banner")
});


export { page };
Beispiel #3
0
    scope: '.debug_lists_filterable-label-list',
    itemScope: '.listRow',

    item: {
      label: text('.name')
    }
  }),

  fillNewPriceTierInput: fillable('.debug_ui_input-action-bar input'),
  submitNewPriceTier: clickable('.debug_ui_input-action-bar .debug_ui_icon-button')
});

const show = create({
  scope: '.priceTierContainer',
  visit: visitable('/price-tiers/:id'),
  name: value('.priceTierName input'),

  openPriceRows: collection({
    itemScope: '.openItemPricesContainer .debug_ui_price-row',

    item: {
      itemName: text('.name'),
      price: text('.price')
    }
  }),

  fulfilledPriceRows: collection({
    itemScope: '.fulfilledItemPricesContainer .debug_ui_price-row',

    item: {
      itemName: text('.name'),
Beispiel #4
0
import {
  create,
  collection,
  value,
  text,
  visitable,
  fillable,
  clickable } from "ember-cli-page-object";

export default create({
  visit: visitable("/users"),

  users: collection({
    itemScope: ".debug_sections_users_user-table_table-row",

    item: {
      firstName: value(".firstNameContainer input"),
      lastName: value(".lastNameContainer input"),
      email: value(".emailContainer input"),
      password: value(".passwordContainer input"),
      role: text(".roleContainer .ember-power-select-selected-item"),
      phone: value(".phoneContainer input"),
      delete: clickable(".delete")
    }
  }),

  fillFilterInput: fillable(".filterTermInput")
});
  collection,
  text,
  visitable,
  value,
  hasClass } from "ember-cli-page-object";

const page = create({
  visit: visitable("/sales-orders/:id")
});

const orderEditorPO = create({
  scope: ".debug_ui_order-editor",
  orderNumber: text(".orderNumber"),
  locationName: text(".locationInfo"),
  companyName: text(".company"),
  deliveryDate: value(".deliveryDate"),
  salesOrderItems: collection({
    itemScope: ".debug_ui_order-editor_order-item-editor",

    item: {
      name: text(".name"),
      quantity: text(".quantity"),
      total: text(".unitPriceContainer .label")
    }
  }),

  addProduct(item) {
    return selectChoose(".addOrderItemContainer", item.get("name"));
  },

  changeDeliveryDate(date) {
Beispiel #6
0
import { collection, clickable, fillable, text, value } from 'ember-cli-page-object';

export default {
  tabs: collection('[data-test-auth-method]', {
    name: text(),
    link: clickable('[data-test-auth-method-link]'),
  }),
  selectMethod: fillable('[data-test-method-select]'),
  username: fillable('[data-test-username]'),
  token: fillable('[data-test-token]'),
  tokenValue: value('[data-test-token]'),
  password: fillable('[data-test-password]'),
  errorText: text('[data-test-auth-error]'),
  login: clickable('[data-test-auth-submit]'),
};
export const definition = {
  scope: '.models-table-wrapper',
  tablesCount: count('table'),
  summary: text('.table-summary'),
  globalFilterLabel: text('.globalSearch label'),
  doGlobalFilter: fillable('.filterString'),
  clearGlobalFilter: clickable('.globalSearch .clearFilterIcon'),
  clearGlobalFilterExists: exists('.globalSearch .clearFilterIcon'),
  clearGlobalFilterDisabled: attribute('disabled', '.globalSearch .clearFilterIcon'),
  tableFooterCount: count('.table-footer'),
  clearAllFilters: clickable('.clearFilters'),
  clearAllFiltersExists: exists('.clearFilters'),
  clearAllFiltersDisabled: attribute('disabled', '.clearFilters'),
  changePageSize: fillable('select.changePageSize'),
  pageSize: value('select.changePageSize'),
  expandAllRows: clickable('thead .expand-all-rows'),
  collapseAllRows: clickable('thead .collapse-all-rows'),
  toggleAllSelection: clickable('thead .toggle-all'),
  expandRowButtons: count('a.expand-row'),
  collapseRowButtons: count('a.collapse-row'),
  filters: collection('table thead tr:eq(1) th', {
    content: text(),
    inputFilter: fillable('input'),
    inputValue: value('input'),
    inputPlaceholder: attribute('placeholder', 'input'),
    inputFilterExists: exists('input'),
    clearFilter: clickable('.clearFilterIcon'),
    clearFilterExists: exists('.clearFilterIcon'),
    clearFilterDisabled: attribute('disabled', '.clearFilterIcon'),
    selectFilter: fillable('select'),
import { create, visitable, count, value } from "ember-cli-page-object";

export default create({
  visit: visitable('/customers/:id'),

  locationCount: count('.location'),

  name: value('.debug_sections_companies_company-settings .name'),
  code: value('.debug_sections_companies_company-settings .code')
});
import { clickable, fillable, text, value } from 'ember-cli-page-object';
import fields from './form-field';
import errorText from './message-in-page';

export default {
  ...fields,
  ...errorText,
  header: text('[data-test-mount-form-header]'),
  submit: clickable('[data-test-mount-submit]'),
  path: fillable('[data-test-input="path"]'),
  pathValue: value('[data-test-input="path"]'),
  type: fillable('[data-test-input="type"]'),
  typeValue: value('[data-test-input="type"]'),
};
  scope: '.reset-password-form',

  sendResetPasswordSuccessfully(password, passwordConfirmation) {
    this.password(password).passwordConfirmation(passwordConfirmation).submit();
  },

  password: fillable('#password'),
  passwordLabel: text('[data-test-id="password-label"]'),
  passwordConfirmationLabel: text('[data-test-id="password-confirmation-label"]'),

  passwordConfirmation: fillable('#password-confirmation'),

  passwordInput: {
    scope: '#password',
    isVisible: isVisible(),
    value: value(),
    property: property('type')
  },

  passwordConfirmationInput: {
    scope: '#password-confirmation',
    isVisible: isVisible(),
    value: value(),
    property: property('type')
  },

  button: {
    scope: 'button'
  },

  submit: clickable('button')