From e489b10d740e9bc3d728f0e8780862c186b0c416 Mon Sep 17 00:00:00 2001 From: "Mazzella, Jesse D. (ARC-TI)[KBR Wyle Services, LLC]" <jesse.d.mazzella@nasa.gov> Date: Mon, 29 Jan 2024 16:13:51 -0800 Subject: [PATCH] test: fix some existing tests --- src/plugins/userIndicator/pluginSpec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/userIndicator/pluginSpec.js b/src/plugins/userIndicator/pluginSpec.js index 76dd844b4a..d7f51e3262 100644 --- a/src/plugins/userIndicator/pluginSpec.js +++ b/src/plugins/userIndicator/pluginSpec.js @@ -75,7 +75,7 @@ describe('The User Indicator plugin', () => { it('exists', () => { userIndicator = openmct.indicators.indicatorObjects.find( (indicator) => indicator.key === 'user-indicator' - ).element; + ).component; const hasClockIndicator = userIndicator !== null && userIndicator !== undefined; expect(hasClockIndicator).toBe(true); @@ -89,9 +89,11 @@ describe('The User Indicator plugin', () => { userIndicator = openmct.indicators.indicatorObjects.find( (indicator) => indicator.key === 'user-indicator' - ).element; + ).component; - const userName = userIndicator.textContent.trim(); + expect(userIndicator).toBeDefined(); + expect(userIndicator).not.toBeNull(); + const userName = document.querySelector('[aria-label="User Role"]').textContent.trim(); expect(user.name).toEqual(USERNAME); expect(userName).toContain(USERNAME);