Merge branch 'main' into feature-oidc-authenticate
This commit is contained in:
4 files changed
+25
-88
No files matched your search
@@ -5,7 +5,7 @@ import {
|
||||
fillIn,
|
||||
click,
|
||||
find,
|
||||
findAll,
|
||||
//findAll,
|
||||
getRootElement,
|
||||
//setupOnerror,
|
||||
} from '@ember/test-helpers';
|
||||
@@ -285,23 +285,26 @@ module('Acceptance | authentication', function (hooks) {
|
||||
assert.ok(currentSession().isAuthenticated);
|
||||
});
|
||||
|
||||
test('deauthentication redirects to first global authenticate method', async function (assert) {
|
||||
assert.expect(3);
|
||||
await visit(authMethodAuthenticateURL);
|
||||
await fillIn('[name="identification"]', 'test');
|
||||
await fillIn('[name="password"]', 'test');
|
||||
await click('[type="submit"]');
|
||||
assert.ok(currentSession().isAuthenticated);
|
||||
// Open header utilities dropdown
|
||||
await click('.rose-header-utilities .rose-dropdown summary');
|
||||
// Find and click on last element in dropdown - should be deauthenticate button
|
||||
const menu = findAll(
|
||||
'.rose-header-utilities .rose-dropdown .rose-dropdown-content button'
|
||||
);
|
||||
await click(menu[menu.length - 1]);
|
||||
assert.notOk(currentSession().isAuthenticated);
|
||||
assert.equal(currentURL(), authMethodGlobalAuthenticateURL);
|
||||
});
|
||||
// This test is disabled because it is no longer relevant. On deauth,
|
||||
// the page is reloaded. If the user was viewing a route requiring
|
||||
// authentication, they will be redirected accordingly.
|
||||
// test('deauthentication redirects to first global authenticate method', async function (assert) {
|
||||
// assert.expect(3);
|
||||
// await visit(authMethodAuthenticateURL);
|
||||
// await fillIn('[name="identification"]', 'test');
|
||||
// await fillIn('[name="password"]', 'test');
|
||||
// await click('[type="submit"]');
|
||||
// assert.ok(currentSession().isAuthenticated);
|
||||
// // Open header utilities dropdown
|
||||
// await click('.rose-header-utilities .rose-dropdown summary');
|
||||
// // Find and click on last element in dropdown - should be deauthenticate button
|
||||
// const menu = findAll(
|
||||
// '.rose-header-utilities .rose-dropdown .rose-dropdown-content button'
|
||||
// );
|
||||
// await click(menu[menu.length - 1]);
|
||||
// assert.notOk(currentSession().isAuthenticated);
|
||||
// assert.equal(currentURL(), authMethodGlobalAuthenticateURL);
|
||||
// });
|
||||
|
||||
test('401 responses result in deauthentication', async function (assert) {
|
||||
assert.expect(2);
|
||||
|
||||
Reference in new issue
Block a user