How to use the ember-cli-page-object.value function in ember-cli-page-object

To help you get started, we’ve selected a few ember-cli-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 chrislopresto / ember-freestyle / tests / pages / freestyle-dynamic.js View on Github external
hasClass,
  isVisible
} from 'ember-cli-page-object';

const blockContentInput = '.FreestyleDynamic-input:contains(blockContent) textarea';
const tastefulInput = '.FreestyleDynamic-input:contains(isTasteful:) input';
const selectInput = '.FreestyleDynamic-input:contains(size:) select';
const numberInput = '.FreestyleDynamic-input:contains(rank:) input';
const checkboxInput = '.FreestyleDynamic-input:contains(isVisible:) input';

export default PageObject.create({
  visit: visitable('/acceptance?s=Dynamic%20Properties'),

  snippet: text('.FreestyleUsage-snippet', { at: 3 }),

  blockContentInputValue: value(blockContentInput),
  blockContentRendered: text('.x-Bar-description'),
  fillInBlockContentInput: fillable(blockContentInput),
  keyUpBlockContentInput: triggerable('keyup', blockContentInput),
  async changeBlockContentInput(newValue) {
    await this.fillInBlockContentInput(newValue),
    await this.keyUpBlockContentInput()
  },
  toggleTastefulInput: clickable(tastefulInput),

  selectInputValue: value(selectInput),
  isSmall: hasClass('x-Bar--small', '.x-Bar'),
  isMedium: hasClass('x-Bar--medium', '.x-Bar'),
  changeSelectInput: fillable(selectInput),

  numberInputValue: value(numberInput),
  numberRendered: text('.x-Bar-rank'),
github code-corps / code-corps-ember / tests / pages / projects / new.js View on Github external
callout: {
      scope: '[data-test-callout]',

      copyButton: {
        scope: '[data-test-copy]'
      }
    },

    categoryCheckboxes,

    clickSubmit: clickable('[data-test-submit]'),

    errors: collection('.input-group.has-error'),

    descriptionValue: value('[name=description]'),

    imageDrop,

    inputDescription: fillable('[name=description]'),
    inputTitle: fillable('[name=title]'),

    skillsList: collection('.project-skills-list button', {
      text: text(),
      click: clickable()
    }),

    skillsTypeahead,

    slugValue: value('[name=slug]'),
    titleValue: value('[name=title]')
  }
github chrislopresto / ember-freestyle / tests / pages / freestyle-dynamic.js View on Github external
blockContentInputValue: value(blockContentInput),
  blockContentRendered: text('.x-Bar-description'),
  fillInBlockContentInput: fillable(blockContentInput),
  keyUpBlockContentInput: triggerable('keyup', blockContentInput),
  async changeBlockContentInput(newValue) {
    await this.fillInBlockContentInput(newValue),
    await this.keyUpBlockContentInput()
  },
  toggleTastefulInput: clickable(tastefulInput),

  selectInputValue: value(selectInput),
  isSmall: hasClass('x-Bar--small', '.x-Bar'),
  isMedium: hasClass('x-Bar--medium', '.x-Bar'),
  changeSelectInput: fillable(selectInput),

  numberInputValue: value(numberInput),
  numberRendered: text('.x-Bar-rank'),
  changeNumberInput: fillable(numberInput),

  checkboxInputValue: value(checkboxInput),
  isVisible: isVisible('.x-Bar'),
  toggleCheckbox: clickable(checkboxInput),
});
github code-corps / code-corps-ember / tests / pages / components / user-settings-form.js View on Github external
import imageDrop from 'code-corps-ember/tests/pages/components/image-drop';

export default {
  scope: '.user-settings-form',

  biography: fillable('input[name=biography]'),
  firstName: fillable('input[name=firstName]'),
  lastName: fillable('input[name=lastName]'),
  twitter: fillable('input[name=twitter]'),
  website: fillable('input[name=website]'),

  biographyValue: value('input[name=biography]'),
  firstNameValue: value('input[name=firstName]'),
  lastNameValue: value('input[name=lastName]'),
  twitterValue: value('input[name=twitter]'),
  websiteValue: value('input[name=website]'),

  saveVisible: isVisible('.save'),

  clickSave: clickable('.save'),

  imageDrop
};
github code-corps / code-corps-ember / tests / pages / projects / new.js View on Github external
descriptionValue: value('[name=description]'),

    imageDrop,

    inputDescription: fillable('[name=description]'),
    inputTitle: fillable('[name=title]'),

    skillsList: collection('.project-skills-list button', {
      text: text(),
      click: clickable()
    }),

    skillsTypeahead,

    slugValue: value('[name=slug]'),
    titleValue: value('[name=title]')
  }
});
github chrislopresto / ember-freestyle / tests / pages / freestyle-dynamic.js View on Github external
export default PageObject.create({
  visit: visitable('/acceptance?s=Dynamic%20Properties'),

  snippet: text('.FreestyleUsage-snippet', { at: 3 }),

  blockContentInputValue: value(blockContentInput),
  blockContentRendered: text('.x-Bar-description'),
  fillInBlockContentInput: fillable(blockContentInput),
  keyUpBlockContentInput: triggerable('keyup', blockContentInput),
  async changeBlockContentInput(newValue) {
    await this.fillInBlockContentInput(newValue),
    await this.keyUpBlockContentInput()
  },
  toggleTastefulInput: clickable(tastefulInput),

  selectInputValue: value(selectInput),
  isSmall: hasClass('x-Bar--small', '.x-Bar'),
  isMedium: hasClass('x-Bar--medium', '.x-Bar'),
  changeSelectInput: fillable(selectInput),

  numberInputValue: value(numberInput),
  numberRendered: text('.x-Bar-rank'),
  changeNumberInput: fillable(numberInput),

  checkboxInputValue: value(checkboxInput),
  isVisible: isVisible('.x-Bar'),
  toggleCheckbox: clickable(checkboxInput),
});
github ilios / frontend / tests / pages / components / global-search.js View on Github external
create,
  fillable,
  isVisible,
  property,
  text,
  value
} from 'ember-cli-page-object';

