@@ -64,11 +64,11 @@ describe('ObjectForm with MSW Integration', () => {
6464
6565 // Wait for form to load
6666 await waitFor ( ( ) => {
67- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
67+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
6868 } ) ;
6969
7070 expect ( screen . getByLabelText ( / E m a i l / i) ) . toBeInTheDocument ( ) ;
71- expect ( screen . getByLabelText ( / P h o n e N u m b e r / i) ) . toBeInTheDocument ( ) ;
71+ expect ( screen . getByLabelText ( / ^ P h o n e / i) ) . toBeInTheDocument ( ) ;
7272 expect ( screen . getByLabelText ( / C o m p a n y / i) ) . toBeInTheDocument ( ) ;
7373 expect ( screen . getByLabelText ( / P o s i t i o n / i) ) . toBeInTheDocument ( ) ;
7474 expect ( screen . getByLabelText ( / P r i o r i t y / i) ) . toBeInTheDocument ( ) ;
@@ -95,13 +95,13 @@ describe('ObjectForm with MSW Integration', () => {
9595
9696 // Wait for form to load
9797 await waitFor ( ( ) => {
98- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
98+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
9999 } ) ;
100100
101101 // Fill in the form
102- await user . type ( screen . getByLabelText ( / F u l l N a m e / i) , 'Test User' ) ;
102+ await user . type ( screen . getByLabelText ( / ^ N a m e / i) , 'Test User' ) ;
103103 await user . type ( screen . getByLabelText ( / E m a i l / i) , 'test@example.com' ) ;
104- await user . type ( screen . getByLabelText ( / P h o n e N u m b e r / i) , '+1234567890' ) ;
104+ await user . type ( screen . getByLabelText ( / ^ P h o n e / i) , '+1234567890' ) ;
105105 await user . type ( screen . getByLabelText ( / C o m p a n y / i) , 'Test Company' ) ;
106106
107107 // Submit the form
@@ -138,7 +138,7 @@ describe('ObjectForm with MSW Integration', () => {
138138 ) ;
139139
140140 await waitFor ( ( ) => {
141- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
141+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
142142 } ) ;
143143
144144 // Try to submit without filling required fields
@@ -169,11 +169,11 @@ describe('ObjectForm with MSW Integration', () => {
169169 ) ;
170170
171171 await waitFor ( ( ) => {
172- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
172+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
173173 } ) ;
174174
175175 // Fill required fields only
176- await user . type ( screen . getByLabelText ( / F u l l N a m e / i) , 'Default Test' ) ;
176+ await user . type ( screen . getByLabelText ( / ^ N a m e / i) , 'Default Test' ) ;
177177 await user . type ( screen . getByLabelText ( / E m a i l / i) , 'default@example.com' ) ;
178178
179179 // Submit
@@ -207,7 +207,7 @@ describe('ObjectForm with MSW Integration', () => {
207207
208208 // Wait for data to load
209209 await waitFor ( ( ) => {
210- const nameInput = screen . getByLabelText ( / F u l l N a m e / i) as HTMLInputElement ;
210+ const nameInput = screen . getByLabelText ( / ^ N a m e / i) as HTMLInputElement ;
211211 expect ( nameInput . value ) . toBe ( 'John Doe' ) ;
212212 } ) ;
213213
@@ -238,12 +238,12 @@ describe('ObjectForm with MSW Integration', () => {
238238
239239 // Wait for data to load
240240 await waitFor ( ( ) => {
241- const nameInput = screen . getByLabelText ( / F u l l N a m e / i) as HTMLInputElement ;
241+ const nameInput = screen . getByLabelText ( / ^ N a m e / i) as HTMLInputElement ;
242242 expect ( nameInput . value ) . toBe ( 'John Doe' ) ;
243243 } ) ;
244244
245245 // Update the name
246- const nameInput = screen . getByLabelText ( / F u l l N a m e / i) ;
246+ const nameInput = screen . getByLabelText ( / ^ N a m e / i) ;
247247 await user . clear ( nameInput ) ;
248248 await user . type ( nameInput , 'John Doe Updated' ) ;
249249
@@ -299,7 +299,7 @@ describe('ObjectForm with MSW Integration', () => {
299299 ) ;
300300
301301 await waitFor ( ( ) => {
302- const nameInput = screen . getByLabelText ( / F u l l N a m e / i) as HTMLInputElement ;
302+ const nameInput = screen . getByLabelText ( / ^ N a m e / i) as HTMLInputElement ;
303303 expect ( nameInput . value ) . toBe ( 'John Doe' ) ;
304304 expect ( nameInput . disabled ) . toBe ( true ) ;
305305 } ) ;
@@ -324,7 +324,7 @@ describe('ObjectForm with MSW Integration', () => {
324324 ) ;
325325
326326 await waitFor ( ( ) => {
327- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
327+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
328328 } ) ;
329329
330330 const checkbox = screen . getByLabelText ( / A c t i v e / i) as HTMLInputElement ;
@@ -345,7 +345,7 @@ describe('ObjectForm with MSW Integration', () => {
345345 ) ;
346346
347347 await waitFor ( ( ) => {
348- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
348+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
349349 } ) ;
350350
351351 const numberInput = screen . getByLabelText ( / P r i o r i t y / i) as HTMLInputElement ;
@@ -366,7 +366,7 @@ describe('ObjectForm with MSW Integration', () => {
366366 ) ;
367367
368368 await waitFor ( ( ) => {
369- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
369+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
370370 } ) ;
371371
372372 const textarea = screen . getByLabelText ( / N o t e s / i) as HTMLTextAreaElement ;
@@ -387,10 +387,10 @@ describe('ObjectForm with MSW Integration', () => {
387387 ) ;
388388
389389 await waitFor ( ( ) => {
390- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
390+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
391391 } ) ;
392392
393- const phoneInput = screen . getByLabelText ( / P h o n e N u m b e r / i) as HTMLInputElement ;
393+ const phoneInput = screen . getByLabelText ( / ^ P h o n e / i) as HTMLInputElement ;
394394 expect ( phoneInput . type ) . toBe ( 'tel' ) ;
395395 } ) ;
396396 } ) ;
@@ -415,7 +415,7 @@ describe('ObjectForm with MSW Integration', () => {
415415 ) ;
416416
417417 await waitFor ( ( ) => {
418- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
418+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
419419 } ) ;
420420
421421 const cancelButton = screen . getByRole ( 'button' , { name : / c a n c e l / i } ) ;
@@ -445,10 +445,10 @@ describe('ObjectForm with MSW Integration', () => {
445445 ) ;
446446
447447 await waitFor ( ( ) => {
448- expect ( screen . getByLabelText ( / F u l l N a m e / i) ) . toBeInTheDocument ( ) ;
448+ expect ( screen . getByLabelText ( / ^ N a m e / i) ) . toBeInTheDocument ( ) ;
449449 } ) ;
450450
451- await user . type ( screen . getByLabelText ( / F u l l N a m e / i) , 'Persist Test' ) ;
451+ await user . type ( screen . getByLabelText ( / ^ N a m e / i) , 'Persist Test' ) ;
452452 await user . type ( screen . getByLabelText ( / E m a i l / i) , 'persist@example.com' ) ;
453453 await user . click ( screen . getByRole ( 'button' , { name : / c r e a t e / i } ) ) ;
454454
0 commit comments