github.com/redhat-appstudio/e2e-tests@v0.0.0-20240520140907-9709f6f59323/templates/specs.tmpl (about) 1 {{ define "specs" }} 2 {{ range .Nodes }} 3 {{ if eq .Name "DescribeTable" }} 4 {{ .Name }}("{{ .Text }} is table", 5 func() { 6 {{range .Nodes }} 7 {{ if eq .Name "By" }} 8 {{ .Name }}("{{ .Text }}") 9 {{ end -}} 10 {{ end -}} 11 }, 12 {{range .Nodes }} 13 {{ if eq .Name "Entry" }} 14 {{ .Name }}("{{ .Text }}",), 15 {{ end -}} 16 {{ end -}} 17 ) 18 {{ end -}} 19 {{ if ne .Name "DescribeTable" }} 20 {{ .Name }}("{{ .Text }}", {{range .Labels }}Label("{{.}}"), {{ end }}func() { 21 // Declare variables here. 22 {{range .Nodes }} 23 {{ if eq .Name "DescribeTable" }} 24 {{ .Name }}("{{ .Text }}", 25 func() { 26 {{range .Nodes }} 27 {{ if eq .Name "By" }} 28 {{ .Name }}("{{ .Text }}") 29 {{ end -}} 30 {{ end -}} 31 }, 32 {{range .Nodes }} 33 {{ if eq .Name "Entry" }} 34 {{ .Name }}("{{ .Text }}",), 35 {{ end -}} 36 {{ end -}} 37 ) 38 {{ end -}} 39 {{ if eq .Name "By" }} 40 {{ .Name }}("{{ .Text }}") 41 {{ continue }} 42 {{ end -}} 43 {{ if eq .Name "Entry" }} 44 {{ continue }} 45 {{ end -}} 46 {{ if ne .Name "DescribeTable" -}} 47 {{ .Name }}("{{ .Text }}", {{range .Labels }}Label("{{.}}"), {{ end }} func() { 48 {{ if eq .Name "It" -}} 49 // Implement test and assertions here 50 {{ end -}} 51 {{ range .Nodes -}} 52 {{ if eq .Name "DescribeTable" -}} 53 {{ .Name }}("{{ .Text }}", 54 func() { 55 {{range .Nodes -}} 56 {{ if eq .Name "By" -}} 57 {{ .Name }}("{{ .Text }}") 58 {{ end -}} 59 {{ end -}} 60 }, 61 {{range .Nodes -}} 62 {{ if eq .Name "Entry" -}} 63 {{ .Name }}("{{ .Text }}",), 64 {{ end -}} 65 {{ end -}} 66 ) 67 {{ end }} 68 {{ if eq .Name "By" -}} 69 {{ .Name }}("{{ .Text }}") 70 {{ continue }} 71 {{ end -}} 72 {{ if eq .Name "Entry" -}} 73 {{ continue }} 74 {{ end -}} 75 {{ if ne .Name "DescribeTable" -}} 76 {{ .Name }}("{{ .Text }}", {{range .Labels }}Label("{{.}}"), {{ end }} func() { 77 {{ if eq .Name "It" -}} 78 // Implement test and assertions here 79 {{ end -}} 80 {{ range .Nodes -}} 81 {{ if eq .Name "DescribeTable" -}} 82 {{ .Name }}("{{ .Text }}", 83 func() { 84 {{range .Nodes }} 85 {{ if eq .Name "By" }} 86 {{ .Name }}("{{ .Text }}") 87 {{ end -}} 88 {{ end -}} 89 }, 90 {{range .Nodes }} 91 {{ if eq .Name "Entry" }} 92 {{ .Name }}("{{ .Text }}",), 93 {{ end -}} 94 {{ end -}} 95 ) 96 {{ end -}} 97 {{ if eq .Name "By" }} 98 {{ .Name }}("{{ .Text }}") 99 {{ continue }} 100 {{ end -}} 101 {{ if eq .Name "Entry" }} 102 {{ continue }} 103 {{ end -}} 104 {{ if ne .Name "DescribeTable" }} 105 {{ .Name }}("{{ .Text }}", {{range .Labels }}Label("{{.}}"), {{ end }} func() { 106 {{ if eq .Name "It" -}} 107 // Implement test and assertions here 108 {{ end }} 109 }) 110 {{ end -}} 111 {{ end }} 112 }) 113 {{ end -}} 114 {{ end }} 115 }) 116 {{ end -}} 117 {{ end }} 118 }) 119 {{ end -}} 120 {{ end -}} 121 {{ end }}