@@ -861,42 +861,24 @@ suite('TeletypePackage', function () {
861861 const env = buildAtomEnvironment ( )
862862 const pack = await buildPackage ( env , { signIn : false } )
863863 pack . client . initialize = async function ( ) {
864- await Promise . resolve ( )
865864 throw new Errors . ClientOutOfDateError ( )
866865 }
867866
868- {
869- env . notifications . clear ( )
870-
871- await pack . sharePortal ( )
872-
873- assert . equal ( env . notifications . getNotifications ( ) . length , 1 )
874- const notification = env . notifications . getNotifications ( ) [ 0 ]
875- assert . equal ( notification . type , 'error' )
876- assert . equal ( notification . message , 'The teletype package is out of date' )
877- const openedURIs = [ ]
878- env . workspace . open = ( uri ) => openedURIs . push ( uri )
879- notification . options . buttons [ 0 ] . onDidClick ( )
880- assert . deepEqual ( openedURIs , [ 'atom://config/packages/teletype' ] )
881- assert ( notification . isDismissed ( ) )
882- }
867+ await pack . consumeStatusBar ( new FakeStatusBar ( ) )
868+ const { portalStatusBarIndicator} = pack
869+ const { popoverComponent} = portalStatusBarIndicator
870+ const { packageOutdatedComponent} = popoverComponent . refs
883871
872+ assert ( portalStatusBarIndicator . element . classList . contains ( 'outdated' ) )
884873
885- {
886- env . notifications . clear ( )
874+ assert ( packageOutdatedComponent )
875+ assert ( ! popoverComponent . refs . portalListComponent )
876+ assert ( ! popoverComponent . refs . signInComponent )
887877
888- await pack . joinPortal ( )
889-
890- assert . equal ( env . notifications . getNotifications ( ) . length , 1 )
891- const notification = env . notifications . getNotifications ( ) [ 0 ]
892- assert . equal ( notification . type , 'error' )
893- assert . equal ( notification . message , 'The teletype package is out of date' )
894- const openedURIs = [ ]
895- env . workspace . open = ( uri ) => openedURIs . push ( uri )
896- notification . options . buttons [ 0 ] . onDidClick ( )
897- assert . deepEqual ( openedURIs , [ 'atom://config/packages/teletype' ] )
898- assert ( notification . isDismissed ( ) )
899- }
878+ const openedURIs = [ ]
879+ env . workspace . open = ( uri ) => openedURIs . push ( uri )
880+ packageOutdatedComponent . refs . viewPackageSettingsButton . click ( )
881+ assert . deepEqual ( openedURIs , [ 'atom://config/packages/teletype' ] )
900882 } )
901883
902884 test ( 'reports errors attempting to initialize the client' , async ( ) => {
0 commit comments