CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/cypress-testing

Cypress E2E testing patterns -- selectors, cy.intercept, cy.session, cy.clock, custom commands, test isolation, and anti-patterns

98

1.25x
Quality

99%

Does it follow best practices?

Impact

97%

1.25x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-1/

E2E Tests for Login Flow and Dashboard

Problem/Feature Description

A web application has a login page and an authenticated dashboard. Write Cypress E2E tests covering the login flow and the dashboard page.

The app runs on http://localhost:3000 with these pages:

  • /login -- email and password form with "Sign in" button
  • /dashboard -- displays a welcome banner, recent activity feed, and quick-action cards
  • /dashboard/profile -- user profile page showing name, email, and avatar

The app has these API endpoints:

  • POST /api/auth/login -- authenticates user, sets session cookie
  • GET /api/dashboard/summary -- returns dashboard summary data
  • GET /api/user/profile -- returns current user profile

All dashboard pages require authentication. Unauthenticated users are redirected to /login.

Output Specification

Produce:

  • cypress.config.ts -- Cypress configuration
  • cypress/e2e/login.cy.ts -- tests for login flow (success, failure, validation)
  • cypress/e2e/dashboard.cy.ts -- tests for the authenticated dashboard
  • cypress/support/commands.ts -- any reusable test helpers
  • package.json -- with cypress dependency listed

You may create additional support files for good test organization.

evals

scenario-1

criteria.json

task.md

tile.json