testing/cross_backend/session_login.ts

One more session for an account, on a jar of its own — for the cross suites that hold several sessions of one account at once (the session cap, a session-scoped revocation).

view source

Declarations
#

2 declarations

login_fresh_session
#

testing/cross_backend/session_login.ts view source

(fixture: TestFixture, options: LoginFreshSessionOptions): Promise<FetchTransport> import {login_fresh_session} from '@fuzdev/fuz_app/testing/cross_backend/session_login.js';

Log username in on a fresh transport: one login, one session, one jar holding exactly that session's cookie, which every call on the transport re-sends. The fixture's own transport carries the keeper's cookie, so a login there would leave the jar holding two.

fixture

the per-test fixture whose backend the login goes to

options

the route, the credentials, and a label for failures

returns

Promise<FetchTransport>

the transport holding the new session's cookie

LoginFreshSessionOptions
#

testing/cross_backend/session_login.ts view source

LoginFreshSessionOptions import type {LoginFreshSessionOptions} from '@fuzdev/fuz_app/testing/cross_backend/session_login.js';

Options for login_fresh_session.

login_path

REST login route path.

type string

readonly

username

type string

readonly

password

type string

readonly

label

Names the login in a failure message.

type string

readonly

Depends on
#

Imported by
#