Skip to content

Commit e0bf561

Browse files
Merge release/1.23.2 into main branch (#460)
* CHORE Add release upload step to github actions * chore/UIDS-424 update font types to regular, medium, and bold (400, 500, 700) (#428) * update font-types to regular, medium, bold * updates Alert__message to font-type-30--regular * updates Pill to font-type-20--regular * adds --medium to font-type-xx * adds uppercase specific font-type-10 * remove --regular modifier and general organization * Test with pull requests instead of auto-merging release (#444) * Remove yarn install from release action * Merge release/1.23.0 into develop branch (#449) * Prepare release 1.23.0 * feature/UIDS-433 Add visual testing with Percy (#434) * Prepare release 1.23.2
1 parent 6debc82 commit e0bf561

File tree

12 files changed

+925
-31
lines changed

12 files changed

+925
-31
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '14.17.4'
1315
- run: npm config set "@fortawesome:registry" https://npm.fontawesome.com/ &&
1416
npm config set "//npm.fontawesome.com/:_authToken" $FONTAWESOME_NPM_AUTH_TOKEN
1517
- run: yarn

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616
- uses: actions/setup-node@v1
17+
with:
18+
node-version: '14.17.4'
1719
- uses: fregante/setup-git-user@v1
1820
- run: npm config set "@fortawesome:registry" https://npm.fontawesome.com/ &&
1921
npm config set "//npm.fontawesome.com/:_authToken" $FONTAWESOME_NPM_AUTH_TOKEN

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '14.17.4'
1315
- run: npm config set "@fortawesome:registry" https://npm.fontawesome.com/ &&
1416
npm config set "//npm.fontawesome.com/:_authToken" $FONTAWESOME_NPM_AUTH_TOKEN
1517
- run: yarn

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ lib
2828
npm-debug.log*
2929
yarn-debug.log*
3030
yarn-error.log*
31+
*.mp4

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ Runs the jest test suite
9393
### `yarn lint`
9494

9595
Runs ESLint to report on any style violations
96+
### Visual testing
97+
98+
1. Join BrowserStack (ask Brian for link)
99+
1. Navigate to this project in percy [here](https://percy.io/f38ae9b9/ui-design-system)
100+
1. Define `PERCY_TOKEN` in shell (the one from ui-design-system project)
101+
1. `npx percy exec -- cypress run`
102+
1. View results in percy.io / console
103+
104+
> Note- we are on the free plan (5k images/month) so be mindful of the limit
96105
97106
## Pull requests
98107

cypress.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"baseUrl": "http://localhost:9009/",
3+
"experimentalStudio": true
4+
}

cypress/integration/sample_spec.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* eslint-disable arrow-body-style */
2+
/* eslint-disable prefer-arrow-callback */
3+
4+
describe('Integration test with visual testing', function () {
5+
it('Loads non button version', function () {
6+
cy.visit('http://localhost:9009/?path=/story/design-system-form-elements-form-group--with-trailing-icon');
7+
8+
cy.get('#storybook-preview-iframe').iframe().find('.InputLabel').should('contain', 'Form Group with input trailing icon');
9+
10+
cy.percySnapshot('Non-button');
11+
});
12+
13+
// TODO: Wait on new props to be merged into develop
14+
// https://github.com/user-interviews/ui-design-system/pull/431
15+
// it('Loads button version', function () {
16+
// cy.visit('http://localhost:9009/?path=/story/design-system-form-elements-form-group--with-trailing-icon-and-button');
17+
18+
// cy.get('#storybook-preview-iframe').iframe().find('.InputLabel')
19+
// .should('contain', 'Form Group with input trailing icon and button');
20+
21+
// cy.percySnapshot('Button');
22+
// });
23+
});

cypress/plugins/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/// <reference types="cypress" />
2+
// ***********************************************************
3+
// This example plugins/index.js can be used to load plugins
4+
//
5+
// You can change the location of this file or turn off loading
6+
// the plugins file with the 'pluginsFile' configuration option.
7+
//
8+
// You can read more here:
9+
// https://on.cypress.io/plugins-guide
10+
// ***********************************************************
11+
12+
// This function is called when a project is opened or re-opened (e.g. due to
13+
// the project's config changing)
14+
15+
/**
16+
* @type {Cypress.PluginConfig}
17+
*/
18+
// eslint-disable-next-line no-unused-vars
19+
module.exports = (on, config) => {
20+
// `on` is used to hook into various events Cypress emits
21+
// `config` is the resolved Cypress config
22+
};

cypress/support/commands.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* eslint-disable arrow-body-style */
2+
// ***********************************************
3+
// This example commands.js shows you how to
4+
// create various custom commands and overwrite
5+
// existing commands.
6+
//
7+
// For more comprehensive examples of custom
8+
// commands please read more here:
9+
// https://on.cypress.io/custom-commands
10+
// ***********************************************
11+
//
12+
// https://github.com/cypress-io/cypress/issues/136#issuecomment-342391119
13+
Cypress.Commands.add('iframe', { prevSubject: 'element' }, ($iframe) => {
14+
return new Cypress.Promise((resolve) => {
15+
$iframe.on('load', () => {
16+
resolve($iframe.contents().find('body'));
17+
});
18+
});
19+
});

cypress/support/index.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands';
18+
// eslint-disable-next-line import/no-extraneous-dependencies
19+
import '@percy/cypress';
20+
// Alternatively you can use CommonJS syntax:
21+
// require('./commands')

0 commit comments

Comments
 (0)