2021-06-23 16:49:34 +01:00
|
|
|
// Copyright (C) 2021 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2021-09-22 10:20:03 +01:00
|
|
|
package satellite_test
|
2021-06-23 16:49:34 +01:00
|
|
|
|
|
|
|
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-09-22 10:20:03 +01:00
|
|
|
page := openPage(browser, signupPageURL)
|
2021-08-18 13:46:50 +01:00
|
|
|
|
2021-06-23 16:49:34 +01:00
|
|
|
// First time User signup
|
2021-09-16 13:04:26 +01:00
|
|
|
page.MustElement("[aria-roledescription=professional-label]").MustClick()
|
2021-09-30 14:27:46 +01:00
|
|
|
page.MustElement("[aria-roledescription=name] input").MustInput(fullName)
|
|
|
|
page.MustElement("[aria-roledescription=email] input").MustInput(emailAddress)
|
|
|
|
page.MustElement("[aria-roledescription=company-name] input").MustInput(companyName)
|
|
|
|
page.MustElement("[aria-roledescription=position] input").MustInput(positionTitle)
|
|
|
|
page.MustElement("[aria-roledescription=password] input").MustInput(password)
|
|
|
|
page.MustElement("[aria-roledescription=retype-password] input").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)
|
2021-09-22 10:20:03 +01:00
|
|
|
waitVueTick(page)
|
|
|
|
|
2021-09-16 13:04:26 +01:00
|
|
|
confirmAccountEmailMessage := page.MustElement("[aria-roledescription=title]").MustText()
|
2021-06-23 16:49:34 +01:00
|
|
|
require.Contains(t, confirmAccountEmailMessage, "You're almost there!")
|
|
|
|
})
|
|
|
|
}
|