Skip to content

Commit

Permalink
Merge branch 'main' into feature/132/refactor-address-input-test
Browse files Browse the repository at this point in the history
  • Loading branch information
precious-onyenaucheya-ons authored Sep 20, 2024
2 parents 5fe61f1 + 82265a8 commit d0c926e
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ backstop_data/bitmaps_test/
backstop_data/html_report/
backstop.config-for-docker.json

# Generated from lighthouse tests
.lighthouseci/
lighthouse/urls.json

# npm package folders
/components/
/page-templates/
Expand Down
2 changes: 0 additions & 2 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh
[ -n "$NETLIFY" ] && exit 0
. "$(dirname "$0")/_/husky.sh"

yarn tidy-clean
yarn install --check-files
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/sh
[ -n "$NETLIFY" ] && exit 0
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ It is sometimes useful to adjust the following settings when writing tests or di

## Testing - Visual regression tests

This project uses [Backstop JS](https://github.com/garris/BackstopJS) for visual regression testing. The tests run in Chrome headless using Pupeteer inside docker and run in three viewports; 1920 (desktop), 768 (tablet) and 375 (mobile). Reference images are stored in Git LFS and any approved changes will automatically be stored in Git LFS when pushed to the repository.
This project uses [Backstop JS](https://github.com/garris/BackstopJS) for visual regression testing. The tests run in Chrome headless using Puppeteer inside docker and run in three viewports; 1920 (desktop), 768 (tablet) and 375 (mobile). Reference images are stored in Git LFS and any approved changes will automatically be stored in Git LFS when pushed to the repository.

The visual tests will run automatically on pull requests and the result will be available in the Github Action logs. If the tests fail, the process for viewing the failures and approving changes will need to be handled locally using the following workflow and commands.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"gulp-sourcemaps": "^3.0.0",
"gulp-terser": "^2.0.1",
"http-server": "^14.1.1",
"husky": "^8.0.3",
"husky": "^9.1.6",
"jest": "^29.6.1",
"jest-axe": "^8.0.0",
"jest-environment-jsdom": "^29.6.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
{%- endif -%}
</span>
{% if params.url and params.newWindow %}
<span class="ons-btn__new-window-description ons-u-vh"> ({{ params.newWindowDescription | default("opens in a new tab") }})</span>
<span class="ons-btn__new-window-description ons-u-vh">({{ params.newWindowDescription | default("opens in a new tab") }})</span>
{% endif %}
{% if params.buttonContext %}
<span class="ons-btn__context ons-u-vh">{{ params.buttonContext }}</span>
Expand Down
4 changes: 2 additions & 2 deletions src/components/button/_macro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ describe('macro: button', () => {
}),
);

expect($('.ons-btn__new-window-description').text()).toBe(' (opens in a new tab)');
expect($('.ons-btn__new-window-description').text()).toBe('(opens in a new tab)');
});

it('has a custom new window description when `newWindow` is `true` and `newWindowDescription` is provided', () => {
Expand All @@ -405,7 +405,7 @@ describe('macro: button', () => {
}),
);

expect($('.ons-btn__new-window-description').text()).toBe(' (custom opens in a new window text)');
expect($('.ons-btn__new-window-description').text()).toBe('(custom opens in a new window text)');
});

it('has the `download` attribute when `variants` contains "download"', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/components/list/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@
}
.ons-list__prefix,
.ons-list__suffix {
@extend .ons-u-m-no;
&--icon-check .ons-icon {
fill: var(--ons-color-leaf-green) !important;
@extend .ons-u-mr-s;
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/list/example-summary-list.njk
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{% from "components/list/_macro.njk" import onsList %}
{{
onsList({
"iconPosition": "before",
"variants": "summary",
"itemsList": [
{
"text": 'birth certificate'
"text": 'birth certificate',
"iconType": "check"
},
{
"text": 'national insurance number'
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5979,10 +5979,10 @@ human-signals@^5.0.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28"
integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==

husky@^8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==
husky@^9.1.6:
version "9.1.6"
resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.6.tgz#e23aa996b6203ab33534bdc82306b0cf2cb07d6c"
integrity sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==

[email protected]:
version "0.4.24"
Expand Down

0 comments on commit d0c926e

Please sign in to comment.