jonpitch/danger-brewing

View on GitHub
tests/pages/about.js

Summary

Maintainability
A
0 mins
Test Coverage
import {
  create,
  visitable,
  isVisible,
  text,
  attribute
} from 'ember-cli-page-object';

const url = '/about';

export default create({
  visit: visitable(url),
  url,

  read: {
    header: {
      scope: 'h2[data-test="read"]',
      isVisible: isVisible(),
      text: text()
    },
    link: {
      scope: 'p',
      text: text()
    }
  },

  contribute: {
    header: {
      scope: 'h2[data-test="contribute"]',
      isVisible: isVisible(),
      text: text()
    },
    link: {
      scope: 'a[data-test="contribute"]',
      url: attribute('href')
    }
  }
});