58 lines
1.4 KiB
JavaScript
58 lines
1.4 KiB
JavaScript
import { module, test } from 'qunit';
|
|
import { visit, currentURL, find } from '@ember/test-helpers';
|
|
import { setupApplicationTest } from 'ember-qunit';
|
|
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
|
|
import a11yAudit from 'ember-a11y-testing/test-support/audit';
|
|
import {
|
|
authenticateSession,
|
|
// These are left here intentionally for future reference.
|
|
//currentSession,
|
|
//invalidateSession,
|
|
} from 'ember-simple-auth/test-support';
|
|
|
|
module('Acceptance | users | list', function (hooks) {
|
|
setupApplicationTest(hooks);
|
|
setupMirage(hooks);
|
|
|
|
let usersURL;
|
|
|
|
const instances = {
|
|
scopes: {
|
|
global: null,
|
|
org: null,
|
|
}
|
|
};
|
|
|
|
const urls = {
|
|
scopes: {
|
|
org: null
|
|
},
|
|
users: null
|
|
};
|
|
|
|
hooks.beforeEach(function () {
|
|
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
|
instances.org = this.server.create(
|
|
'scope',
|
|
{
|
|
type: 'org',
|
|
scope: { id: 'global', type: 'global' },
|
|
},
|
|
'withChildren'
|
|
);
|
|
instances.user = this.server.create('user', {
|
|
scope: instances.org,
|
|
});
|
|
urls.users = `/scopes/${instances.org.id}/users`;
|
|
authenticateSession({});
|
|
});
|
|
|
|
test('can navigate to users with proper authorization', async function (assert) {
|
|
// TODO
|
|
});
|
|
|
|
test('cannot navigate to users with proper authorization', async function (assert) {
|
|
// TODO
|
|
});
|
|
});
|