{
  "doc": {
    "id": "ui-coverage/core-concepts/views",
    "title": "Views of URLs and mounted components | Cypress UI Coverage",
    "description": "UI Coverage is organized into views, which are the unique URLs across all snapshots from end-to-end tests and the unique mounted components from component tests.",
    "section": "ui-coverage",
    "source_path": "/llm/markdown/ui-coverage/core-concepts/views.md",
    "version": "998ed2fab5510b3f672383c6cb23238bf481edb8",
    "updated_at": "2026-05-24T20:45:33.543Z",
    "headings": [
      {
        "id": "ui-coverage/core-concepts/views#views",
        "text": "Views",
        "level": 1
      },
      {
        "id": "ui-coverage/core-concepts/views#how-views-are-created",
        "text": "How views are created",
        "level": 2
      },
      {
        "id": "ui-coverage/core-concepts/views#examples-of-views",
        "text": "Examples of views",
        "level": 3
      },
      {
        "id": "ui-coverage/core-concepts/views#using-views",
        "text": "Using Views",
        "level": 2
      },
      {
        "id": "ui-coverage/core-concepts/views#customizing-views",
        "text": "Customizing views",
        "level": 2
      },
      {
        "id": "ui-coverage/core-concepts/views#view-grouping",
        "text": "View grouping",
        "level": 3
      },
      {
        "id": "ui-coverage/core-concepts/views#ignoring-views",
        "text": "Ignoring views",
        "level": 3
      }
    ]
  },
  "content": {
    "type": "root",
    "children": [
      {
        "type": "heading",
        "depth": 1,
        "children": [
          {
            "type": "text",
            "value": "Views"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "UI Coverage organizes unique URLs from snapshots in end-to-end tests and mounted components in component tests into Views. Each View represents a distinct page or state in your application, allowing you to track coverage across different parts of your application."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "How views are created"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "By default, UI Coverage applies a set of rules to generate a single View for dynamic URLs representing the same page. These rules ensure clarity by grouping similar URLs and reducing noise:"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Search Parameters: All query parameters are removed (e.g., `/dashboard?tab=overview` becomes `/dashboard`)."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Hash Parameters: Fragment identifiers are removed unless they represent a subpath (e.g., `#/admin`)."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Dynamic Segments: URL segments that differ only by integers or UUIDs are replaced with a wildcard (`*`)."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Examples of views"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`/users/123/profile` and `/users/456/profile` become `/users/*/profile`"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`/dashboard?tab=overview` and `/dashboard?tab=settings` become `/dashboard`"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`/app#settings` and `/app#profile` become `/app`"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`/app#/admin` and `/app#/settings` remain separate Views"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "These rules help consolidate similar pages into manageable Views while maintaining specificity where needed."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Using Views"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "In the UI Coverage interface, Views are listed along with their coverage scores, providing insights into:"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Tested Areas: Identify which parts of your application have sufficient test coverage."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Untested Areas: Spot pages or components that lack testing and prioritize them."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Coverage Trends: Track how coverage evolves across Views over time."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Critical Flows: Focus testing efforts on key user journeys and ensure their completeness."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Customizing views"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "You can tailor how URLs are grouped into Views using configuration options:"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "View grouping"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Define rules for grouping URLs into Views to align with your application's structure:"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "{  \"views\": [    {      \"pattern\": \"https://cypress.io/users/*\"    }  ]}"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "To learn more about the configuration options, refer to the "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/ui-coverage/configuration/views.md",
            "children": [
              {
                "type": "text",
                "value": "Views"
              }
            ]
          },
          {
            "type": "text",
            "value": " documentation."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Ignoring views"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Exclude irrelevant or low-priority URLs from being tracked as Views:"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "{  \"viewFilters\": [    {      \"pattern\": \"https://auth.example.com/*\",      \"include\": false    }  ]}"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "To learn more about the configuration options, refer to the "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/ui-coverage/configuration/viewfilters.md",
            "children": [
              {
                "type": "text",
                "value": "View Filters"
              }
            ]
          },
          {
            "type": "text",
            "value": " documentation."
          }
        ]
      }
    ]
  },
  "token_estimate": 436
}