Menu

920 passing tests, perfect Lighthouse scores, and a button nobody could read
📰

920 passing tests, perfect Lighthouse scores, and a button nobody could read

DEV Community: webdev·Kalyan Bhattarai·about 16 hours ago
#B3EFeyQU
#devtowebdev#devto#dev#button#testing
Long article (772 words) — no AI summary yet.
Reading 0:00
15s threshold

I thought my website was ready for production.

The automated tests were passing. The Lighthouse scores looked great. There were no reported dependency vulnerabilities. After spending hours checking everything, I was pretty confident about the release.

Then I opened my running pace calculator during manual staging verification and noticed something strange.

There was a white button with absolutely no visible text.

When I moved my mouse over it, the words "Download Splits (CSV)" appeared.

Move the mouse away, and they disappeared again.

Something that was obvious to a human had slipped through hundreds of automated tests.

What actually caused the problem?

I was using a reusable Button component with predefined Tailwind CSS variants.

The download button used an outline variant, but I was also passing custom background and text colors through its className.

The outline variant included a white background and dark text.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.