@@ -385,6 +385,12 @@ define(function (require, exports, module) {
385385 ) ;
386386 }
387387
388+ function verifyProfileIconBlanked ( ) {
389+ const $profileIcon = testWindow . $ ( "#user-profile-button" ) ;
390+ const initialContent = $profileIcon . html ( ) ;
391+ expect ( initialContent ) . not . toContain ( 'TU' ) ;
392+ }
393+
388394 async function performFullLogoutFlow ( ) {
389395 // Click profile button to open popup
390396 const $profileButton = testWindow . $ ( "#user-profile-button" ) ;
@@ -411,6 +417,8 @@ define(function (require, exports, module) {
411417 "User to be signed out" ,
412418 10000
413419 ) ;
420+
421+ verifyProfileIconBlanked ( ) ;
414422 }
415423
416424 describe ( "Browser Login Tests" , function ( ) {
@@ -441,14 +449,13 @@ define(function (require, exports, module) {
441449 setupProUserMock ( false ) ;
442450
443451 // Verify initial state
444- const $profileIcon = testWindow . $ ( "#user-profile-button" ) ;
445- const initialContent = $profileIcon . html ( ) ;
446- expect ( initialContent ) . not . toContain ( 'TU' ) ;
452+ verifyProfileIconBlanked ( ) ;
447453
448454 // Perform login
449455 await performFullLoginFlow ( ) ;
450456
451457 // Verify profile icon updated with user initials
458+ const $profileIcon = testWindow . $ ( "#user-profile-button" ) ;
452459 const updatedContent = $profileIcon . html ( ) ;
453460 expect ( updatedContent ) . toContain ( 'svg' ) ;
454461 expect ( updatedContent ) . toContain ( 'TU' ) ;
0 commit comments