How to use ember-classy-page-object - 10 common examples

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 ember-learn / ember-cli-addon-docs / tests / pages / guide.js View on Github external
import BaseAddonPage from './base';
import { collection } from 'ember-classy-page-object';

const GuidePage = BaseAddonPage.extend({
  navItems: collection({ scope: '[data-test-id="nav-item"]' }),

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  index: {
    scope: '[data-test-current-page-index]',

    items: collection({
      scope: '[data-test-index-item]'
    })
  }
});

export default GuidePage.create();
github ember-learn / ember-cli-addon-docs / tests / pages / api / module.js View on Github external
scope: '[data-test-toggle]'
  }),

  sections: collection({
    scope: '[data-test-api-section]',

    header: text('[data-test-section-header]'),

    items: collection({
      scope: '[data-test-item]',

      header: text('[data-test-item-header]'),
      importPath: text('[data-test-import-path]'),
      description: text('[data-test-item-description]'),

      params: collection({
        scope: '[data-test-item-params] [data-test-item-param]'
      })
    })
  }),

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  editLink: {
    scope: '[data-test-edit-page-link]',
    href: attribute('href', 'a'),
  },

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  index: {
    scope: '[data-test-page-index]',

    items: collection({
github ember-learn / ember-cli-addon-docs / tests / pages / guide.js View on Github external
import BaseAddonPage from './base';
import { collection } from 'ember-classy-page-object';

const GuidePage = BaseAddonPage.extend({
  navItems: collection({ scope: '[data-test-id="nav-item"]' }),

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  index: {
    scope: '[data-test-current-page-index]',

    items: collection({
      scope: '[data-test-index-item]'
    })
  }
});

export default GuidePage.create();
github ember-learn / ember-cli-addon-docs / tests / pages / api / module.js View on Github external
const ModulePage = BaseAddonPage.extend({
  navItems: collection({ scope: '[data-test-id="nav-item"]' }),

  toggles: collection({
    scope: '[data-test-toggle]'
  }),

  sections: collection({
    scope: '[data-test-api-section]',

    header: text('[data-test-section-header]'),

    items: collection({
      scope: '[data-test-item]',

      header: text('[data-test-item-header]'),
      importPath: text('[data-test-import-path]'),
      description: text('[data-test-item-description]'),

      params: collection({
        scope: '[data-test-item-params] [data-test-item-param]'
      })
    })
  }),

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  editLink: {
    scope: '[data-test-edit-page-link]',
    href: attribute('href', 'a'),
  },

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
github ember-learn / ember-cli-addon-docs / tests / pages / api / module.js View on Github external
navItems: collection({ scope: '[data-test-id="nav-item"]' }),

  toggles: collection({
    scope: '[data-test-toggle]'
  }),

  sections: collection({
    scope: '[data-test-api-section]',

    header: text('[data-test-section-header]'),

    items: collection({
      scope: '[data-test-item]',

      header: text('[data-test-item-header]'),
      importPath: text('[data-test-import-path]'),
      description: text('[data-test-item-description]'),

      params: collection({
        scope: '[data-test-item-params] [data-test-item-param]'
      })
    })
  }),

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  editLink: {
    scope: '[data-test-edit-page-link]',
    href: attribute('href', 'a'),
  },

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  index: {
github ember-learn / ember-cli-addon-docs / tests / pages / api / module.js View on Github external
import BaseAddonPage from '../base';
import { attribute, collection, text } from 'ember-classy-page-object';

const ModulePage = BaseAddonPage.extend({
  navItems: collection({ scope: '[data-test-id="nav-item"]' }),

  toggles: collection({
    scope: '[data-test-toggle]'
  }),

  sections: collection({
    scope: '[data-test-api-section]',

    header: text('[data-test-section-header]'),

    items: collection({
      scope: '[data-test-item]',

      header: text('[data-test-item-header]'),
      importPath: text('[data-test-import-path]'),
      description: text('[data-test-item-description]'),

      params: collection({
        scope: '[data-test-item-params] [data-test-item-param]'
      })
    })
  }),

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  editLink: {
github ember-learn / ember-cli-addon-docs / tests / pages / api / module.js View on Github external
toggles: collection({
    scope: '[data-test-toggle]'
  }),

  sections: collection({
    scope: '[data-test-api-section]',

    header: text('[data-test-section-header]'),

    items: collection({
      scope: '[data-test-item]',

      header: text('[data-test-item-header]'),
      importPath: text('[data-test-import-path]'),
      description: text('[data-test-item-description]'),

      params: collection({
        scope: '[data-test-item-params] [data-test-item-param]'
      })
    })
  }),

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  editLink: {
    scope: '[data-test-edit-page-link]',
    href: attribute('href', 'a'),
  },

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  index: {
    scope: '[data-test-page-index]',
github ember-learn / ember-cli-addon-docs / tests / pages / api / module.js View on Github external
scope: '[data-test-item]',

      header: text('[data-test-item-header]'),
      importPath: text('[data-test-import-path]'),
      description: text('[data-test-item-description]'),

      params: collection({
        scope: '[data-test-item-params] [data-test-item-param]'
      })
    })
  }),

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  editLink: {
    scope: '[data-test-edit-page-link]',
    href: attribute('href', 'a'),
  },

  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
  index: {
    scope: '[data-test-page-index]',

    items: collection({
      scope: '[data-test-index-item]'
    })
  }
});

export default ModulePage.create();
github ember-learn / ember-cli-addon-docs / tests / pages / api / class.js View on Github external
import BaseAddonPage from '../base';
import { collection, text } from 'ember-classy-page-object';

const ClassPage = BaseAddonPage.extend({
  navItems: collection({ scope: '[data-test-id="nav-item"]' }),

  title: text('[data-test-class-name]'),
  description: text('[data-test-class-description]'),

  sections: collection({
    scope: '[data-test-api-section]',

    header: text('[data-test-section-header]'),

    items: collection({
      scope: '[data-test-item]',

      header: text('[data-test-item-header]'),
      importPath: text('[data-test-import-path]'),
      description: text('[data-test-item-description]'),
github ember-learn / ember-cli-addon-docs / tests / pages / api / class.js View on Github external
import BaseAddonPage from '../base';
import { collection, text } from 'ember-classy-page-object';

const ClassPage = BaseAddonPage.extend({
  navItems: collection({ scope: '[data-test-id="nav-item"]' }),

  title: text('[data-test-class-name]'),
  description: text('[data-test-class-description]'),

  sections: collection({
    scope: '[data-test-api-section]',

    header: text('[data-test-section-header]'),

    items: collection({
      scope: '[data-test-item]',

      header: text('[data-test-item-header]'),
      importPath: text('[data-test-import-path]'),
      description: text('[data-test-item-description]'),

      params: collection({
        scope: '[data-test-item-params] [data-test-item-param]'
      })
    })
  })
});

export default new ClassPage();