mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-14 04:31:02 +00:00

* 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
36 lines
977 B
JavaScript
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');
|
|
});
|