Documentation
¶
Overview ¶
Package helper allows to run playwright WebUI tests with Aquarium Fish
Index ¶
- func CheckElementExists(t *testing.T, page pw.Page, selector string) bool
- func CloseAllNotifications(t *testing.T, page pw.Page)
- func CreateApplication(t *testing.T, page pw.Page, labelUID string, metadata map[string]string)
- func CreateLabel(t *testing.T, page pw.Page, labelName string) string
- func CreateUser(t *testing.T, page pw.Page, username, password string, roles []string)
- func DeallocateApplication(t *testing.T, page pw.Page, labelName string)
- func LoginUser(t *testing.T, page pw.Page, username, password string)
- func LogoutUser(t *testing.T, page pw.Page)
- func NavigateToPage(t *testing.T, page pw.Page, pageName string)
- func TakeScreenshot(t *testing.T, page pw.Page, afp *AFPlaywright, filename string)
- func VerifyApplicationInList(t *testing.T, page pw.Page, labelName, owner, status string)
- func WaitForElement(t *testing.T, page pw.Page, selector string, timeout time.Duration)
- type AFPlaywright
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckElementExists ¶
CheckElementExists checks if an element exists without failing the test
func CloseAllNotifications ¶
CloseAllNotifications checks here is no error notifications and closes to clear the view
func CreateApplication ¶
CreateApplication creates a new application
func CreateLabel ¶
CreateLabel creates a label with the given name and UID Returns: LabelUID
func CreateUser ¶
CreateUser creates a new user with the given parameters
func DeallocateApplication ¶
DeallocateApplication deallocates an application by its label UID
func LogoutUser ¶
LogoutUser attempts to logout the current user
func NavigateToPage ¶
NavigateToPage navigates to a specific page in the dashboard
func TakeScreenshot ¶
TakeScreenshot takes a screenshot with the given filename
func VerifyApplicationInList ¶
VerifyApplicationInList verifies that an application appears in the list with correct details
Types ¶
type AFPlaywright ¶
type AFPlaywright struct {
// contains filtered or unexported fields
}
AFPlaywright saves state of the running Aquarium Fish for particular test
func NewPlaywright ¶
func NewPlaywright(tb testing.TB, workspace string, options playwright.BrowserNewContextOptions) (*AFPlaywright, playwright.Page)
NewPlaywright initializes Playwright context helper
func (*AFPlaywright) CaptureDir ¶
func (afp *AFPlaywright) CaptureDir(subpath ...string) string
CaptureDir returns dir where to store all the test data
func (*AFPlaywright) Cleanup ¶
func (afp *AFPlaywright) Cleanup(tb testing.TB)
Cleanup after the test execution
func (*AFPlaywright) Screenshot ¶
func (afp *AFPlaywright) Screenshot(t *testing.T, phase string)
Screenshot takes a screenshot with automatic naming