Files
clean-copy/app/TESTING_SANDBOX.md
T

9.3 KiB
Raw Blame History

CleanCopy E2E Manual Testing Sandbox

Use this document to manually verify that all clipboard sanitization rules work correctly end-to-end.

How to Use

  1. Make sure CleanCopy is running in the system tray.
  2. Copy the "Copy this" block to your clipboard (Ctrl+C).
  3. Press the CleanCopy hotkey (Alt + Shift + C or your configured shortcut).
  4. Paste the result into a text editor and compare with the Expected Output.

Prerequisites

  • CleanCopy is running in the system tray (lavender clipboard icon).
  • All cleaning rules are enabled in Settings -> Rules (unless a scenario says otherwise).
  • You have a text editor open to paste and inspect results.

[URL] Scenario 1: Tracking Parameter Scrubber

Tests the removal of marketing and analytic trackers while preserving legitimate query variables.

Copy this

https://example.com/shop/item-102?utm_source=newsletter&utm_medium=email&utm_campaign=summer_sale&gclid=CL_12345&fbclid=FB_67890&si=SI_abcde&q=running+shoes&category=activewear

Expected Output

https://example.com/shop/item-102?q=running+shoes&category=activewear

(Tracks utm_source, utm_medium, utm_campaign, gclid, fbclid, and si are stripped; q and category are kept.)

[URL] Scenario 2: Custom URL Parameters

Tests that user-defined custom tracking params (added in Settings -> Rules) are also stripped.

Setup

In Settings -> Rules, type foo,bar in the custom tracking parameters input and wait for the save indicator.

Copy this

https://example.com/page?foo=abc&bar=123&keep=this&utm_source=x

Expected Output

https://example.com/page?keep=this

(Custom params foo and bar are stripped alongside built-in utm_source.)

[URL] Scenario 3: URL with Only Tracked Parameters

Tests that a URL with no legitimate params is cleaned of the entire query string.

Copy this

https://example.com/article?utm_source=newsletter&utm_medium=email&gclid=abc123&fbclid=xyz789

Expected Output

https://example.com/article

(All params were trackers — the ? is removed entirely.)

[URL] Scenario 4: Multiple URLs in One Clipboard

Tests that all URLs in a single clipboard block get their trackers stripped independently.

Copy this

Check these links:
https://store.com/deal?utm_source=ad&product=shoes
https://blog.com/post?gclid=123&id=456

Expected Output

Check these links:
https://store.com/deal?product=shoes
https://blog.com/post?id=456

(Both URLs have their trackers stripped independently.)

[URL] Scenario 5: Already-Clean URL Passes Through

Tests that a URL with no tracking parameters is left completely untouched.

Copy this

https://example.com/docs/getting-started?section=install&version=2

Expected Output

https://example.com/docs/getting-started?section=install&version=2

(No trackers present — URL is unchanged.)

[TYPOGRAPHY] Scenario 6: Smart Quotes & Dash Typography

Tests the transformation of curly quotes, smart apostrophes, en-dashes, and em-dashes.

Copy this

"The developer's code," she said — "should compile without warnings." The cost was $5$10.

Expected Output

"The developer's code," she said -- "should compile without warnings." The cost was $5-$10.

