refactor: 💡 Add await to invalidSession within desktop (#2598)
This commit is contained in:
1 parent
443f230251
commit
96b9a20844
7 files changed
+11
-11
No files matched your search
@@ -24,8 +24,8 @@ module('Acceptance | index', function (hooks) {
|
||||
clusterUrl: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
invalidateSession();
|
||||
hooks.beforeEach(async function () {
|
||||
await invalidateSession();
|
||||
|
||||
urls.clusterUrl = '/cluster-url';
|
||||
|
||||
|
||||
@@ -64,12 +64,12 @@ module('Acceptance | authentication', function (hooks) {
|
||||
clusterUrl.rendererClusterUrl = windowOrigin;
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.user = this.server.create('user', {
|
||||
scope: instances.scopes.global,
|
||||
});
|
||||
|
||||
invalidateSession();
|
||||
await invalidateSession();
|
||||
|
||||
// create scopes
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
|
||||
@@ -63,8 +63,8 @@ module('Acceptance | clusterUrl', function (hooks) {
|
||||
mockIPC = test.owner.lookup('service:browser/window').mockIPC;
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
invalidateSession();
|
||||
hooks.beforeEach(async function () {
|
||||
await invalidateSession();
|
||||
|
||||
// create scopes
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
|
||||
@@ -102,7 +102,7 @@ module('Acceptance | projects', function (hooks) {
|
||||
});
|
||||
|
||||
test('visiting index while unauthenticated redirects to global authenticate method', async function (assert) {
|
||||
invalidateSession();
|
||||
await invalidateSession();
|
||||
assert.expect(2);
|
||||
await visit(urls.projects);
|
||||
await a11yAudit();
|
||||
|
||||
@@ -163,7 +163,7 @@ module('Acceptance | projects | sessions | index', function (hooks) {
|
||||
});
|
||||
|
||||
test('visiting index while unauthenticated redirects to global authenticate method', async function (assert) {
|
||||
invalidateSession();
|
||||
await invalidateSession();
|
||||
this.stubCacheDaemonSearch();
|
||||
|
||||
await visit(urls.sessions);
|
||||
|
||||
@@ -165,7 +165,7 @@ module('Acceptance | projects | targets | index', function (hooks) {
|
||||
});
|
||||
|
||||
test('visiting index while unauthenticated redirects to global authenticate method', async function (assert) {
|
||||
invalidateSession();
|
||||
await invalidateSession();
|
||||
this.stubCacheDaemonSearch();
|
||||
await visit(urls.targets);
|
||||
await a11yAudit();
|
||||
|
||||
@@ -239,7 +239,7 @@ module('Acceptance | scopes', function (hooks) {
|
||||
});
|
||||
|
||||
test('visiting index while unauthenticated redirects to global authenticate method', async function (assert) {
|
||||
invalidateSession();
|
||||
await invalidateSession();
|
||||
assert.expect(2);
|
||||
this.stubCacheDaemonSearch();
|
||||
|
||||
@@ -363,7 +363,7 @@ module('Acceptance | scopes', function (hooks) {
|
||||
});
|
||||
|
||||
test('pagination is not supported - navigate to cluster url page', async function (assert) {
|
||||
invalidateSession();
|
||||
await invalidateSession();
|
||||
this.stubCacheDaemonSearch();
|
||||
this.ipcStub.withArgs('checkOS').returns({
|
||||
isWindows: true,
|
||||
|
||||
Reference in new issue
Block a user