mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
23 lines
429 B
Go
23 lines
429 B
Go
package suites
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
"github.com/tebeka/selenium"
|
|
)
|
|
|
|
func (wds *WebDriverSession) verifyURLIs(ctx context.Context, t *testing.T, url string) {
|
|
err := wds.Wait(ctx, func(driver selenium.WebDriver) (bool, error) {
|
|
currentURL, err := driver.CurrentURL()
|
|
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
return currentURL == url, nil
|
|
})
|
|
|
|
require.NoError(t, err)
|
|
}
|