build(deps): update module github.com/go-rod/rod to v0.111.0 (#4056)

* build(deps): update module github.com/go-rod/rod to v0.111.0

* fix(suites): update click to include click count

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
pull/4037/head^2
renovate[bot] 2022-09-26 13:10:37 +10:00 committed by GitHub
parent 931f963cc8
commit d8f8f74dce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 23 additions and 23 deletions

2
go.mod
View File

@ -11,7 +11,7 @@ require (
github.com/fasthttp/session/v2 v2.4.13 github.com/fasthttp/session/v2 v2.4.13
github.com/go-asn1-ber/asn1-ber v1.5.4 github.com/go-asn1-ber/asn1-ber v1.5.4
github.com/go-ldap/ldap/v3 v3.4.4 github.com/go-ldap/ldap/v3 v3.4.4
github.com/go-rod/rod v0.110.1 github.com/go-rod/rod v0.111.0
github.com/go-sql-driver/mysql v1.6.0 github.com/go-sql-driver/mysql v1.6.0
github.com/go-webauthn/webauthn v0.4.0 github.com/go-webauthn/webauthn v0.4.0
github.com/golang-jwt/jwt/v4 v4.4.2 github.com/golang-jwt/jwt/v4 v4.4.2

4
go.sum
View File

@ -311,8 +311,8 @@ github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7
github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/go-rod/rod v0.110.1 h1:+e0rCHCsOyWsmbP/6J3TTcO3LiCodFEa9vjdUSOFm5w= github.com/go-rod/rod v0.111.0 h1:aMNNdz10GYPYec9z1WsFqwAdRYVsuufVTOrah7whG3I=
github.com/go-rod/rod v0.110.1/go.mod h1:GZDtmEs6RpF6kBRYpGCZXxXlKNneKVPiKOjaMbmVVjE= github.com/go-rod/rod v0.111.0/go.mod h1:GZDtmEs6RpF6kBRYpGCZXxXlKNneKVPiKOjaMbmVVjE=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=

View File

@ -9,26 +9,26 @@ import (
) )
func (rs *RodSession) doChangeMethod(t *testing.T, page *rod.Page, method string) { func (rs *RodSession) doChangeMethod(t *testing.T, page *rod.Page, method string) {
err := rs.WaitElementLocatedByID(t, page, "methods-button").Click("left") err := rs.WaitElementLocatedByID(t, page, "methods-button").Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
rs.WaitElementLocatedByID(t, page, "methods-dialog") rs.WaitElementLocatedByID(t, page, "methods-dialog")
err = rs.WaitElementLocatedByID(t, page, fmt.Sprintf("%s-option", method)).Click("left") err = rs.WaitElementLocatedByID(t, page, fmt.Sprintf("%s-option", method)).Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
} }
func (rs *RodSession) doChangeDevice(t *testing.T, page *rod.Page, deviceID string) { func (rs *RodSession) doChangeDevice(t *testing.T, page *rod.Page, deviceID string) {
err := rs.WaitElementLocatedByID(t, page, "selection-link").Click("left") err := rs.WaitElementLocatedByID(t, page, "selection-link").Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
rs.doSelectDevice(t, page, deviceID) rs.doSelectDevice(t, page, deviceID)
} }
func (rs *RodSession) doSelectDevice(t *testing.T, page *rod.Page, deviceID string) { func (rs *RodSession) doSelectDevice(t *testing.T, page *rod.Page, deviceID string) {
rs.WaitElementLocatedByID(t, page, "device-selection") rs.WaitElementLocatedByID(t, page, "device-selection")
err := rs.WaitElementLocatedByID(t, page, fmt.Sprintf("device-%s", deviceID)).Click("left") err := rs.WaitElementLocatedByID(t, page, fmt.Sprintf("device-%s", deviceID)).Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
} }
func (rs *RodSession) doClickButton(t *testing.T, page *rod.Page, buttonID string) { func (rs *RodSession) doClickButton(t *testing.T, page *rod.Page, buttonID string) {
err := rs.WaitElementLocatedByID(t, page, buttonID).Click("left") err := rs.WaitElementLocatedByID(t, page, buttonID).Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
} }

View File

@ -19,12 +19,12 @@ func (rs *RodSession) doFillLoginPageAndClick(t *testing.T, page *rod.Page, user
if keepMeLoggedIn { if keepMeLoggedIn {
keepMeLoggedInElement := rs.WaitElementLocatedByID(t, page, "remember-checkbox") keepMeLoggedInElement := rs.WaitElementLocatedByID(t, page, "remember-checkbox")
err = keepMeLoggedInElement.Click("left") err = keepMeLoggedInElement.Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
} }
buttonElement := rs.WaitElementLocatedByID(t, page, "sign-in-button") buttonElement := rs.WaitElementLocatedByID(t, page, "sign-in-button")
err = buttonElement.Click("left") err = buttonElement.Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
} }