(Curly double quotes → ", smart apostrophe → ', em-dash → --, en-dash → -.)

[TYPOGRAPHY] Scenario 7: Invisible Character Cleanup

Tests removal of zero-width spaces, null bytes, and other invisible Unicode characters.

Copy this (these contain invisible characters)

Hello World

(Each letter above is separated by zero-width spaces U+200B.)

Expected Output

Hello World

(All zero-width spaces are removed, letters join together.)

[NEWLINES] Scenario 8: Messenger Line-Break Collapse

Tests that single line wraps from chat apps are joined, while paragraph breaks are preserved.

Copy this

This is a long sentence that got split
across multiple lines by a chat app's
auto-wrap feature.

This second paragraph should remain on
its own separate line.

Expected Output

This is a long sentence that got split across multiple lines by a chat app's auto-wrap feature.

This second paragraph should remain on its own separate line.

(Single line breaks → space; double-newline paragraph break preserved.)

[NEWLINES] Scenario 9: Hyphenated Line Break

Tests that words split with a hyphen at end-of-line are rejoined correctly.

Copy this

This is an example of inno-
vation that was split across lines.

Expected Output

This is an example of innovation that was split across lines.

(The hyphen at end of line is removed and the word is joined.)

[NEWLINES] Scenario 10: Markdown List & Header Preservation

Tests that Markdown structure (headers, lists) is not collapsed.

Copy this

# Main Header
* Item 1 in list
* Item 2 in list

Here is some body text.

Expected Output

# Main Header
* Item 1 in list
* Item 2 in list

Here is some body text.

(Markdown lists and headers are preserved — the line-joining cleanser skips them.)

[COMBINED] Scenario 11: Multiple Cleansers Combined

Tests all rules running simultaneously on a single dirty clipboard block.

Copy this

   "Check this link—it's amazing!"
https://store.com/deal?utm_source=ad&fbclid=999

Expected Output

"Check this link--it's amazing!"
https://store.com/deal

(Whitespace trimmed, quotes/dashes fixed, trackers stripped.)

[COMBINED] Scenario 12: Mixed Content Stress Test

Tests all three cleansers on different lines within a single clipboard block.

Copy this

Here's a message from WhatsApp:
Hey check out this link https://shop.com/sale?utm_source=sms&cid=abc123
The price was $20$50 for the "Premium" plan — totally worth it according
to the review I read yesterday.

Expected Output

Here's a message from WhatsApp:
Hey check out this link https://shop.com/sale?cid=abc123
The price was $20-$50 for the "Premium" plan -- totally worth it according to the review I read yesterday.

(Line break joined, trackers stripped, en-dash → -, em-dash → --, smart quotes → straight quotes.)

[EDGE] Scenario 13: Empty / Whitespace-Only Clipboard

Tests that an empty or whitespace-only clipboard does not cause errors.

Copy this


(Just whitespace — spaces or tabs.)

Expected Output


(Empty string — no crash, no garbage output.)

[EDGE] Scenario 14: Non-URL Text Unchanged

Tests that plain text without URLs passes through all cleansers without modification.

Copy this

The quick brown fox jumps over the lazy dog. Nothing to clean here!

Expected Output

The quick brown fox jumps over the lazy dog. Nothing to clean here!

(No trackers, no smart quotes, no line breaks — text is unchanged.)

[UI] Scenario 15: Settings Toggle Each Rule Off

Tests that each cleaning rule can be individually disabled and verified.

Steps

  1. Open Settings -> Rules.
  2. Toggle OFF "Strip tracking parameters".
  3. Copy a URL with trackers (from Scenario 1).
  4. Trigger CleanCopy, paste, and verify trackers are still present.
  5. Re-enable the toggle and repeat — trackers should now be stripped.
  6. Repeat for each rule: Smart Quotes, Line-Break Normalizer.

Expected

Each rule's toggle independently controls that specific cleaning behavior.

[UI] Scenario 16: Custom Params Debounce & Save Indicator

Tests that the custom params input debounces correctly and shows save feedback.

Steps

  1. Open Settings -> Rules.
  2. Click the custom tracking parameters input.
  3. Type test1.
  4. Observe: a ... indicator appears while debouncing.
  5. Wait ~500ms: a checkmark appears indicating save.
  6. Wait ~1.5s: the fades out.
  7. Type ,test2 (appending to existing text).
  8. Repeat the debounce observation.

Expected

  • ... appears immediately on input change.
  • appears after ~500ms debounce completes.
  • fades out after ~1.5s.
  • Input field does not shrink when indicators appear.

[EDGE] Scenario 17: Ctrl+C Hotkey Uses Clipboard Monitor

Tests that setting the hotkey to Ctrl+C switches to the clipboard monitor approach and cleans clipboard changes from any source.

Steps

  1. Open Settings -> General.
  2. Start recording a new hotkey.
  3. Press Ctrl+C to set it as the hotkey.
  4. Check the logs for "Clipboard monitor started.".
  5. Open a text editor and type some text with smart quotes (e.g. \u201cHello \u2014 World\u201d).
  6. Select the text and press Ctrl+C.
  7. Paste the clipboard content.
  8. Now right-click paste some other text with trackers (e.g. https://example.com?utm_source=x&id=1).
  9. Paste again and verify trackers are stripped.
  10. Change the hotkey back to Alt+Shift+C.
  11. Check the logs for "Clipboard monitor shutting down.".
  12. Verify Alt+Shift+C works as before.

Expected

  • Log shows "Clipboard monitor started." after setting Ctrl+C.
  • Ctrl+C copy cleans smart quotes → straight quotes, em-dash → --.
  • Right-click copy also triggers cleaning (clipboard monitor catches all sources).
  • Log shows "Clipboard monitor shutting down." after changing away from Ctrl+C.
  • Alt+Shift+C works via the global shortcut path as before.