6ab2647adb
We have implemented few UI tests using go-rod, but haven't been running them regularly. Change-Id: I6c89365f719882431842a2026b426860f1293b8b
40 lines
1.3 KiB
Go
40 lines
1.3 KiB
Go
// Copyright (C) 2021 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package satellite_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/go-rod/rod"
|
|
"github.com/go-rod/rod/lib/input"
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"storj.io/common/testcontext"
|
|
"storj.io/storj/private/testplanet"
|
|
"storj.io/storj/testsuite/ui/uitest"
|
|
)
|
|
|
|
func TestPersonalUserCanSignUp(t *testing.T) {
|
|
uitest.Run(t, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet, browser *rod.Browser) {
|
|
signupPageURL := planet.Satellites[0].ConsoleURL() + "/signup"
|
|
fullName := "John Doe"
|
|
emailAddress := "test@email.com"
|
|
password := "qazwsx123"
|
|
|
|
page := openPage(browser, signupPageURL)
|
|
|
|
// First time User signup
|
|
page.MustElement("[aria-roledescription=name] input").MustInput(fullName)
|
|
page.MustElement("[aria-roledescription=email] input").MustInput(emailAddress)
|
|
page.MustElement("[aria-roledescription=password] input").MustInput(password)
|
|
page.MustElement("[aria-roledescription=retype-password] input").MustInput(password)
|
|
page.MustElement(".checkmark").MustClick()
|
|
page.Keyboard.MustPress(input.Enter)
|
|
waitVueTick(page)
|
|
|
|
confirmAccountEmailMessage := page.MustElement("[aria-roledescription=title]").MustText()
|
|
require.Contains(t, confirmAccountEmailMessage, "You're almost there!")
|
|
})
|
|
}
|