View File

@ -9,13 +9,13 @@ import (
) )
func (rs *RodSession) doInitiatePasswordReset(t *testing.T, page *rod.Page, username string) { func (rs *RodSession) doInitiatePasswordReset(t *testing.T, page *rod.Page, username string) {
err := rs.WaitElementLocatedByID(t, page, "reset-password-button").Click("left") err := rs.WaitElementLocatedByID(t, page, "reset-password-button").Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
// Fill in username. // Fill in username.
err = rs.WaitElementLocatedByID(t, page, "username-textfield").Input(username) err = rs.WaitElementLocatedByID(t, page, "username-textfield").Input(username)
require.NoError(t, err) require.NoError(t, err)
// And click on the reset button. // And click on the reset button.
err = rs.WaitElementLocatedByID(t, page, "reset-button").Click("left") err = rs.WaitElementLocatedByID(t, page, "reset-button").Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
} }
@ -33,7 +33,7 @@ func (rs *RodSession) doCompletePasswordReset(t *testing.T, page *rod.Page, newP
err = rs.WaitElementLocatedByID(t, page, "password2-textfield").Input(newPassword2) err = rs.WaitElementLocatedByID(t, page, "password2-textfield").Input(newPassword2)
require.NoError(t, err) require.NoError(t, err)
err = rs.WaitElementLocatedByID(t, page, "reset-button").Click("left") err = rs.WaitElementLocatedByID(t, page, "reset-button").Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
} }

View File

@ -12,7 +12,7 @@ import (
) )
func (rs *RodSession) doRegisterTOTP(t *testing.T, page *rod.Page) string { func (rs *RodSession) doRegisterTOTP(t *testing.T, page *rod.Page) string {
err := rs.WaitElementLocatedByID(t, page, "register-link").Click("left") err := rs.WaitElementLocatedByID(t, page, "register-link").Click("left", 1)
require.NoError(t, err) require.NoError(t, err)
rs.verifyMailNotificationDisplayed(t, page) rs.verifyMailNotificationDisplayed(t, page)
link := doGetLinkFromLastMail(t) link := doGetLinkFromLastMail(t)

View File

@ -59,7 +59,7 @@ func (s *AvailableMethodsScenario) TestShouldCheckAvailableMethods() {
s.doLoginOneFactor(s.T(), s.Context(ctx), "john", "password", false, "") s.doLoginOneFactor(s.T(), s.Context(ctx), "john", "password", false, "")
methodsButton := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "methods-button") methodsButton := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "methods-button")
err := methodsButton.Click("left") err := methodsButton.Click("left", 1)
s.Assert().NoError(err) s.Assert().NoError(err)
methodsDialog := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "methods-dialog") methodsDialog := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "methods-dialog")

View File

