@@ -529,6 +529,51 @@ define(function (require, exports, module) {
529529 await popupToAppear ( SIGNIN_POPUP ) ;
530530 await verifyProfilePopupContent ( VIEW_TRIAL_DAYS_LEFT ,
531531 "trial user profile popup for logged out user" ) ;
532+
533+ // Close popup
534+ $profileButton . trigger ( 'click' ) ;
535+ } ) ;
536+
537+ it ( "should show free branding for user without pro subscription (expired trial)" , async function ( ) {
538+ console . log ( "llgT: Starting desktop trial user test" ) ;
539+
540+ // Setup: No pro subscription + active trial (15 days)
541+ setupProUserMock ( false ) ;
542+ await setupExpiredTrial ( ) ;
543+
544+ // Verify initial state (no pro branding)
545+ await verifyProBranding ( false , "no pro branding to start with" ) ;
546+
547+ // Perform login
548+ await performFullLoginFlow ( ) ;
549+
550+ // Verify pro branding remains after login
551+ await verifyProBranding ( false , "after trial free user login" ) ;
552+
553+ // Check profile popup shows free plan status
554+ const $profileButton = testWindow . $ ( "#user-profile-button" ) ;
555+ $profileButton . trigger ( 'click' ) ;
556+ await popupToAppear ( PROFILE_POPUP ) ;
557+ await verifyProfilePopupContent ( VIEW_PHOENIX_FREE ,
558+ "free plan user profile popup for logged in user" ) ;
559+
560+ // Close popup
561+ $profileButton . trigger ( 'click' ) ;
562+
563+ // Perform logout
564+ await performFullLogoutFlow ( ) ;
565+
566+ // Verify pro branding remains after logout (trial continues)
567+ await verifyProBranding ( false , "Trial branding to remain after logout" ) ;
568+
569+ // Check profile popup still shows free plan status as trial expired
570+ $profileButton . trigger ( 'click' ) ;
571+ await popupToAppear ( SIGNIN_POPUP ) ;
572+ // not logged in user, we wont show free plan tag as base editor is always free.
573+ expect ( testWindow . $ ( `.profile-popup .trial-plan-info` ) . length ) . toBe ( 0 ) ;
574+
575+ // Close popup
576+ $profileButton . trigger ( 'click' ) ;
532577 } ) ;
533578 } ) ;
534579 } ) ;
0 commit comments