Urgent.News

What's breaking now, across thousands of outlets.

Tech

Your Playwright test is green. Your checkout is broken

Here is a Playwright test I've seen in almost every codebase I've worked on: test ( " places an order " , async ({ page }) => { await page . goto ( " / " ); await page . getByLabel ( " Name " ). fill ( " Ada " ); await page . getByRole ( " button " , { name : " Place order " }). click (); await expect ( page . getByRole ( " status " )). toContainText ( " Order placed " ); }); Good locators, a…

In many codebases, a Playwright test often appears: "test (places an order, async ({ page })) => { await page.goto('/'); await page.getByLabel('Name').fill('Ada'); await page.getByRole('button',{name:'Place order'}).click(); await expect(page.getByRole('status')).toContainText('Order placed'); }". This test passes despite the order API returning a 500 error and no data being saved. The test fails to detect the issue because the page displays a success message even if the server does not agree.

Frontend patterns like optimistic UI, error swallowing, and checking response arrival, but not success, lead to this problem. These patterns display a success message, such as "Order placed", while the order never exists in the system.

To catch this issue, three methods can be used: fixing the response, reading the data back, and implementing a safety net for the entire suite.

The first fix involves asserting on the response, waiting for the request triggered by the click, and checking its status. This ensures the exact endpoint and status are verified, but requires remembering this check on every test that writes data.

The second approach reads the data back using a 201 status code from the API. It checks if the order was stored by calling a list endpoint and verifying if the order with name 'Ada' exists. This method catches when the server answers 200 and silently drops the write.

Finally, the third option is a safety net for the entire suite. By using an automatic fixture, any test that encounters a server error (status code 500) will fail. This approach protects all tests, not just the ones added with the fix.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

What broke when I moved Grafana Faro to OpenTelemetry JS 3.0

TL;DR: I opened the three PRs that move Grafana Faro's web SDK onto OpenTelemetry JS SDK 3.0. The version bump was the easy part.

  • Grafana Faro upgraded from 2.x to OpenTelemetry JS 3.0
  • Three pull requests created for transition, including version bump
  • Main challenge was imports into OTel packages, especially OTLP transformer

CSV to JSON: the three cases that break every naive parser

A CSV file is not comma-separated. It is comma-separated, with a quoting ruleset that almost every hand-written parser ignores .

  • Comma inside quotes creates extra column and loses data
  • Doubled quotes treated as escape, splitting fields incorrectly
  • Byte Order Mark (BOM) in UTF-8 files makes first header undefined

Private Logistics Image Thumbnails: Signed URL Delivery and Per-Tenant Object Storage

Private thumbnail delivery is an access-control problem before it is a storage problem. For a logistics app with multiple tenants, keep image bytes and resized variants in object storage, keep…

  • Private logistics apps store image bytes in object storage, metadata in database
  • Signed URLs provide short-lived access to images, ensuring security and efficiency
  • Database handles tenant ownership, image dimensions, and retention decisions

The pause before the action: how Sakupa's confirmation step works

A quick disclosure first: I am not Sakupa's developer. I came across this MCP server while looking into how AI agents publish websites, and this post only organizes facts from its official site and…

  • Sakupa pauses before website changes to show proposed modifications to users.
  • The confirmation step serves to validate edits, prevent errors, and maintain workflow consistency.
  • Designed for static sites, Sakupa lacks dynamic features like databases or login capabilities.

nexus studioQA 14

A red test can mean three very different things: the application broke, the network blinked, or the site showed a bot challenge.

  • SECURE verdict indicates test passed on its own
  • BREACHED verdict signifies application has broken, resulting in bug report
  • Other failures suggest environment or harness is at fault, not a fixed defect

We Dropped Harbor for Large Images. A Traefik Default Was the Cause.

I stopped pushing large images to Harbor because the pushes kept failing. The cause was a default in Traefik, which I had adopted only because ingress-nginx was retired.

  • Large images (over 100 MB) failed to push due to Traefik's default readTimeout
  • 60-second readTimeout cut off parts of large image uploads, causing 504 errors
  • Adjusting Traefik entrypoint's readTimeout to 10 minutes resolved large image pushes

More from Wednesday 4 November →