diff --git a/test-support/page-object/create.js b/test-support/page-object/create.js index d92a8fa5..d80defe7 100644 --- a/test-support/page-object/create.js +++ b/test-support/page-object/create.js @@ -7,6 +7,8 @@ import clickable from './properties/clickable'; import contains from './properties/contains'; import text from './properties/text'; +const { $ } = Ember; + function Node() { this.isHidden = isHidden().propertyFor(this, 'isHidden'); this.isVisible = isVisible().propertyFor(this, 'isVisible'); diff --git a/test-support/page-object/helpers.js b/test-support/page-object/helpers.js index ca3b9c03..482c4900 100644 --- a/test-support/page-object/helpers.js +++ b/test-support/page-object/helpers.js @@ -1,5 +1,7 @@ import Ember from 'ember'; +const { $ } = Ember; + export function qualifySelector(...selectors) { return selectors.filter(item => !!item).join(' '); } diff --git a/test-support/page-object/properties/custom-helper.js b/test-support/page-object/properties/custom-helper.js index 8cba5b44..a34c7c13 100644 --- a/test-support/page-object/properties/custom-helper.js +++ b/test-support/page-object/properties/custom-helper.js @@ -1,7 +1,10 @@ import { create } from '../create'; import Descriptor from '../descriptor'; +import Ember from 'ember'; import { qualifySelector } from '../helpers'; +const { $ } = Ember; + function action(target, key, options, ...args){ let selector = qualifySelector(options.scope || target.scope, options.selector);