File tree Expand file tree Collapse file tree
packages/ui-components/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,21 +36,27 @@ describe("DescriptionList", () => {
3636 } )
3737
3838 it ( "aligns terms to the right by default" , ( ) => {
39- render (
39+ const { container } = render (
4040 < DescriptionList >
4141 < DescriptionTerm > Term 3</ DescriptionTerm >
4242 < DescriptionDefinition > Definition 3</ DescriptionDefinition >
4343 </ DescriptionList >
4444 )
45+
46+ const dlElement = container . querySelector ( "dl" )
47+ expect ( dlElement ) . toHaveClass ( "align-right" )
4548 } )
4649
47- it ( "aligns terms to the left when specified " , ( ) => {
48- render (
50+ it ( "aligns terms to the left" , ( ) => {
51+ const { container } = render (
4952 < DescriptionList alignTerms = "left" >
5053 < DescriptionTerm > Left Term</ DescriptionTerm >
5154 < DescriptionDefinition > Definition for Left Term</ DescriptionDefinition >
5255 </ DescriptionList >
5356 )
57+
58+ const dlElement = container . querySelector ( "dl" )
59+ expect ( dlElement ) . toHaveClass ( "align-left" )
5460 } )
5561
5662 it ( "renders multiple terms and definitions in a single list" , ( ) => {
Original file line number Diff line number Diff line change 11/*
2- * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors
2+ * SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and Juno contributors
33 * SPDX-License-Identifier: Apache-2.0
44 */
55
You can’t perform that action at this time.
0 commit comments