@@ -599,4 +599,146 @@ describe('Box', () => {
599599 const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
600600 expect ( boxElement ) . toHaveClass ( 'lh-lg' ) ;
601601 } ) ;
602+
603+ test ( 'renders box component with order-0 class' , ( ) => {
604+ render ( < Box order = "0" > Hello, World!</ Box > ) ;
605+
606+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
607+ expect ( boxElement ) . toHaveClass ( 'order-0' ) ;
608+ } ) ;
609+
610+ test ( 'renders box component with order-1 class' , ( ) => {
611+ render ( < Box order = "1" > Hello, World!</ Box > ) ;
612+
613+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
614+ expect ( boxElement ) . toHaveClass ( 'order-1' ) ;
615+ } ) ;
616+
617+ test ( 'renders box component with order-2 class' , ( ) => {
618+ render ( < Box order = "2" > Hello, World!</ Box > ) ;
619+
620+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
621+ expect ( boxElement ) . toHaveClass ( 'order-2' ) ;
622+ } ) ;
623+
624+ test ( 'renders box component with order-3 class' , ( ) => {
625+ render ( < Box order = "3" > Hello, World!</ Box > ) ;
626+
627+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
628+ expect ( boxElement ) . toHaveClass ( 'order-3' ) ;
629+ } ) ;
630+
631+ test ( 'renders box component with order-4 class' , ( ) => {
632+ render ( < Box order = "4" > Hello, World!</ Box > ) ;
633+
634+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
635+ expect ( boxElement ) . toHaveClass ( 'order-4' ) ;
636+ } ) ;
637+
638+ test ( 'renders box component with order-5 class' , ( ) => {
639+ render ( < Box order = "5" > Hello, World!</ Box > ) ;
640+
641+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
642+ expect ( boxElement ) . toHaveClass ( 'order-5' ) ;
643+ } ) ;
644+
645+ test ( 'renders box component with responsive order classes' , ( ) => {
646+ render (
647+ < Box order = { { xs : '0' , sm : '1' , md : '2' , lg : '3' , xl : '4' , xxl : '5' } } >
648+ Hello, World!
649+ </ Box >
650+ ) ;
651+
652+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
653+ expect ( boxElement ) . toHaveClass ( 'order-0' ) ;
654+ expect ( boxElement ) . toHaveClass ( 'order-sm-1' ) ;
655+ expect ( boxElement ) . toHaveClass ( 'order-md-2' ) ;
656+ expect ( boxElement ) . toHaveClass ( 'order-lg-3' ) ;
657+ expect ( boxElement ) . toHaveClass ( 'order-xl-4' ) ;
658+ expect ( boxElement ) . toHaveClass ( 'order-xxl-5' ) ;
659+ } ) ;
660+
661+ test ( 'renders box component with order-first class' , ( ) => {
662+ render ( < Box order = "first" > Hello, World!</ Box > ) ;
663+
664+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
665+ expect ( boxElement ) . toHaveClass ( 'order-first' ) ;
666+ } ) ;
667+
668+ test ( 'renders box component with order-last class' , ( ) => {
669+ render ( < Box order = "last" > Hello, World!</ Box > ) ;
670+
671+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
672+ expect ( boxElement ) . toHaveClass ( 'order-last' ) ;
673+ } ) ;
674+
675+ test ( 'renders box component with responsive order-first class' , ( ) => {
676+ render ( < Box order = { { sm : 'first' } } > Hello, World!</ Box > ) ;
677+
678+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
679+ expect ( boxElement ) . toHaveClass ( 'order-sm-first' ) ;
680+ } ) ;
681+
682+ test ( 'renders box component with responsive order-last class' , ( ) => {
683+ render ( < Box order = { { sm : 'last' } } > Hello, World!</ Box > ) ;
684+
685+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
686+ expect ( boxElement ) . toHaveClass ( 'order-sm-last' ) ;
687+ } ) ;
688+
689+ test ( 'renders box component with responsive order-first class' , ( ) => {
690+ render ( < Box order = { { md : 'first' } } > Hello, World!</ Box > ) ;
691+
692+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
693+ expect ( boxElement ) . toHaveClass ( 'order-md-first' ) ;
694+ } ) ;
695+
696+ test ( 'renders box component with responsive order-last class' , ( ) => {
697+ render ( < Box order = { { md : 'last' } } > Hello, World!</ Box > ) ;
698+
699+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
700+ expect ( boxElement ) . toHaveClass ( 'order-md-last' ) ;
701+ } ) ;
702+
703+ test ( 'renders box component with responsive order-first class' , ( ) => {
704+ render ( < Box order = { { lg : 'first' } } > Hello, World!</ Box > ) ;
705+
706+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
707+ expect ( boxElement ) . toHaveClass ( 'order-lg-first' ) ;
708+ } ) ;
709+
710+ test ( 'renders box component with responsive order-last class' , ( ) => {
711+ render ( < Box order = { { lg : 'last' } } > Hello, World!</ Box > ) ;
712+
713+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
714+ expect ( boxElement ) . toHaveClass ( 'order-lg-last' ) ;
715+ } ) ;
716+
717+ test ( 'renders box component with responsive order-first class' , ( ) => {
718+ render ( < Box order = { { xl : 'first' } } > Hello, World!</ Box > ) ;
719+
720+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
721+ expect ( boxElement ) . toHaveClass ( 'order-xl-first' ) ;
722+ } ) ;
723+
724+ test ( 'renders box component with responsive order-last class' , ( ) => {
725+ render ( < Box order = { { xl : 'last' } } > Hello, World!</ Box > ) ;
726+
727+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
728+ expect ( boxElement ) . toHaveClass ( 'order-xl-last' ) ;
729+ } ) ;
730+
731+ test ( 'renders box component with responsive order-first class' , ( ) => {
732+ render ( < Box order = { { xxl : 'first' } } > Hello, World!</ Box > ) ;
733+
734+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
735+ expect ( boxElement ) . toHaveClass ( 'order-xxl-first' ) ;
736+ } ) ;
737+
738+ test ( 'renders box component with responsive order-last class' , ( ) => {
739+ render ( < Box order = { { xxl : 'last' } } > Hello, World!</ Box > ) ;
740+
741+ const boxElement = screen . getByText ( / H e l l o , W o r l d ! / i) ;
742+ expect ( boxElement ) . toHaveClass ( 'order-xxl-last' ) ;
743+ } ) ;
602744} ) ;
0 commit comments