Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert and Test compatibility with LTS 3.4 #656

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ module.exports = function() {
}
}
},
{
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
}
}
},
{
name: 'ember-release',
npm: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
15 changes: 12 additions & 3 deletions tests/integration/components/light-table-occlusion-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down Expand Up @@ -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');
});
Expand Down