Home / File/ smoke.cy.ts — ui Source File

smoke.cy.ts — ui Source File

Architecture documentation for smoke.cy.ts, a typescript file in the ui codebase. 1 imports, 0 dependents.

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  cbeeb71d_e74b_fa6e_1b4a_a1e479f6691d["smoke.cy.ts"]
  817e745e_bb93_8c88_07a4_2e2e390aab69["faker"]
  cbeeb71d_e74b_fa6e_1b4a_a1e479f6691d --> 817e745e_bb93_8c88_07a4_2e2e390aab69
  style cbeeb71d_e74b_fa6e_1b4a_a1e479f6691d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { faker } from "@faker-js/faker";

describe("smoke tests", () => {
  afterEach(() => {
    cy.cleanupUser();
  });

  it("should allow you to register and login", () => {
    const loginForm = {
      email: `${faker.internet.userName()}@example.com`,
      password: faker.internet.password(),
    };

    cy.then(() => ({ email: loginForm.email })).as("user");

    cy.visitAndCheck("/");

    cy.findByRole("link", { name: /sign up/i }).click();

    cy.findByRole("textbox", { name: /email/i }).type(loginForm.email);
    cy.findByLabelText(/password/i).type(loginForm.password);
    cy.findByRole("button", { name: /create account/i }).click();

    cy.findByRole("link", { name: /notes/i }).click();
    cy.findByRole("button", { name: /logout/i }).click();
    cy.findByRole("link", { name: /log in/i });
  });

  it("should allow you to make a note", () => {
    const testNote = {
      title: faker.lorem.words(1),
      body: faker.lorem.sentences(1),
    };
    cy.login();

    cy.visitAndCheck("/");

    cy.findByRole("link", { name: /notes/i }).click();
    cy.findByText("No notes yet");

    cy.findByRole("link", { name: /\+ new note/i }).click();

    cy.findByRole("textbox", { name: /title/i }).type(testNote.title);
    cy.findByRole("textbox", { name: /body/i }).type(testNote.body);
    cy.findByRole("button", { name: /save/i }).click();

    cy.findByRole("button", { name: /delete/i }).click();

    cy.findByText("No notes yet");
  });
});

Dependencies

  • faker

Frequently Asked Questions

What does smoke.cy.ts do?
smoke.cy.ts is a source file in the ui codebase, written in typescript.
What does smoke.cy.ts depend on?
smoke.cy.ts imports 1 module(s): faker.
Where is smoke.cy.ts in the architecture?
smoke.cy.ts is located at packages/shadcn/test/fixtures/frameworks/remix-indie-stack/cypress/e2e/smoke.cy.ts (directory: packages/shadcn/test/fixtures/frameworks/remix-indie-stack/cypress/e2e).

Analyze Your Own Codebase

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

Try Supermodel Free