2021-06-09 12:39:38 +01:00
|
|
|
// 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"
|
2021-08-18 13:46:50 +01:00
|
|
|
"storj.io/storj/testsuite/ui/uitest"
|
2021-06-09 12:39:38 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestLoginToAccount(t *testing.T) {
|
|
|
|
uitest.Run(t, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet, browser *rod.Browser) {
|
|
|
|
loginPageURL := planet.Satellites[0].ConsoleURL() + "/login"
|
|
|
|
user := planet.Uplinks[0].User[planet.Satellites[0].ID()]
|
|
|
|
|
2021-09-22 10:20:03 +01:00
|
|
|
page := openPage(browser, loginPageURL)
|
2021-08-18 13:46:50 +01:00
|
|
|
|
2021-09-30 14:27:46 +01:00
|
|
|
page.MustElement("[aria-roledescription=email] input").MustInput(user.Email)
|
|
|
|
page.MustElement("[aria-roledescription=password] input").MustInput(user.Password)
|
2021-06-09 12:39:38 +01:00
|
|
|
page.Keyboard.MustPress(input.Enter)
|
2021-09-22 10:20:03 +01:00
|
|
|
waitVueTick(page)
|
2021-06-09 12:39:38 +01:00
|
|
|
|
2021-09-16 13:04:26 +01:00
|
|
|
dashboardTitle := page.MustElement("[aria-roledescription=title]").MustText()
|
2021-06-09 12:39:38 +01:00
|
|
|
require.Contains(t, dashboardTitle, "Dashboard")
|
|
|
|
})
|
|
|
|
}
|