From 8c70c1369b9f0916858022ee4e38412e068cb939 Mon Sep 17 00:00:00 2001 From: mkeemon Date: Tue, 19 Jul 2016 20:50:11 -0400 Subject: [PATCH] Adds $ declaration to all files where $ is used without Ember. prefix --- test-support/page-object/create.js | 2 ++ test-support/page-object/helpers.js | 2 ++ test-support/page-object/properties/custom-helper.js | 3 +++ 3 files changed, 7 insertions(+) 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);