From ca7d417bcce8a4fbb4683447aae000319de61db3 Mon Sep 17 00:00:00 2001 From: Gaurav Munjal Date: Thu, 13 Dec 2018 12:45:56 -0500 Subject: [PATCH] Assert and Test compatibility with LTS 3.4 --- .travis.yml | 1 + config/ember-try.js | 8 ++++++++ package.json | 2 +- .../components/light-table-occlusion-test.js | 15 ++++++++++++--- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1a83d19e..8fd186c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ env: - EMBER_TRY_SCENARIO=ember-lts-2.12 - EMBER_TRY_SCENARIO=ember-lts-2.16 - EMBER_TRY_SCENARIO=ember-lts-2.18 + - EMBER_TRY_SCENARIO=ember-lts-3.4 - EMBER_TRY_SCENARIO=ember-release - EMBER_TRY_SCENARIO=ember-beta - EMBER_TRY_SCENARIO=ember-canary diff --git a/config/ember-try.js b/config/ember-try.js index fb223111..17d73ab2 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -35,6 +35,14 @@ module.exports = function() { } } }, + { + name: 'ember-lts-3.4', + npm: { + devDependencies: { + 'ember-source': '~3.4.0' + } + } + }, { name: 'ember-release', npm: { diff --git a/package.json b/package.json index 1e325e9e..8b186c3a 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "configPath": "tests/dummy/config", "demoURL": "http://offirgolan.github.io/ember-light-table", "versionCompatibility": { - "ember": ">=2.3.0 <3.0.0" + "ember": ">=2.3.0 <4.0.0" } } } diff --git a/tests/integration/components/light-table-occlusion-test.js b/tests/integration/components/light-table-occlusion-test.js index c72a000e..43975426 100644 --- a/tests/integration/components/light-table-occlusion-test.js +++ b/tests/integration/components/light-table-occlusion-test.js @@ -10,12 +10,15 @@ import hasClass from '../../helpers/has-class'; import RowComponent from 'ember-light-table/components/lt-row'; import Component from '@ember/component'; import { get, computed } from '@ember/object'; +import { run } from '@ember/runloop'; +import registerWaiter from 'ember-raf-scheduler/test-support/register-waiter'; module('Integration | Component | light table | occlusion', function(hooks) { setupRenderingTest(hooks); setupMirageTest(hooks); hooks.beforeEach(function() { + registerWaiter(); this.actions = {}; this.send = (actionName, ...args) => this.actions[actionName].apply(this, args); }); @@ -177,15 +180,21 @@ module('Integration | Component | light table | occlusion', function(hooks) { assert.equal(findAll('.custom-row').length, 3, 'three custom rows were rendered'); assert.notOk(find('.custom-row.is-active'), 'none of the items are active'); - this.set('current', users[0]); + run(() => { + this.set('current', users[0]); + }); let firstRow = find('.custom-row:nth-child(2)'); assert.ok(hasClass(firstRow, 'is-active'), 'first custom row is active'); - this.set('current', users[2]); + run(() => { + this.set('current', users[2]); + }); let thirdRow = find('.custom-row:nth-child(4)'); assert.ok(hasClass(thirdRow, 'is-active'), 'third custom row is active'); - this.set('current', null); + run(() => { + this.set('current', null); + }); assert.notOk(find('.custom-row.is-active'), 'none of the items are active'); });