Documentation
¶
Index ¶
- type TestSession
- func (s *TestSession) AssertDisabled(q queries.Query)
- func (s *TestSession) AssertHidden(q queries.Query)
- func (s *TestSession) AssertText(text string)
- func (s *TestSession) AssertURLContains(part string)
- func (s *TestSession) AssertVisible(q queries.Query)
- func (s *TestSession) Click(q queries.Query)
- func (s *TestSession) Close()
- func (s *TestSession) DragAndDrop(source queries.Query, target queries.Query, offsetX, offsetY int)
- func (s *TestSession) FillIn(q queries.Query, value string)
- func (s *TestSession) HoverOver(q queries.Query)
- func (s *TestSession) Login()
- func (s *TestSession) Page() pw.Page
- func (s *TestSession) ScrollToTheBottomOfPage()
- func (s *TestSession) Sleep(ms int)
- func (s *TestSession) Start()
- func (s *TestSession) StartWithoutUser()
- func (s *TestSession) TakeScreenshot()
- func (s *TestSession) Visit(path string)
- func (s *TestSession) VisitHomePage()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestSession ¶
type TestSession struct {
BaseURL string
OrgID uuid.UUID
Account *models.Account
// contains filtered or unexported fields
}
TestSession handles per-test actions: db, auth, and page ops.
func NewTestSession ¶
func NewTestSession(t *testing.T, context pw.BrowserContext, page pw.Page, timeoutMs float64, baseURL string) *TestSession
func (*TestSession) AssertDisabled ¶
func (s *TestSession) AssertDisabled(q queries.Query)
func (*TestSession) AssertHidden ¶ added in v0.1.4
func (s *TestSession) AssertHidden(q queries.Query)
func (*TestSession) AssertText ¶
func (s *TestSession) AssertText(text string)
func (*TestSession) AssertURLContains ¶
func (s *TestSession) AssertURLContains(part string)
func (*TestSession) AssertVisible ¶
func (s *TestSession) AssertVisible(q queries.Query)
func (*TestSession) Click ¶
func (s *TestSession) Click(q queries.Query)
func (*TestSession) Close ¶
func (s *TestSession) Close()
func (*TestSession) DragAndDrop ¶
func (*TestSession) HoverOver ¶
func (s *TestSession) HoverOver(q queries.Query)
func (*TestSession) Login ¶
func (s *TestSession) Login()
func (*TestSession) Page ¶
func (s *TestSession) Page() pw.Page
Page exposes the underlying playwright Page to satisfy queries.Runner.
func (*TestSession) ScrollToTheBottomOfPage ¶
func (s *TestSession) ScrollToTheBottomOfPage()
func (*TestSession) Sleep ¶
func (s *TestSession) Sleep(ms int)
func (*TestSession) Start ¶
func (s *TestSession) Start()
func (*TestSession) StartWithoutUser ¶
func (s *TestSession) StartWithoutUser()
StartWithoutUser resets the database but does not seed any user or organization records. This is useful for flows that expect an empty instance, such as the first-run owner setup.
func (*TestSession) TakeScreenshot ¶
func (s *TestSession) TakeScreenshot()
func (*TestSession) Visit ¶
func (s *TestSession) Visit(path string)
func (*TestSession) VisitHomePage ¶
func (s *TestSession) VisitHomePage()
Click to show internal directories.
Click to hide internal directories.