2021-06-23 16:49:34 +01:00
|
|
|
// Copyright (C) 2021 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package satellite
|
|
|
|
|
|
|
|
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"
|
2021-08-19 19:59:13 +01:00
|
|
|
"storj.io/storj/testsuite/ui/uitest"
|
2021-06-23 16:49:34 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestBusinessUserCanSignUp(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"
|
|
|
|
companyName := "company"
|
|
|
|
positionTitle := "tester"
|
2021-08-18 13:46:50 +01:00
|
|
|
|
2021-06-23 16:49:34 +01:00
|
|
|
page := browser.MustPage(signupPageURL)
|
|
|
|
page.MustSetViewport(1350, 600, 1, false)
|
2021-08-18 13:46:50 +01:00
|
|
|
|
2021-06-23 16:49:34 +01:00
|
|
|
// First time User signup
|
2021-08-18 13:46:50 +01:00
|
|
|
page.MustElement("li:nth-of-type(2)").MustClick()
|
|
|
|
page.MustElement("[placeholder=\"Enter Full Name\"]").MustInput(fullName)
|
2021-06-23 16:49:34 +01:00
|
|
|
page.MustElement("[placeholder=\"example@email.com\"]").MustInput(emailAddress)
|
|
|
|
page.MustElement("[placeholder=\"Acme Corp.\"]").MustInput(companyName)
|
|
|
|
page.MustElement("[placeholder=\"Position Title\"]").MustInput(positionTitle)
|
|
|
|
page.MustElement("[placeholder=\"Enter Password\"]").MustInput(password)
|
|
|
|
page.MustElement("[placeholder=\"Retype Password\"]").MustInput(password)
|
2021-07-06 12:36:42 +01:00
|
|
|
page.MustElementX("(//*[@class=\"checkmark\"])[2]").MustClick()
|
2021-06-23 16:49:34 +01:00
|
|
|
page.Keyboard.MustPress(input.Enter)
|
|
|
|
confirmAccountEmailMessage := page.MustElement(".register-success-area__form-container__title").MustText()
|
|
|
|
require.Contains(t, confirmAccountEmailMessage, "You're almost there!")
|
|
|
|
})
|
|
|
|
}
|