@@ -82,17 +82,6 @@ describe('profile', () => {
8282 expect ( htmlContent ) . toContain ( 'speedscope' )
8383 } )
8484
85- test ( 'uses provided passwords for authentication' , async ( ) => {
86- // When
87- await profile ( mockAdminSession , themeId , urlPath , true , 'themeAccessPassword' , 'storePassword' )
88-
89- // Then
90- expect ( ensureAuthenticatedStorefront ) . toHaveBeenCalledWith ( [ ] , 'themeAccessPassword' , {
91- forceRefresh : false ,
92- noPrompt : true ,
93- } )
94- } )
95-
9685 test ( 'throws error when fetch fails' , async ( ) => {
9786 // Given
9887 vi . mocked ( render ) . mockRejectedValue ( new Error ( 'Network error' ) )
@@ -120,22 +109,15 @@ describe('profile', () => {
120109 await expect ( result ) . rejects . toThrow ( 'Bad response: 404: {"error":"Some error message"}' )
121110 } )
122111
123- test ( 'throws error when an Admin API token is used' , async ( ) => {
112+ test ( 'throws error when a password is used' , async ( ) => {
124113 // When
125114 const result = profile ( mockAdminSession , themeId , urlPath , true , 'shpat_hello' , undefined )
126115
127116 // Then
128117 await expect ( result ) . rejects . toThrow (
129118 new AbortError (
130- 'Unable to use Admin API tokens with the profile command' ,
131- `To use this command with the --password flag you must:
132-
133- 1. Install the Theme Access app on your shop
134- 2. Generate a new password
135-
136- Alternatively, you can authenticate normally by not passing the --password flag.
137-
138- Learn more: https://shopify.dev/docs/storefronts/themes/tools/theme-access` ,
119+ 'Unable to use Admin API or Theme Access tokens with the profile command' ,
120+ 'You must authenticate manually by not passing the --password flag.' ,
139121 ) ,
140122 )
141123 } )
0 commit comments