Skip to content

Commit

Permalink
fix: unstable ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Mar 21, 2022
1 parent b72ca43 commit bee26c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion selfservice/flow/login/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func sortNodes(ctx context.Context, n node.Nodes) error {
node.LookupGroup,
}),
node.SortUseOrder([]string{
"password_identifier",
"identifier",
"password",
}),
)
Expand Down
3 changes: 2 additions & 1 deletion selfservice/strategy/webauthn/login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
_ "embed"
"encoding/json"
"fmt"
"github.com/ory/x/jsonx"
"io"
"net/http"
"net/url"
Expand Down Expand Up @@ -458,7 +459,7 @@ func TestCompleteLogin(t *testing.T) {

apiClient := testhelpers.NewHTTPClientWithIdentitySessionToken(t, reg, id)
f := testhelpers.InitializeLoginFlowViaBrowser(t, apiClient, publicTS, false, true, testhelpers.InitFlowWithAAL(identity.AuthenticatorAssuranceLevel2))
assert.Equal(t, gjson.GetBytes(id.Traits, "subject").String(), f.Ui.Nodes[0].Attributes.UiNodeInputAttributes.Value)
assert.Equal(t, gjson.GetBytes(id.Traits, "subject").String(), f.Ui.Nodes[0].Attributes.UiNodeInputAttributes.Value, jsonx.TestMarshalJSONString(t, f.Ui))
testhelpers.SnapshotTExcept(t, f.Ui.Nodes, []string{
"0.attributes.value",
"1.attributes.value",
Expand Down

0 comments on commit bee26c6

Please sign in to comment.