From 0bb884b19ef80ff708297661ef108f0e004e4fd4 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Sat, 3 Oct 2020 12:37:03 -0400 Subject: [PATCH] chore: add test for authenticating in global scope --- ui/core/tests/acceptance/authentication-test.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ui/core/tests/acceptance/authentication-test.js b/ui/core/tests/acceptance/authentication-test.js index b5a4ba249..113a78c07 100644 --- a/ui/core/tests/acceptance/authentication-test.js +++ b/ui/core/tests/acceptance/authentication-test.js @@ -202,7 +202,19 @@ module('Acceptance | authentication', function (hooks) { assert.notOk(currentSession().isAuthenticated); }); - test('successful authentication redirects to projects', async function (assert) { + test('successful authentication with the global scope redirects to orgs', async function (assert) { + assert.expect(4); + await visit(authMethodGlobalAuthenticateURL); + assert.notOk(currentSession().isAuthenticated); + assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + await fillIn('[name="identification"]', 'test'); + await fillIn('[name="password"]', 'test'); + await click('[type="submit"]'); + assert.equal(currentURL(), orgsURL); + assert.ok(currentSession().isAuthenticated); + }); + + test('successful authentication with an org scope redirects to projects', async function (assert) { assert.expect(4); await visit(authMethodAuthenticateURL); assert.notOk(currentSession().isAuthenticated);