@@ -11,7 +11,7 @@ import { expect, config, assert } from 'chai';
1111import { TestSession } from '@salesforce/cli-plugins-testkit' ;
1212import { execCmd } from '@salesforce/cli-plugins-testkit' ;
1313import { getString } from '@salesforce/ts-types' ;
14- import { OrgListResult } from '../../src/commands/org/list' ;
14+ import { OrgListResult , defaultHubEmoji , defaultOrgEmoji } from '../../src/commands/org/list' ;
1515import { OrgOpenOutput } from '../../src/commands/org/open' ;
1616import { OrgDisplayReturn } from '../../src/shared/orgTypes' ;
1717
@@ -27,11 +27,11 @@ const verifyHumanResults = (
2727 expect ( lines . length ) . to . have . greaterThan ( 0 ) ;
2828 const devHubLine = lines . find ( ( line ) => line . includes ( hubOrgUsername ) ) ;
2929 assert ( devHubLine ) ;
30- expect ( devHubLine ) . to . include ( '(D)' ) ;
30+ expect ( devHubLine ) . to . include ( defaultHubEmoji ) ;
3131 expect ( devHubLine ) . to . include ( 'Connected' ) ;
3232 const defaultUserLine = lines . find ( ( line ) => line . includes ( defaultUsername ) ) ;
3333 assert ( defaultUserLine ) ;
34- expect ( defaultUserLine ) . to . include ( '(U)' ) ;
34+ expect ( defaultUserLine ) . to . include ( defaultOrgEmoji ) ;
3535 const aliasUserLine = lines . find ( ( line ) => line . includes ( aliasedUsername ) ) ;
3636 assert ( aliasUserLine ) ;
3737 expect ( aliasUserLine ) . to . include ( 'anAlias' ) ;
@@ -100,8 +100,8 @@ describe('Org Command NUT', () => {
100100 expect ( listResult . scratchOrgs ) . to . have . length ( 2 ) ;
101101 const scratchOrgs = listResult . scratchOrgs ;
102102 expect ( scratchOrgs . map ( ( scratchOrg ) => getString ( scratchOrg , 'username' ) ) ) . to . deep . equal ( [
103- defaultUsername ,
104103 aliasedUsername ,
104+ defaultUsername ,
105105 ] ) ;
106106 expect ( scratchOrgs . find ( ( org ) => org . username === defaultUsername ) ) . to . include ( {
107107 defaultMarker : '(U)' ,
@@ -121,6 +121,15 @@ describe('Org Command NUT', () => {
121121 } ,
122122 JSON . stringify ( listResult . nonScratchOrgs [ 0 ] )
123123 ) ;
124+ expect ( listResult . devHubs [ 0 ] ) . to . include (
125+ {
126+ username : hubOrgUsername ,
127+ defaultMarker : '(D)' ,
128+ isDevHub : true ,
129+ connectedStatus : 'Connected' ,
130+ } ,
131+ JSON . stringify ( listResult . nonScratchOrgs [ 0 ] )
132+ ) ;
124133 } ) ;
125134 it ( 'should list orgs - skip-connection-status' , ( ) => {
126135 const listResult = execCmd < OrgListResult > ( 'org:list --skip-connection-status --json' , { ensureExitCode : 0 } )
0 commit comments