garris / garris/BackstopJS

Using BackstopJS with URL Parameters

Open
#627 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

Hi,

Thanks for a great tool. I am setting up some regression tests for a PatternLab installation. The URLs I have to work with are like so:
`http://localsite.dev/themes/custom/patternlab/pattern-lab/public/?p=sample-pages-basic-page`

It seems I can easily test like this:

```
{
"label": "01 Homepage",
"url": "http://localsite.dev"
},
```

But I don't want to test that page, as the content might change in the CMS so my tests will fail. Instead I'd like to test my static version of the page, like this:

```
{
"label": "01 Homepage",
"url": "http://localsite.dev/themes/custom/patternlab/pattern-lab/public/?p=sample-pages-basic-page"
},
```

However, it seems to fail on me. If I set the path directly to the html file it works, so I have a workaround - it's just tedious to keep trying to find the file (much simpler to copy the URL from the browser).

```
{
"label": "01 Homepage",
"url": "../../../web/themes/custom/patternlab/pattern-lab/public/patterns/06-sample-pages-basic-pages-basic-page/06-sample-pages-basic-pages-basic-page.html",
},
```

Thanks for any help.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.