replace-fetch-response

Check that the replace-fetch-response snippet is working as expected. The test cases here manipulate the same fetch response, so the text manipulations are cumulative. The original fetch response can always be inspected in the "Network" tab in the developer tools.

Basic usage

Test that the search param is replaced with default empty string

Example Content
Waiting 500ms to trigger snippet...
Fetch response was replaced

Steps

Filters

String replacement

Test that the search param is replaced with a custom string

Example Content
Waiting 500ms to trigger snippet...
Fetch response was replaced

Steps

Filters

String replacement with needle

Test that the search param is replaced with a custom string if the needle is matched

Example Content
Waiting 500ms to trigger snippet...
Fetch response was replaced

Steps

Filters

Regex parameters

Test the usage of regex in the search and needle parameter

Example Content
Waiting 500ms to trigger snippet...
Fetch response was replaced

Steps

Filters

Multiple string replacement

Test the replacement of multiple strings

Example Content
Waiting 500ms to trigger snippet...
Fetch response was replaced

Steps

Filters