From 8fcb9fc1e51b81d1c217202333dce403e36113c8 Mon Sep 17 00:00:00 2001 From: astone123 Date: Wed, 26 Mar 2025 16:13:18 -0400 Subject: [PATCH] feat: (ui-coverage) add examples for protocol-agnostic views and viewFilters --- docs/partials/_viewfilters.mdx | 29 +++++++++++++++++++++++++++++ docs/partials/_views.mdx | 8 ++++---- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/partials/_viewfilters.mdx b/docs/partials/_viewfilters.mdx index 8fb7b26b78..f0fb4d3302 100644 --- a/docs/partials/_viewfilters.mdx +++ b/docs/partials/_viewfilters.mdx @@ -137,3 +137,32 @@ https://cypress.io/error/500 ``` https://cypress.io/home ``` + +### Excluding URLs regardless of protocol + +#### Config + +```json +{ + "viewFilters": [ + { + "pattern": "localhost:8888/admin/*", + "include": false + } + ] +} +``` + +#### Visited URLs + +``` +http://localhost:8888/app +http://localhost:8888/admin +https://localhost:8888/admin +``` + +#### Views shown in UI + +``` +http://localhost:8888/app +``` diff --git a/docs/partials/_views.mdx b/docs/partials/_views.mdx index b458411835..673d0b1ac7 100644 --- a/docs/partials/_views.mdx +++ b/docs/partials/_views.mdx @@ -59,7 +59,7 @@ The first pattern that a given URL matches is used as its view. If a URL doesn't { "views": [ { - "pattern": "https://www.my-app.com/users/*" + "pattern": "www.my-app.com/users/*" } ] } @@ -91,7 +91,7 @@ www.my-app.com/users/* { "views": [ { - "pattern": "https://www.my-app.com/users/:name" + "pattern": "www.my-app.com/users/:name" } ] } @@ -123,7 +123,7 @@ www.my-app.com/users/:name { "views": [ { - "pattern": "https://www.my-app.com/analytics/:type/:id", + "pattern": "www.my-app.com/analytics/:type/:id", "groupBy": ["type"] } ] @@ -156,7 +156,7 @@ www.my-app.com/analytics/usage/:id { "views": [ { - "pattern": "https://www.my-app.com/home?*status=:status{&*}?#*", + "pattern": "www.my-app.com/home?*status=:status{&*}?#*", "groupBy": ["status"] } ]