import courseSearchResult from './course-search-result';

const definition = {
  scope: '[data-test-global-search]',
  noResultsIsVisible: isVisible('.no-results'),
  input: fillable('input.global-search-input'),
  clickIcon: clickable('[data-test-search-icon]'),
  academicYear: value('[data-test-academic-year-filter]'),
  academicYearOptions: text('[data-test-academic-year-filter]'),
  courseTitleLinks: collection('.course-title-link'),
  selectAcademicYear: fillable('[data-test-academic-year-filter]'),
  schoolFilters: collection('[data-test-school-filters] [data-test-school-filter]', {
    isSelected: property('checked', 'input'),
    isDisabled: property('disabled', 'input'),
    school: text('label'),
    toggle: clickable('label'),
  }),
  searchResults: collection('[data-test-course-search-result]', courseSearchResult),
};

export default definition;
export const component = create(definition);
github ilios / frontend / tests / pages / course.js View on Github external
learningMaterials,
  meshTerms,
  taxonomies,
  collapsedTaxonomies,

  objectiveParentManager: {
    scope: '[data-test-course-objective-manager]',
    title: text('.objectivetitle'),
    groupTitle: text('.group-picker'),
    selectGroup: fillable('.group-picker select'),
    groups: collection({
      scope: '.group-picker select',
      itemScope: 'option',
      item: {
        title: text(),
        value: value(),
      },
    }),
    competencies: collection({
      scope: '.parent-picker',
      itemScope: '[data-test-competency]',
      item: {
        title: text('.competency-title'),
        selected: hasClass('selected', '.competency-title'),
        notSelected: notHasClass('selected', '.competency-title'),
        objectives: collection({
          scope: 'ul',
          itemScope: 'li',
          item: {
            title: text(),
            selected: hasClass('selected'),
            notSelected: notHasClass('selected'),
github code-corps / code-corps-ember / tests / pages / components / organization-settings-form.js View on Github external
export default {
  scope: '.organization-settings-form',

  description: {
    scope: 'input[name=description]',
    fillIn: fillable(),
    value: value()
  },

  imageDrop,

  name: {
    scope: 'input[name=name]',
    fillIn: fillable(),
    value: value()
  },

  save: {
    scope: '.save',
    click: clickable(),
    isVisible: isVisible()
  }
};
github ilios / frontend / tests / pages / components / dashboard-myreports.js View on Github external
} from 'ember-cli-page-object';

const definition = {
  scope: '[data-test-dashboard-myreports]',
  title: text('[data-test-title]'),
  addNewReport: clickable('[data-test-add-new-report] button'),
  reports: collection('[data-test-saved-reports] li', {
    title: text(),
    select: clickable('.clickable')
  }),
  selectedReport: {
    scope: '[data-test-selected-report]',
    title: text('[data-test-report-title]'),
    yearsFilterExists: isPresent('[data-test-year-filter]'),
    chooseYear: fillable('[data-test-year-filter]'),
    currentYear: value('[data-test-year-filter]'),
    results: collection('[data-test-results] li', {
      title: text(),
    }),
  },
  newReport: {
    scope: '[data-test-new-report]',
    setTitle: fillable('[data-test-report-title]'),
    chooseSchool: fillable('[data-test-report-school]'),
    chooseSubject: fillable('[data-test-report-subject]'),
    chooseObjectType: fillable('[data-test-report-object-type]'),
    chooseObject: fillable('[data-test-report-object]'),
    objectCount: count('[data-test-report-object] option'),
    chooseAcademicYear: fillable('[data-test-report-year-filter]'),
    fillMeshSearch: fillable('[data-test-mesh-manager] [data-test-search-box] input'),
    runMeshSearch: clickable('[data-test-mesh-manager] [data-test-search-box] .search-icon'),
    meshSearchResults: collection('[data-test-search-results] li', {