datahub/wherehows-web/tests/integration/components/dataset-aclaccess-users-test.js
Lee f0e970b465 Request merge ACL page to master (#930)
* finish the alc access page layout, logics and sass files

* Fix css issue and request permission response error message

* finish the testing part

* simplify code finished

* finish spinner

* Finished ACL access page, testing cases, clean code format

* Clean format, address comments, refactor JS code of ACL page to TS

* address comments, replace type any and fix merge issue
2018-02-07 12:32:03 -08:00

36 lines
977 B
JavaScript

import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('dataset-aclaccess-users', 'Integration | Component | dataset aclaccess users', {
integration: true
});
const user = {
userName: 'Mitchell_Rath',
name: 'Crawford MacGyver',
idType: 'USER',
source: 'WP',
modifiedTime: '2017-06-01T16:40:46.470Z',
ownerShip: 'DataOwner'
};
// TODO: Test the data-aclaccess-users component is working.
test('it renders', function(assert) {
const className = '.dataset-author-record';
this.setProperties({
user: user,
addOwner: function() {}
});
this.render(hbs`{{dataset-aclaccess-users
user=user
addOwner=addOwner}}`);
assert.ok(this.$(), 'Render without errors');
assert.equal(document.querySelector(className).tagName, 'TR', 'Component wrapper is <tr> tag');
assert.equal(this.get('user'), user, 'user property should equal to user');
});