...

Source file src/oss.terrastruct.com/d2/e2etests/root_test.go

Documentation: oss.terrastruct.com/d2/e2etests

     1  package e2etests
     2  
     3  import (
     4  	_ "embed"
     5  	"testing"
     6  )
     7  
     8  // testRoot tests things that affect the root, like background color
     9  func testRoot(t *testing.T) {
    10  	tcs := []testCase{
    11  		{
    12  			name: "fill",
    13  			script: `we all live; in a LightSteelBlue; submarine
    14  style.fill: LightSteelBlue
    15  `,
    16  		},
    17  		{
    18  			name: "stroke-no-width",
    19  			script: `we all live; in a LightSteelBlue; submarine
    20  style.fill: LightSteelBlue
    21  style.stroke: "#191970"
    22  `,
    23  		},
    24  		{
    25  			name: "stroke-width",
    26  			script: `we all live; in a LightSteelBlue; submarine
    27  style.fill: LightSteelBlue
    28  style.stroke: "#191970"
    29  style.stroke-width: 5
    30  `,
    31  		},
    32  		{
    33  			name: "even-stroke-width",
    34  			script: `we all live; in a LightSteelBlue; submarine
    35  style.fill: LightSteelBlue
    36  style.stroke: "#191970"
    37  style.stroke-width: 6
    38  `,
    39  		},
    40  		{
    41  			name: "border-radius",
    42  			script: `we all live; in a LightSteelBlue; submarine
    43  style.fill: LightSteelBlue
    44  style.stroke: "#191970"
    45  style.stroke-width: 5
    46  style.border-radius: 10
    47  `,
    48  		},
    49  		{
    50  			name: "stroke-dash",
    51  			script: `we all live; in a LightSteelBlue; submarine
    52  style.fill: LightSteelBlue
    53  style.stroke: "#191970"
    54  style.stroke-width: 3
    55  style.stroke-dash: 4
    56  `,
    57  		},
    58  		{
    59  			name: "double-border",
    60  			script: `we all live; in a LightSteelBlue; submarine
    61  style.fill: LightSteelBlue
    62  style.stroke: "#191970"
    63  style.stroke-width: 3
    64  style.double-border: true
    65  `,
    66  		},
    67  	}
    68  
    69  	runa(t, tcs)
    70  }
    71  

View as plain text