Skip to content

Commit

Permalink
chore: t
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas committed Aug 8, 2023
1 parent c48ef36 commit 8e97439
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 46 deletions.
2 changes: 1 addition & 1 deletion test/e2e/cypress/helpers/httpbin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function checkToken(
const tokenParams = {
code: result.args.code,
redirect_uri:
"https://ory-network-httpbin-ijakee5waq-ez.a.run.app//anything",
"https://ory-network-httpbin-ijakee5waq-ez.a.run.app/anything",
scope: scope.join(" "),
}
oauth2
Expand Down
45 changes: 0 additions & 45 deletions test/e2e/cypress/integration/profiles/oidc-provider/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,51 +146,6 @@ context("OpenID Provider", () => {
odicLogin()
cy.getCookie("ory_hydra_session_dev").should("be.null")
})

it("transfers oauth challenge from login flow to new registration flow", () => {
let odicLogin = () => {
const email = gen.email()
const password = gen.password()

let url = oauth2.getDefaultAuthorizeURL(client)
cy.visit(url)

// kratos login ui
cy.get("[name=identifier]").type(email)
cy.get("[name=password]").type(password)
cy.get("[type='submit'][value='password']").click()
// consent ui
cy.get("#accept").click()
}

cy.clearAllCookies()
cy.updateConfigFile((config) => {
config.session.cookie = config.session.cookie || {}
config.session.cookie.persistent = true
config.session.lifespan = "1234s"
return config
})

odicLogin()
console.log(cy.getCookies())
cy.getCookie("ory_hydra_session_dev").should("not.be.null")
cy.getCookie("ory_hydra_session_dev").then((cookie) => {
let expected = Date.now() / 1000 + 1234
let precision = 10
expect(cookie.expiry).to.be.lessThan(expected + precision)
expect(cookie.expiry).to.be.greaterThan(expected - precision)
})

cy.clearAllCookies()
cy.updateConfigFile((config) => {
config.session.cookie = config.session.cookie || {}
config.session.cookie.persistent = false
return config
})

odicLogin()
cy.getCookie("ory_hydra_session_dev").should("be.null")
})
})

context("OpenID Provider - change between flows", () => {
Expand Down

0 comments on commit 8e97439

Please sign in to comment.