Create a New User Personal Account Test (#4141)
* added signup personal user test & added testDefault:true to OpenRegistrationEnabled in service.go * added copyright * fixed import ordering * fixed comment formatting and gofmt-ed with -s * gofmt-ed with -s and -w * fixed fragile elements * fixed one more fragile element * fixed nesting * removed unnecessary timeout * fixed imports
This commit is contained in:
parent
4e645059be
commit
f16bb4d198
36
integration/ui/satellite/signup_personal_user_test.go
Normal file
36
integration/ui/satellite/signup_personal_user_test.go
Normal file
@ -0,0 +1,36 @@
|
||||
// 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/integration/ui/uitest"
|
||||
"storj.io/storj/private/testplanet"
|
||||
)
|
||||
|
||||
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 := browser.MustPage(signupPageURL)
|
||||
page.MustSetViewport(1350, 600, 1, false)
|
||||
// First time User signup
|
||||
page.MustElement(".headerless-input").MustInput(fullName)
|
||||
page.MustElement("[placeholder=\"example@email.com\"]").MustInput(emailAddress)
|
||||
page.MustElement("[placeholder=\"Enter Password\"]").MustInput(password)
|
||||
page.MustElement("[placeholder=\"Retype Password\"]").MustInput(password)
|
||||
page.MustElement(".checkmark").MustClick()
|
||||
page.Keyboard.MustPress(input.Enter)
|
||||
confirmAccountEmailMessage := page.MustElement(".register-success-area__form-container__title").MustText()
|
||||
require.Contains(t, confirmAccountEmailMessage, "You're almost there!")
|
||||
})
|
||||
}
|
@ -117,7 +117,7 @@ func init() {
|
||||
// Config keeps track of core console service configuration parameters.
|
||||
type Config struct {
|
||||
PasswordCost int `help:"password hashing cost (0=automatic)" testDefault:"4" default:"0"`
|
||||
OpenRegistrationEnabled bool `help:"enable open registration" default:"false"`
|
||||
OpenRegistrationEnabled bool `help:"enable open registration" default:"false" testDefault:"true"`
|
||||
DefaultProjectLimit int `help:"default project limits for users" default:"3" testDefault:"5"`
|
||||
UsageLimits UsageLimitsConfig
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user