From 15da4ea69fb1de33d904537c1806cbc739639ad1 Mon Sep 17 00:00:00 2001 From: Zhihe Li Date: Wed, 13 Dec 2023 14:46:10 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20failing=20tests=20f?= =?UTF-8?q?rom=20rebase=20onto=20main=20(#2045)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/controllers/scopes/scope/projects/targets/index.js | 4 +++- .../tests/acceptance/projects/targets/target-test.js | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/desktop/app/controllers/scopes/scope/projects/targets/index.js b/ui/desktop/app/controllers/scopes/scope/projects/targets/index.js index 05c0b72b9..3f42fb142 100644 --- a/ui/desktop/app/controllers/scopes/scope/projects/targets/index.js +++ b/ui/desktop/app/controllers/scopes/scope/projects/targets/index.js @@ -107,7 +107,9 @@ export default class ScopesScopeProjectsTargetsIndexController extends Controlle const { session_id, address, port, credentials, expiration } = connectionDetails; try { - session = await this.store.findRecord('session', session_id); + session = await this.store.findRecord('session', session_id, { + reload: true, + }); } catch (error) { /** * if the user cannot read or fetch the session we add the important diff --git a/ui/desktop/tests/acceptance/projects/targets/target-test.js b/ui/desktop/tests/acceptance/projects/targets/target-test.js index 00fcb00ed..322346bdf 100644 --- a/ui/desktop/tests/acceptance/projects/targets/target-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/target-test.js @@ -126,11 +126,10 @@ module('Acceptance | projects | targets | target', function (hooks) { this.ipcStub.withArgs('isClientDaemonRunning').returns(true); this.stubClientDaemonSearch( 'targets', + 'sessions', + 'sessions', + 'sessions', 'targets', - 'targets', - 'sessions', - 'sessions', - 'sessions', ); });