@ -86,11 +86,11 @@ func (s *OIDCScenario) TestShouldAuthorizeAccessToOIDCApp() {
s.waitBodyContains(s.T(), s.Context(ctx), "Not logged yet...") s.waitBodyContains(s.T(), s.Context(ctx), "Not logged yet...")
// Search for the 'login' link. // Search for the 'login' link.
err := s.Page.MustSearch("Log in").Click("left") err := s.Page.MustSearch("Log in").Click("left", 1)
assert.NoError(s.T(), err) assert.NoError(s.T(), err)
s.verifyIsConsentPage(s.T(), s.Context(ctx)) s.verifyIsConsentPage(s.T(), s.Context(ctx))
err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "accept-button").Click("left") err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "accept-button").Click("left", 1)
assert.NoError(s.T(), err) assert.NoError(s.T(), err)
// Verify that the app is showing the info related to the user stored in the JWT token. // Verify that the app is showing the info related to the user stored in the JWT token.
@ -152,12 +152,12 @@ func (s *OIDCScenario) TestShouldDenyConsent() {
s.waitBodyContains(s.T(), s.Context(ctx), "Not logged yet...") s.waitBodyContains(s.T(), s.Context(ctx), "Not logged yet...")
// Search for the 'login' link. // Search for the 'login' link.
err := s.Page.MustSearch("Log in").Click("left") err := s.Page.MustSearch("Log in").Click("left", 1)
assert.NoError(s.T(), err) assert.NoError(s.T(), err)
s.verifyIsConsentPage(s.T(), s.Context(ctx)) s.verifyIsConsentPage(s.T(), s.Context(ctx))
err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "deny-button").Click("left") err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "deny-button").Click("left", 1)
assert.NoError(s.T(), err) assert.NoError(s.T(), err)
s.verifyIsOIDC(s.T(), s.Context(ctx), "access_denied", "https://oidc.example.com:8080/error?error=access_denied&error_description=The+resource+owner+or+authorization+server+denied+the+request.+Make+sure+that+the+request+you+are+making+is+valid.+Maybe+the+credential+or+request+parameters+you+are+using+are+limited+in+scope+or+otherwise+restricted.&state=random-string-here") s.verifyIsOIDC(s.T(), s.Context(ctx), "access_denied", "https://oidc.example.com:8080/error?error=access_denied&error_description=The+resource+owner+or+authorization+server+denied+the+request.+Make+sure+that+the+request+you+are+making+is+valid.+Maybe+the+credential+or+request+parameters+you+are+using+are+limited+in+scope+or+otherwise+restricted.&state=random-string-here")

View File

@ -62,14 +62,14 @@ func (s *RegulationScenario) TestShouldBanUserAfterTooManyAttempt() {
for i := 0; i < 3; i++ { for i := 0; i < 3; i++ {
err := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "password-textfield").Input("bad-password") err := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "password-textfield").Input("bad-password")
require.NoError(s.T(), err) require.NoError(s.T(), err)
err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "sign-in-button").Click("left") err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "sign-in-button").Click("left", 1)
require.NoError(s.T(), err) require.NoError(s.T(), err)
} }
// Enter the correct password and test the regulation lock out. // Enter the correct password and test the regulation lock out.
err := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "password-textfield").Input("password") err := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "password-textfield").Input("password")
require.NoError(s.T(), err) require.NoError(s.T(), err)
err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "sign-in-button").Click("left") err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "sign-in-button").Click("left", 1)
require.NoError(s.T(), err) require.NoError(s.T(), err)
s.verifyNotificationDisplayed(s.T(), s.Context(ctx), "Incorrect username or password.") s.verifyNotificationDisplayed(s.T(), s.Context(ctx), "Incorrect username or password.")
@ -79,7 +79,7 @@ func (s *RegulationScenario) TestShouldBanUserAfterTooManyAttempt() {
// Enter the correct password and test a successful login. // Enter the correct password and test a successful login.
err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "password-textfield").Input("password") err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "password-textfield").Input("password")
require.NoError(s.T(), err) require.NoError(s.T(), err)
err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "sign-in-button").Click("left") err = s.WaitElementLocatedByID(s.T(), s.Context(ctx), "sign-in-button").Click("left", 1)
require.NoError(s.T(), err) require.NoError(s.T(), err)
s.verifyIsSecondFactorPage(s.T(), s.Context(ctx)) s.verifyIsSecondFactorPage(s.T(), s.Context(ctx))
} }

View File

@ -303,7 +303,7 @@ func (s *DuoPushWebDriverSuite) TestShouldFailSelectionBecauseOfSelectionDenied(
s.doLoginOneFactor(s.T(), s.Context(ctx), "john", "password", false, "") s.doLoginOneFactor(s.T(), s.Context(ctx), "john", "password", false, "")
s.doChangeMethod(s.T(), s.Context(ctx), "push-notification") s.doChangeMethod(s.T(), s.Context(ctx), "push-notification")
err := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "selection-link").Click("left") err := s.WaitElementLocatedByID(s.T(), s.Context(ctx), "selection-link").Click("left", 1)
require.NoError(s.T(), err) require.NoError(s.T(), err)
s.verifyNotificationDisplayed(s.T(), s.Context(ctx), "Device selection was denied by Duo policy") s.verifyNotificationDisplayed(s.T(), s.Context(ctx), "Device selection was denied by Duo policy")
} }