Home / Function/ login() — ui Function Reference

login() — ui Function Reference

Architecture documentation for the login() function in commands.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  2d72fc7a_6c47_ca09_aa32_80c1891e828d["login()"]
  e91d8547_a204_d0f5_33e5_12f46d875f67["commands.ts"]
  2d72fc7a_6c47_ca09_aa32_80c1891e828d -->|defined in| e91d8547_a204_d0f5_33e5_12f46d875f67
  style 2d72fc7a_6c47_ca09_aa32_80c1891e828d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shadcn/test/fixtures/frameworks/remix-indie-stack/cypress/support/commands.ts lines 46–61

function login({
  email = faker.internet.email({ provider: "example.com" }),
}: {
  email?: string;
} = {}) {
  cy.then(() => ({ email })).as("user");
  cy.exec(
    `npx ts-node -r tsconfig-paths/register ./cypress/support/create-user.ts "${email}"`,
  ).then(({ stdout }) => {
    const cookieValue = stdout
      .replace(/.*<cookie>(?<cookieValue>.*)<\/cookie>.*/s, "$<cookieValue>")
      .trim();
    cy.setCookie("__session", cookieValue);
  });
  return cy.get("@user");
}

Subdomains

Frequently Asked Questions

What does login() do?
login() is a function in the ui codebase, defined in packages/shadcn/test/fixtures/frameworks/remix-indie-stack/cypress/support/commands.ts.
Where is login() defined?
login() is defined in packages/shadcn/test/fixtures/frameworks/remix-indie-stack/cypress/support/commands.ts at line 46.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free