@@ -34,11 +34,13 @@ const userProfileHandler = ({
3434 passwordLoginEnabled,
3535 passwordChangeAllowed,
3636 emailTotalCount,
37+ hasPassword,
3738} : {
3839 emailChangeAllowed : boolean ;
3940 passwordLoginEnabled : boolean ;
4041 passwordChangeAllowed : boolean ;
4142 emailTotalCount : number ;
43+ hasPassword : boolean ;
4244} ) : GraphQLHandler =>
4345 mockUserProfileQuery ( ( ) =>
4446 HttpResponse . json ( {
@@ -47,6 +49,7 @@ const userProfileHandler = ({
4749 __typename : "BrowserSession" ,
4850 id : "session-id" ,
4951 user : {
52+ hasPassword,
5053 emails : {
5154 totalCount : emailTotalCount ,
5255 } ,
@@ -130,6 +133,7 @@ export const MultipleEmails: Story = {
130133 passwordChangeAllowed : true ,
131134 emailChangeAllowed : true ,
132135 emailTotalCount : 3 ,
136+ hasPassword : true ,
133137 } ) ,
134138 threeEmailsHandler ,
135139 ] ,
@@ -147,6 +151,7 @@ export const NoEmails: Story = {
147151 passwordChangeAllowed : true ,
148152 emailChangeAllowed : false ,
149153 emailTotalCount : 0 ,
154+ hasPassword : true ,
150155 } ) ,
151156 ] ,
152157 } ,
@@ -163,6 +168,7 @@ export const MultipleEmailsNoChange: Story = {
163168 passwordChangeAllowed : true ,
164169 emailChangeAllowed : false ,
165170 emailTotalCount : 3 ,
171+ hasPassword : true ,
166172 } ) ,
167173 threeEmailsHandler ,
168174 ] ,
@@ -180,6 +186,7 @@ export const NoEmailChange: Story = {
180186 passwordChangeAllowed : true ,
181187 emailChangeAllowed : false ,
182188 emailTotalCount : 1 ,
189+ hasPassword : true ,
183190 } ) ,
184191 ] ,
185192 } ,
@@ -196,6 +203,7 @@ export const NoPasswordChange: Story = {
196203 passwordChangeAllowed : false ,
197204 emailChangeAllowed : true ,
198205 emailTotalCount : 1 ,
206+ hasPassword : true ,
199207 } ) ,
200208 ] ,
201209 } ,
@@ -212,6 +220,7 @@ export const NoPasswordLogin: Story = {
212220 passwordChangeAllowed : false ,
213221 emailChangeAllowed : true ,
214222 emailTotalCount : 1 ,
223+ hasPassword : true ,
215224 } ) ,
216225 ] ,
217226 } ,
@@ -228,6 +237,7 @@ export const NoPasswordNoEmailChange: Story = {
228237 passwordChangeAllowed : false ,
229238 emailChangeAllowed : false ,
230239 emailTotalCount : 0 ,
240+ hasPassword : false ,
231241 } ) ,
232242 ] ,
233243 } ,
0 commit comments