@@ -29,7 +29,7 @@ describe("SignInPage", () => {
2929 screen . getByText ( / S i g n i n u s i n g y o u r c o m p a n y c r e d e n t i a l s / i) ,
3030 ) . toBeDefined ( ) ;
3131
32- expect ( screen . getByRole ( "button" , { name : / O i d c / i } ) ) . toBeDefined ( ) ;
32+ expect ( screen . getByRole ( "button" , { name : / S i g n i n / i } ) ) . toBeDefined ( ) ;
3333 } ) ;
3434
3535 test ( "calls authClient.signIn.oauth2 when button is clicked" , async ( ) => {
@@ -41,7 +41,7 @@ describe("SignInPage", () => {
4141
4242 render ( < SignInPage /> ) ;
4343
44- const signInButton = screen . getByRole ( "button" , { name : / O i d c / i } ) ;
44+ const signInButton = screen . getByRole ( "button" , { name : / S i g n i n / i } ) ;
4545 await user . click ( signInButton ) ;
4646
4747 await waitFor ( ( ) => {
@@ -62,7 +62,7 @@ describe("SignInPage", () => {
6262
6363 render ( < SignInPage /> ) ;
6464
65- const signInButton = screen . getByRole ( "button" , { name : / O i d c / i } ) ;
65+ const signInButton = screen . getByRole ( "button" , { name : / S i g n i n / i } ) ;
6666 await user . click ( signInButton ) ;
6767
6868 await waitFor ( ( ) => {
@@ -80,7 +80,7 @@ describe("SignInPage", () => {
8080
8181 render ( < SignInPage /> ) ;
8282
83- const signInButton = screen . getByRole ( "button" , { name : / O i d c / i } ) ;
83+ const signInButton = screen . getByRole ( "button" , { name : / S i g n i n / i } ) ;
8484 await user . click ( signInButton ) ;
8585
8686 await waitFor ( ( ) => {
@@ -98,7 +98,7 @@ describe("SignInPage", () => {
9898
9999 render ( < SignInPage /> ) ;
100100
101- const signInButton = screen . getByRole ( "button" , { name : / O i d c / i } ) ;
101+ const signInButton = screen . getByRole ( "button" , { name : / S i g n i n / i } ) ;
102102 await user . click ( signInButton ) ;
103103
104104 await waitFor ( ( ) => {
@@ -124,7 +124,7 @@ describe("SignInPage", () => {
124124 } ) ;
125125
126126 render ( < SignInPage /> ) ;
127- await user . click ( screen . getByRole ( "button" , { name : / O i d c / i } ) ) ;
127+ await user . click ( screen . getByRole ( "button" , { name : / S i g n i n / i } ) ) ;
128128
129129 await waitFor ( ( ) => {
130130 expect ( authClient . signOut ) . toHaveBeenCalledOnce ( ) ;
@@ -133,7 +133,7 @@ describe("SignInPage", () => {
133133 } ) ;
134134 } ) ;
135135
136- test ( "signin with okta provider" , async ( ) => {
136+ test ( "signin with custom provider id " , async ( ) => {
137137 const user = userEvent . setup ( ) ;
138138 vi . mocked ( authClient . signIn . oauth2 ) . mockResolvedValue ( {
139139 data : { url : "http://example.com" , redirect : true } ,
@@ -142,10 +142,9 @@ describe("SignInPage", () => {
142142
143143 render ( < SignInButton providerId = "okta" /> ) ;
144144
145- expect ( screen . getByRole ( "button" , { name : "Okta" } ) ) . toBeDefined ( ) ;
146-
147- const oktaButton = screen . getByRole ( "button" , { name : / O k t a / i } ) ;
148- await user . click ( oktaButton ) ;
145+ // Button always shows "Sign in" regardless of provider ID
146+ const signInButton = screen . getByRole ( "button" , { name : / S i g n i n / i } ) ;
147+ await user . click ( signInButton ) ;
149148
150149 await waitFor ( ( ) => {
151150 expect ( authClient . signIn . oauth2 ) . toHaveBeenCalledWith ( {
0 commit comments