chore: add test for authenticating in global scope

This commit is contained in:
Randall Morey committed 2020-10-03 12:37:03 -04:00
1 parent 685b291a52
commit 0bb884b19e
1 file changed
+13 -1
@@ -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);