How to use the ember-cli-page-object.contains 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 / header / pro.js View on Github external
export default create({
  visit: visitable('/'),
  logoPresent: contains('h1.logo', { scope: '.topbar' }),

  navigationLinks: collection('nav#navigation ul li', {
    title: text('a'),
  }),

  navDropdowns: collection('nav#navigation ul li:has(span.navigation-anchor)', {
    title: text('span.navigation-anchor'),
    childLinks: collection('ul.navigation-nested li', {
      title: text('a'),
    }),
  }),

  loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
  broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
  profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
});
github chrislopresto / ember-freestyle / tests / pages / freestyle-guide.js View on Github external
subsections: collection('.FreestyleSubsection',{
        text: text('.FreestyleSubsection-name'),
        collections: collection('.FreestyleCollection', {

          title: text('.FreestyleCollection-title'),
          activeVariantListItemLabel: contains('.FreestyleCollection-variantListItem--active'),

          selectVariant: clickOnText('.FreestyleCollection-variantListItem'),

          variantListItems: collection('.FreestyleCollection-variantListItem',{
            text: text()
          }),

          variants: collection('.FreestyleVariant',{
            contains: contains(),
            usageTitle: text('.FreestyleUsage-title'),
            annotationContains: contains('.FreestyleAnnotation'),
            noteContent: text('.FreestyleNotes-content', { multiple: true })
          })
        })
      })

    })
  }

});
github travis-ci / travis-web / tests / pages / repo / non-existent.js View on Github external
import {
  create,
  contains,
  visitable,
  text,
  isHidden
} from 'ember-cli-page-object';

export default create({
  visit: visitable('/non-existent/repository'),
  showsBarricadeIllustration: contains('svg', { scope: '.page-graphic' }),
  errorMessage: text('.missing-notice .page-title'),
  errorMessageProisHidden: isHidden('.missing-notice p'),
  errorMessageProUnauthenticated: contains('.missing-notice p')
});
github travis-ci / travis-web / tests / pages / header / default.js View on Github external
visit: visitable('/'),
  logoPresent: contains('h1.logo', { scope: '.topbar' }),

  navigationLinks: collection('nav#navigation ul li', {
    title: text('a'),
  }),

  helpDropdownPresent: contains('nav#navigation ul li span.navigation-anchor'),

  helpLinks: collection('nav#navigation ul li ul.navigation-nested li', {
    title: text('a'),
  }),

  loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
  broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
  profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),

  cta: { scope: '.cta p.row' },
});
github chrislopresto / ember-freestyle / tests / pages / freestyle-guide.js View on Github external
})
  },

  content: {
    scope: '.FreestyleGuide-content',

    sections: collection('.FreestyleSection',{

      text: text('.FreestyleSection-name'),

      subsections: collection('.FreestyleSubsection',{
        text: text('.FreestyleSubsection-name'),
        collections: collection('.FreestyleCollection', {

          title: text('.FreestyleCollection-title'),
          activeVariantListItemLabel: contains('.FreestyleCollection-variantListItem--active'),

          selectVariant: clickOnText('.FreestyleCollection-variantListItem'),

          variantListItems: collection('.FreestyleCollection-variantListItem',{
            text: text()
          }),

          variants: collection('.FreestyleVariant',{
            contains: contains(),
            usageTitle: text('.FreestyleUsage-title'),
            annotationContains: contains('.FreestyleAnnotation'),
            noteContent: text('.FreestyleNotes-content', { multiple: true })
          })
        })
      })
github travis-ci / travis-web / tests / pages / header / pro.js View on Github external
import {
  create,
  collection,
  contains,
  text,
  visitable,
} from 'ember-cli-page-object';

export default create({
  visit: visitable('/'),
  logoPresent: contains('h1.logo', { scope: '.topbar' }),

  navigationLinks: collection('nav#navigation ul li', {
    title: text('a'),
  }),

  navDropdowns: collection('nav#navigation ul li:has(span.navigation-anchor)', {
    title: text('span.navigation-anchor'),
    childLinks: collection('ul.navigation-nested li', {
      title: text('a'),
    }),
  }),

  loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
  broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
  profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
});
github travis-ci / travis-web / tests / pages / header / default.js View on Github external
create,
  contains,
  collection,
  text,
  visitable,
} from 'ember-cli-page-object';

export default create({
  visit: visitable('/'),
  logoPresent: contains('h1.logo', { scope: '.topbar' }),

  navigationLinks: collection('nav#navigation ul li', {
    title: text('a'),
  }),

  helpDropdownPresent: contains('nav#navigation ul li span.navigation-anchor'),

  helpLinks: collection('nav#navigation ul li ul.navigation-nested li', {
    title: text('a'),
  }),

  loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
  broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
  profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),

  cta: { scope: '.cta p.row' },
});
github travis-ci / travis-web / tests / pages / header / pro.js View on Github external
logoPresent: contains('h1.logo', { scope: '.topbar' }),

  navigationLinks: collection('nav#navigation ul li', {
    title: text('a'),
  }),

  navDropdowns: collection('nav#navigation ul li:has(span.navigation-anchor)', {
    title: text('span.navigation-anchor'),
    childLinks: collection('ul.navigation-nested li', {
      title: text('a'),
    }),
  }),

  loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
  broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
  profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
});
github travis-ci / travis-web / tests / pages / header / pro.js View on Github external
visit: visitable('/'),
  logoPresent: contains('h1.logo', { scope: '.topbar' }),

  navigationLinks: collection('nav#navigation ul li', {
    title: text('a'),
  }),

  navDropdowns: collection('nav#navigation ul li:has(span.navigation-anchor)', {
    title: text('span.navigation-anchor'),
    childLinks: collection('ul.navigation-nested li', {
      title: text('a'),
    }),
  }),

  loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
  broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
  profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),
});
github travis-ci / travis-web / tests / pages / header / default.js View on Github external
export default create({
  visit: visitable('/'),
  logoPresent: contains('h1.logo', { scope: '.topbar' }),

  navigationLinks: collection('nav#navigation ul li', {
    title: text('a'),
  }),

  helpDropdownPresent: contains('nav#navigation ul li span.navigation-anchor'),

  helpLinks: collection('nav#navigation ul li ul.navigation-nested li', {
    title: text('a'),
  }),

  loginLinkPresent: contains('.auth-button.signed-out', { scope: '.topbar nav#navigation ul li.menu.profile' }),
  broadcastsPresent: contains('.topbar .broadcast span.icon-broadcast.announcement'),
  profileLinkPresent: contains('.navigation-anchor.signed-in', { scope: '.topbar nav#navigation ul li.menu.profile.signed-in' }),

  cta: { scope: '.cta p.row' },
});