How to use the ember-cli-page-object.collection 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 travis-ci / travis-web / tests / pages / dashboard.js View on Github external
scope: '.dash-star',
    title: attribute('title')
  },
};

export default create({
  visit: visitable('/dashboard'),
  repoTitle: text('.repo-title'),
  accountFilter: clickable('.dashboard-header .organisation-filter .option-list a:first-of-type'),
  syncButton: clickable('.dashboard-header .sync-button button'),
  syncButtonIsSyncing: hasClass('is-syncing', '.dashboard-header .sync-button button'),

  activeRepos: {
    visit: clickable('[data-test-active-repos-tab]'),

    repos: collection('.dashboard-active .repo-list li.rows--dashboard', dashboardRowObject)
  },

  starredRepos: collection('.dashboard-starred .repo-list li.rows--dashboard', dashboardRowObject),
  paginationIsVisible: isVisible('.pagination-navigation'),
  paginationLinks: collection('.pagination-navigation li', {
    label: text('a'),
    page: clickable('a')
  }),
  flashMessage: text('.flash li.success'),

  myBuilds: {
    visit: clickable('[data-test-my-builds-tab]'),

    builds: collection('[data-test-my-build]', {
      owner: {
        scope: '[data-test-owner] a',
github ilios / frontend / tests / pages / components / curriculum-inventory-verification-preview-table1.js View on Github external
import {
  create,
  collection,
  text,
} from 'ember-cli-page-object';

const definition = {
  scope: '[data-test-curriculum-inventory-verification-preview-table1]',
  title: text('[data-test-title]'),
  table: {
    scope: 'table',
    headings: collection('thead tr th'),
    rows: collection('tbody tr', {
      id: text('td', {at: 0}),
      expectation: text('td', {at: 1}),
      pcrs: text('td', {at: 2}),
    }),
  },
};

export default definition;
export const component = create(definition);
github code-corps / code-corps-ember / tests / pages / admin / organization-invites / index.js View on Github external
import { collection, create, visitable } from 'ember-cli-page-object';

export default create({
  visit: visitable('/admin/organization-invites'),

  flashMessages: collection('.flash-messages--full-width', '.flash-message'),

  flashErrors: collection('.flash-messages--full-width .flash-message.alert-danger'),

  logItems: collection('[data-test-log-row]', {
    actions: {
      scope: '[data-test-actions]',
      button: { scope: 'button' }
    },
    approvalStatus: { scope: '[data-test-approval-status]' },
    email: { scope: '[data-test-email]' },
    icon: { scope: '[data-test-icon]' },
    name: { scope: '[data-test-name]' }
  })
});
github travis-ci / travis-web / tests / pages / profile.js View on Github external
repoFilter: {
        scope: '[data-test-repo-filter]',
        isPresent: isPresent(),
      },

      selectAll: {
        scope: '[data-test-select-all]',
        isPresent: isPresent(),
        checked: hasClass('travis-form__field-checkbox--checked', 'travis-form__field-checkbox')
      },

      repoList: {
        scope: '[data-test-repo-list]',
        isPresent: isPresent(),

        repos: collection('[data-test-repo]', {
          checked: hasClass('travis-form__field-checkbox--checked', 'travis-form__field-checkbox'),
          disabled: hasClass('travis-form__field-checkbox--disabled', 'travis-form__field-checkbox'),
        })
      },

      migrateButton: {
        scope: '[data-test-migrate-button]',
        isPresent: isPresent(),
        click: clickable()
      }

    }
  }
});
github code-corps / code-corps-ember / tests / pages / components / project-list.js View on Github external
import {
  attribute,
  collection,
  isVisible
} from 'ember-cli-page-object';

export default {
  scope: '.project-list',
  isVisible: isVisible(),
  items: collection('.project-item', { href: attribute('href', 'a:eq(0)') })
};
github ilios / frontend / tests / pages / components / curriculum-inventory-verification-preview-table3a.js View on Github external
import {
  create,
  collection,
  text,
} from 'ember-cli-page-object';

const definition = {
  scope: '[data-test-curriculum-inventory-verification-preview-table3a]',
  title: text('[data-test-title]'),
  table: {
    scope: 'table',
    headings: collection('thead tr th'),
    rows: collection('tbody tr', {
      title: text('td', {at: 0}),
      level: text('td', {at: 1}),
      weeks: text('td', {at: 2}),
      avg: text('td', {at: 3}),
    }),
  },
};

export default definition;
export const component = create(definition);
github onechiporenko / ember-models-table / tests / pages / models-table-bs.js View on Github external
out: triggerable('mouseleave'),
    getSelf() {
      return findElement(document, this.scope)[0];
    },
    getCellColspans() {
      return this.cells.mapBy('colspan');
    },
    cells: collection('td', {
      content: text(),
      colspan: attribute('colspan'),
      groupSummaryVisible: text('.visible'),
      groupSummaryExpanded: text('.expanded'),
      groupSummarySelected: text('.selected')
    })
  }),
  rowExpands: collection('tbody tr.expand-row', {
    selected: hasClass('selected-expand'),
    id: text('.id')
  }),
  groupByFieldExists: exists('.change-group-by-field'),
  focusGroupByField: clickable('.change-group-by-field'),
  changeGroupByField: fillable('.change-group-by-field'),
  groupByFieldOptions: collection('.change-group-by-field option', {
    label: text()
  }),
  sortByGroupedBy: clickable('.data-group-by-wrapper button'),

  /**
   * Use only when group-value is shown in the separated row!
   */
  groupingRowsByRow: collection('tbody tr.grouping-row', {
    cell: {