SShortSingh.
Back to feed

How a Silent Cypress cy.session() Bug Masked Auth Failures as Flaky Tests

0
·1 views

A software engineer discovered that Cypress's cy.session() validate() function was silently passing even when user sessions had expired, causing test failures to appear random and unrelated to authentication. The root cause was a relative URL in cy.request() resolving against the app's baseUrl instead of the identity provider, meaning the request never actually checked the IdP. Because the single-page app returns a 200 OK with an HTML response for any unrecognised path, the status-code assertion always passed regardless of session state. When tests eventually ran with an expired session, the app's own auth check would redirect to the login page, causing specs to fail on unrelated selectors and be mislabelled as flaky. The engineer found that two compounding bugs — the wrong URL target and cy.request's inability to attach bearer tokens from web storage — rendered the entire session validation check effectively decorative.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Federal Court Rules No Constitutional Right to Clean Water Exists

A federal court has ruled that Americans do not have a constitutional right to clean water. The decision marks a significant legal finding on the scope of constitutional protections related to environmental and public health matters. The ruling could have broad implications for future litigation seeking to compel government action on water quality. The case was reported by USA Today in September 2026.

0
ProgrammingDEV Community ·

SelfCmd Launches All-in-One Tool for SSH Management and AI Error Diagnostics

SelfCmd is a new command-line platform designed for software engineers, system administrators, and DevOps teams. It consolidates SSH and serial connection management, a reusable command library, and cross-platform command execution into a single interface. The tool supports features such as bastion host tunneling, dynamic script templates, and scheduled command execution. A built-in AI diagnostics engine automatically analyzes and debugs errors encountered during remote or local operations. SelfCmd aims to reduce toolchain complexity by replacing multiple disparate utilities with one unified workflow.

0
ProgrammingDEV Community ·

Apache AGE Stress-Tested: How PostgreSQL's Graph Extension Holds Up Under Load

Developers investigating Apache AGE, a graph extension for PostgreSQL, discovered segmentation faults that prompted a broader performance inquiry. Apache AGE allows users to query graph data directly within PostgreSQL using openCypher, eliminating the need for a separate graph database. The extension stores vertices and edges in standard PostgreSQL tables, automatically creating child tables when new node or relationship types are introduced. Researchers found no existing benchmarks or published performance results for Apache AGE, making a from-scratch investigation necessary. The study aimed to assess both the stability and performance characteristics of the extension under stress conditions.

0
ProgrammingDEV Community ·

Developer Reflects on Using Docker Repeatedly Without Truly Understanding It

A developer shares how they used Docker multiple times before grasping what it actually does, starting with running a local AI model via Ollama in March 2026. Subsequent uses included setting up an n8n automation workflow and deploying Hyperledger blockchain services, each time following instructions without deeper comprehension. The turning point came during an internship involving an observability stack with tools like Grafana, Prometheus, and the ELK stack, where Docker Compose made multi-service setup noticeably faster than manual installation. The developer now understands Docker as a way to package an application alongside its required environment for consistent execution across systems. They are currently building familiarity with core concepts such as images, containers, volumes, networks, and Dockerfiles, while acknowledging that Docker's internals remain unclear.

How a Silent Cypress cy.session() Bug Masked Auth Failures as Flaky Tests · ShortSingh