Skip to content

Commit

Permalink
UHF-6187: Added possibility to filter components.
Browse files Browse the repository at this point in the history
  • Loading branch information
dire committed Oct 5, 2023
1 parent fe1f3e1 commit e95d15b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ Full test is a more comprehensive test that covers multiple variants, edge cases
1. Add the component to the `helfi_test_content` module following the instuctions in its README.
2. Add a test scenario for the component following the example of existing scenarios.

### Filtering components to test
It's possible to filter which components are tested by adding the name or part of it in the end of the command.

A command `npm run fast-reference list` would test all components that have "list" in their name, for example "events list" and "news list".

### Known issues
On a Windows + WSL2 setup with Chromium as the engine, the test might get stuck in the beginning for painfully long time. This probably can be fixed with some configuration but as a workaround, the engine for the tests can also be switched to Firefox or Webkit with the `engineOptions` option in `backstop_dynamic_js`.

Expand Down
5 changes: 1 addition & 4 deletions backstop_data/backstop_dynamic_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function getConfig(hostname, type) {
}

return {
// filter: 'component events', // Add filter for label string here if you want to debug a single component, like the events component.
filter: processArgs[2] ?? null, // Add filter for label string here if you want to debug a single component, like the events component.
config: {
'id': type,
'viewports': viewports,
Expand Down Expand Up @@ -385,9 +385,6 @@ function getConfig(hostname, type) {
'label': 'DC: component phasing',
'url': `https://${hostname}/en/dc-helfi-platform-test-content/dc-components/dc-component-phasing`,
'removeSelectors': removeDefault,
/* 'selectors': [
'.component--phasing'
], */
'selectorExpansion': expandComponents,
},
// {
Expand Down

0 comments on commit e95d15b

Please sign in to comment.