@@ -24,12 +24,9 @@ type Story = StoryObj<typeof DsLoader>;
2424 * Default loader - rotating spinner arc
2525 */
2626export const Default : Story = {
27- args : {
28- 'data-testid' : 'loader' ,
29- } as React . ComponentProps < typeof DsLoader > ,
3027 play : async ( { canvasElement } ) => {
3128 const canvas = within ( canvasElement ) ;
32- const loader = canvas . getByTestId ( 'loader ') ;
29+ const loader = canvas . getByRole ( 'progressbar ') ;
3330
3431 await expect ( loader ) . toBeInTheDocument ( ) ;
3532 } ,
@@ -119,16 +116,15 @@ export const UsageExamples: Story = {
119116} ;
120117
121118/**
122- * Test that custom props (className, style, data-testid ) are forwarded to the container
119+ * Test that custom props (className, style) are forwarded to the container
123120 */
124121export const CustomProps : Story = {
125122 args : {
126123 className : styles . customPropsLoader ,
127- 'data-testid' : 'loader-test-id' ,
128- } as React . ComponentProps < typeof DsLoader > ,
124+ } ,
129125 play : async ( { canvasElement } ) => {
130126 const canvas = within ( canvasElement ) ;
131- const loader = canvas . getByTestId ( 'loader-test-id ') ;
127+ const loader = canvas . getByRole ( 'progressbar ') ;
132128
133129 await expect ( loader ) . toBeInTheDocument ( ) ;
134130 await expect ( loader . className ) . toContain ( 'customPropsLoader' ) ;
0 commit comments