github.com/redhat-appstudio/e2e-tests@v0.0.0-20240520140907-9709f6f59323/templates/default/recommended.tmpl (about)

     1  package {{ .CustomData.PackageName }}
     2  
     3  /* This was generated from a template file. Please feel free to update as necessary!
     4     a couple things to note:
     5      - Remember to implement specific logic of the service/domain you are trying to test if it not already there in the pkg/
     6  
     7      - To include the tests as part of the E2E Test suite:
     8         - Update the pkg/framework/describe.go to include the `Describe func` of this new test suite, If you haven't already done so.
     9         - Import this new package into the cmd/e2e_test.go
    10  */
    11  
    12  import (
    13  	. "github.com/onsi/ginkgo/v2"
    14  	. "github.com/onsi/gomega"
    15  
    16      "fmt"
    17  	"strings"
    18  	"time"
    19      "encoding/json"
    20      "context"
    21  
    22  
    23      "github.com/redhat-appstudio/e2e-tests/pkg/framework"
    24      //framework imports edit as required
    25      "github.com/redhat-appstudio/e2e-tests/pkg/constants"
    26  	"github.com/redhat-appstudio/e2e-tests/pkg/utils"
    27  
    28  )
    29  
    30  {{ range .CustomData.Outline }}
    31  var _ = framework.{{ .Name }}("{{ .Text }}", {{range .Labels }}Label("{{.}}"), {{ end }} func() {
    32  	defer GinkgoRecover()
    33      var err error
    34      var f *framework.Framework
    35      // use 'f' to access common controllers or the specific service controllers within the framework
    36  	BeforeAll(func() {
    37  		// Initialize the tests controllers
    38  		f, err = framework.NewFramework()
    39  		Expect(err).NotTo(HaveOccurred())
    40  	})
    41  
    42      // Generated specs:
    43      {{ template "specs" . }}
    44  })
    45  {{ end }}